BIANEMohamed / struts2-jquery

Automatically exported from code.google.com/p/struts2-jquery
0 stars 0 forks source link

<sj:a> use "href" attribute,<s:form> don't submit. #1082

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
(This is for feature requests and bugs in Struts2 jQuery Plugin - for
getting help, please use the User Group.
http://groups.google.com/group/struts2-jquery )

What steps will reproduce the problem?
1. I wrote <sj:a> button with form-action, <sj:a href="check" id="btn" 
formIds="checkForm" button="true" validate="true">
2. <s:form id="checkForm" method="POST" validate="true">
3. push this button.
4. <form> don't submit.

What is the expected output? What do you see instead?

If href attribute-value set , I guess <sj:a> has two problem.
1. <form> don't submit.
2. <form> action attribute-value changed href attribute-value , ajax-validation 
work fine , but submitted after validation action don't changed.

I thougth Struts2-jQuery plugin provides script 'jquery.struts2.js' maybe do 
not work <sj:a> href attribute defined , I modified script-file(attached-file) 
line 815 , <sj:a> click event fired.

...But Ajax-Validation submitted <sj:a> href attribute-value url , after 
validation submitted url was <s:form> defined url , or not defined url 
submitted display url.
Therefore ,I modified 'jquery.struts2.js'(attached-file) line 975 and 999 , if 
<sj:a> have href attribute and value , form action chenged after validation was 
success.

Attached modified file 'jquery.struts2.js' and tested simple jsp file. This 
patch  maybe work fine , if there is no problem , verified this attached file.

thanks(^-^)

Which struts2 version?

2.3.16

Which struts2-jquery plugin version?

3.7.0 ( maybe all 3.x )

Please provide any additional information below.

Struts2-Bootstrap plugin : 1.7.0
Browser : Google chrome 32.0

Original issue reported on code.google.com by g.alpha...@gmail.com on 16 Feb 2014 at 1:42

Attachments:

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/struts2-jquery/source/detail?r=1876

Sorry for the delay, can you please check out latest 3.7.1-SNAPSHOT release?

Original comment by johgep on 22 Apr 2014 at 7:56

GoogleCodeExporter commented 9 years ago
Thanks a lot! I will try it.

Original comment by g.alpha...@gmail.com on 1 May 2014 at 3:33

GoogleCodeExporter commented 9 years ago

Original comment by johgep on 13 May 2014 at 7:03