[ 
http://www.stripesframework.org/jira/browse/STS-343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12640#comment-12640
 ] 

Toni Lyytikäinen commented on STS-343:
--------------------------------------

Just hit this bug in 1.5.6 so I can confirm it's still an issue, although it 
can be easily fixed by putting the wizard-fields tag at the bottom of the form. 

> wizard-fields tag fails under certain conditions
> ------------------------------------------------
>
>                 Key: STS-343
>                 URL: http://www.stripesframework.org/jira/browse/STS-343
>             Project: Stripes
>          Issue Type: Bug
>          Components: Tag Library
>    Affects Versions: Release 1.4.2
>         Environment: windows xp, latest, java 5
>            Reporter: Larry Hamel
>            Priority: Minor
>
> Using the stripes-examples.war, expanded in Tomcat or some servlet engine, 
> navigate to the bugzooky example web app, and bring up both Register.jsp and 
> Register2.jsp in an editor. Copy the input tags for password & 
> confirm-password from the second page, Register2.jsp, adding them to 
> Register.jsp (also leaving them in Register2.jsp--the point is to load 
> parameters before Register2.jsp is rendered; the use-case where this came up 
> is actually a backward-navigation via a button labeled 'previous').
> Next, add the "wizard-fields" tag at the TOP of the stripes:form in 
> Register2.jsp  (right after the tag opening).  Run the app and enter some 
> values on the first page. Click Next and then examine the HTML source for the 
> page for the hidden fields added by the strips:wizard-fields tag. 
> Do you see hidden fields for values for the password and confirm-password?
> Then edit Register2.jsp again, moving the wizard-fields tag to the bottom of 
> the form.   Hit the back button, refresh, and check HTML.  This time, the 
> wizards-fields tag has picked up the existence of the password/confirm 
> inputs, and omits the relevant hidden fields.
> Assuming replication, then using stripes 1.4.2, when the tag "wizard-fields" 
> is placed *before* the input fields in a wizard JSP page, AND an actionBean 
> field has a non-empty value, the tag seems to add hidden fields for even the 
> bean-supplied inputs in the stripes:form. This duplication causes a contest 
> between the hidden field's value and the input's value (and the hidden value 
> wins in my testing, which is why I noticed this).
> Conversely, if the wizard-fields tag is placed *after* the inputs within the 
> stripes:form, all is well--no hidden field is added for any input that is 
> already in the form.
> BTW, consider adding a mention of the wizard-fields tag to the confluence 
> page on wizards. It is mentioned only in old email:
> http://stripes.mc4j.org/confluence/display/stripes12/mail/1539
> http://article.gmane.org/gmane.comp.java.stripes.user/461/match=wizard+button
> A possible blurb for that page from the javadoc for the tag is below.
> --------
> The stripes:wizard-fields tag examines the request and include hidden fields 
> for all parameters that have do not have form fields in the current form. It 
> will include multiple values for parameters that have them.
> This tag is very useful for implementing basic wizard flow without relying on 
> session scoping of ActionBeans, and without having to name all the parameters 
> that should be carried forward in the form.
> NB: put the stripes:wizard-fields tag at the BOTTOM of the stripes:form in 
> Stripes version 1.4.2 and preceding, due to a bug.
> ----------

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Stripes-development mailing list
Stripes-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to