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

        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.
        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.
        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.
        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.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: