ICEfaces
  1. ICEfaces
  2. ICE-5302

Text Entry has validation problem on Glassfishv3 server

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha2
    • Fix Version/s: 2.0-Beta1
    • Component/s: Sample Apps
    • Labels:
      None
    • Environment:
      Glassfishv3 server

      Description

      Text Entry:
      Enter name then tab out.
      Password field validation error message " Enter no less than 6 character" is displayed.
      The validation should not happen on this field until user tabs out of it.

        Activity

        Mandeep Hayher created issue -
        Hide
        Joanne Bai added a comment -

        Still an issue on Glimmer revision 21634 + Glassfish v3

        Enter name in Text Entry, and then tab out

        • the name just entered does not appear in the Name field of the panel of Server-side Backing Bean Values
        • validation for Password " Enter no less than 6 character" is displayed mistakenly

        When testing using Tomcat6.0.26, Text Entry works properly.

        Show
        Joanne Bai added a comment - Still an issue on Glimmer revision 21634 + Glassfish v3 Enter name in Text Entry, and then tab out the name just entered does not appear in the Name field of the panel of Server-side Backing Bean Values validation for Password " Enter no less than 6 character" is displayed mistakenly When testing using Tomcat6.0.26, Text Entry works properly.
        Ken Fyten made changes -
        Field Original Value New Value
        Salesforce Case []
        Fix Version/s 2.0-Beta [ 10231 ]
        Ken Fyten made changes -
        Assignee Mandeep Hayher [ mandeep.hayher ]
        Deryk Sinotte made changes -
        Link This issue is duplicated by ICE-5860 [ ICE-5860 ]
        Deryk Sinotte made changes -
        Assignee Mandeep Hayher [ mandeep.hayher ] Deryk Sinotte [ deryk.sinotte ]
        Deryk Sinotte made changes -
        Salesforce Case []
        Assignee Priority P2
        Hide
        Deryk Sinotte added a comment -

        Trying to characterize more specifically what's happening. Still only happens on Glassfish (and not on Tomcat). I've simplified the test case down to something like this:

        <ice:inputText id="textA"
        size="10"
        value="#

        {basic.textA}

        "
        partialSubmit="true"
        required="true">
        </ice:inputText>
        <ice:message id="msgA" for="textA"/>

        <ice:inputText id="textB"
        size="10"
        value="#

        {basic.textB}

        "
        partialSubmit="true"
        required="true">
        <f:validateLength minimum="2" maximum="8"/>
        </ice:inputText>
        <ice:message id="msgB" for="textB"/>

        Seems that removing the f:validateLength facet allows the behaviour we'd normally expect. When f:validate is present, then validation is triggered regardless of which text field was partially submitted.

        Show
        Deryk Sinotte added a comment - Trying to characterize more specifically what's happening. Still only happens on Glassfish (and not on Tomcat). I've simplified the test case down to something like this: <ice:inputText id="textA" size="10" value="# {basic.textA} " partialSubmit="true" required="true"> </ice:inputText> <ice:message id="msgA" for="textA"/> <ice:inputText id="textB" size="10" value="# {basic.textB} " partialSubmit="true" required="true"> <f:validateLength minimum="2" maximum="8"/> </ice:inputText> <ice:message id="msgB" for="textB"/> Seems that removing the f:validateLength facet allows the behaviour we'd normally expect. When f:validate is present, then validation is triggered regardless of which text field was partially submitted.
        Ken Fyten made changes -
        Salesforce Case []
        Assignee Priority P2 P1
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #21931 Fri Jul 16 15:00:52 MDT 2010 deryk.sinotte ICE-5302: setting context param so that bean validation doesn't interfere with proper partialSubmit behaviour
        Files Changed
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/samples/component-showcase/web/WEB-INF/web.xml
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/samples/compat-basic/web/WEB-INF/web.xml
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/samples/auctionMonitor/web/WEB-INF/web.xml
        Hide
        Deryk Sinotte added a comment -

        The problem stems from the availability of the Bean Validation library (bean-validator.jar). This is on the GlassFish classpath but not in Tomcat. If the library is added to the .war file running on Tomcat, the same problematic behaviour is observed.

        The issue is that, if the Bean Validation framework is available, JSF will automatically detect and us it. This only appears to be the case if the specific validator tag (e.g. f:validateLength) is used. The Bean Validation library causes a different behaviour for empty fields which is not currently handled through partialSubmit in compatibility mode.

        The workaround is to include the following context parameter in the web.xml file of the application:

        <context-param>
        <param-name>javax.faces.VALIDATE_EMPTY_FIELDS</param-name>
        <param-value>false</param-value>
        </context-param>

        I've added this parameter to our compat examples (compat-basic, auctionMonitor, component-showcase) and updated the documentation in the Compatibility section of the Wiki.

        Show
        Deryk Sinotte added a comment - The problem stems from the availability of the Bean Validation library (bean-validator.jar). This is on the GlassFish classpath but not in Tomcat. If the library is added to the .war file running on Tomcat, the same problematic behaviour is observed. The issue is that, if the Bean Validation framework is available, JSF will automatically detect and us it. This only appears to be the case if the specific validator tag (e.g. f:validateLength) is used. The Bean Validation library causes a different behaviour for empty fields which is not currently handled through partialSubmit in compatibility mode. The workaround is to include the following context parameter in the web.xml file of the application: <context-param> <param-name>javax.faces.VALIDATE_EMPTY_FIELDS</param-name> <param-value>false</param-value> </context-param> I've added this parameter to our compat examples (compat-basic, auctionMonitor, component-showcase) and updated the documentation in the Compatibility section of the Wiki.
        Ken Fyten made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Priority P1
        Resolution Fixed [ 1 ]
        Hide
        Mandeep Hayher added a comment -

        Glimmer revision# 21936
        Component-showcase: Text Entry test-scripts passed in nightly tests.

        Show
        Mandeep Hayher added a comment - Glimmer revision# 21936 Component-showcase: Text Entry test-scripts passed in nightly tests.
        Mandeep Hayher made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Deryk Sinotte [ deryk.sinotte ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Mandeep Hayher
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: