Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-22037

h:inputText does not have generated onchange anymore

    XMLWordPrintable

    Details

      Description

      It seems to be a regression introduced by NXP-17271.

      Step to reproduce:

      • 8.10-HF03 (HF02 is ok) and 9.1-SNASPHOT, create a widget with the following template:
        <c:if test="true" xmlns:f="http://java.sun.com/jsf/core"
          xmlns="http://www.w3.org/1999/xhtml"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:c="http://java.sun.com/jstl/core"
          xmlns:nxu="http://nuxeo.org/nxweb/util"
          xmlns:nxd="http://nuxeo.org/nxweb/document"
          xmlns:nxl="http://nuxeo.org/nxforms/layout"
          xmlns:nxp="http://nuxeo.org/nxweb/pdf"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:nxwt="http://nuxeo.org/nxforms/runtime/widgettype"
          xmlns:a4j="http://richfaces.org/a4j">
        
               <h:inputText id="#{widget.id}"  value="#{field}" 
                         onkeypress="if (event.keyCode == 13) {return false; }">
               <f:ajax event="change" execute="@this" listener="#{jsfResetActions.resetComponents}"/>
             </h:inputText>
        
        </c:if>
        

      The generated html input is:

      <input id="document_edit:nxl_dublincore:nxw_nature_1" type="text" name="document_edit:nxl_dublincore:nxw_nature_1" onkeypress="if (event.keyCode == 13) {return false; }">
      

      there's no onchange, it should be:

      <input id="..." type="text" name="..." onkeypress="if (event.keyCode == 13) {return false; }" onchange="mojarra.ab(this,event,'change','@this',0)">
      

      As a direct result, the listener is never called.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 5 hours
                  5h