Struts2 jQuery插件 - 提交按钮 [英] Struts2 jQuery plugin - submit button
问题描述
Struts提交按钮 - 工作正常
< s:form action =product!listid = searchFormtheme =simplemethod =Post>
< s:submit action =productmethod =listvalue =Find/>
< / s:form>
将struts提交转换为struts-jquery提交提交按钮 - 不能正常工作
< s:form action =product!listid =searchFormtheme = 简单方法=发布>
< sj:submit />
< / s:form>
如果仅使用表单操作< sj:submit />
,页面刷新并作为Struts标签工作,但它不应该是。
按顺序< sj:submit>
正常工作目标
属性必须设置为某个值且表单必须 id
属性。
< s:form action =product!listid = searchForm >
< sj:submit targets =results/>
< / s:form>
I have Struts2 jQuery plugin submit button, when click the button its not firing the action class as struts submit button. I need to keep the same page after click the button.Please look into below code difference.
Struts submit button - Working good
<s:form action="product!list" id="searchForm" theme="simple" method="Post">
<s:submit action="product" method="list" value="Find" />
</s:form>
Converting struts submit to struts-jquery submit submit button - Not Working good
<s:form action="product!list" id="searchForm" theme="simple" method="Post" >
<sj:submit />
</s:form>
if using only form action <sj:submit/>
, the page the refreshing and working as Struts tag, but it should not be.
In order <sj:submit>
to work properly targets
attribute must be set to some value and form must have id
attribute.
<s:form action="product!list" id="searchForm">
<sj:submit targets="results"/>
</s:form>
这篇关于Struts2 jQuery插件 - 提交按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!