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

         Key: SHALE-180
         URL: http://issues.apache.org/struts/browse/SHALE-180
     Project: Shale
        Type: Bug

  Components: Core  
    Versions: Nightly    
    Reporter: James Reynolds
    Priority: Minor


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.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to