Issue Details (XML | Word | Printable)

Key: SHALE-180
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Gary VanMatre
Reporter: James Reynolds
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Shale

[Shale] <s:commonsValidator/> generates JavaScript for components that are not rendered

Created: 25/May/06 01:39 AM   Updated: 21/Aug/06 11:28 PM
Return to search
Component/s: Core
Affects Version/s: Nightly
Fix Version/s: 1.0.3


 Description  « Hide
The validator fires for an h:inputText that isn't rendered.
 This is what I have on my page:
 
<h:outputText value="Last Name:"/>

                    <h:outputText value="#{sessionScope.visit.user.lastName}"
                                  style="font-weight:bold;"
                                  rendered="#{!members$myAccount.editName}"/>

                    <h:inputText id="lastName" value="#{sessionScope.visit.user.lastName}"
                                rendered="#{members$myAccount.editName}"
                                binding="#{members$myAccount.lastNameInput}"
                                required="true">
                        <s:commonsValidator type="required"
                                            arg="Last name"
                                            server="true"
                                            client="true"/>
                        <h:message for="lastName" errorClass="errorText"/>
                    </h:inputText>
 
 
 The inputText boxes are not rendered unless the user clicks a "Update
 Name" button that changes the boolean "editName" property. The problem
 is that the Update Name button is triggering the validation on the
 un-rendered InputText control.
 
 I suppose the form's onSubmit event caller assumes the existence of
 the Input boxes.


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Gary VanMatre added a comment - 26/May/06 10:28 PM
Thanks for the help James! This patch will be in the shale 20060527 nightly build.