1 Reply Latest reply on Oct 24, 2007 5:00 AM by graffer3

    a4j:support + f:convertNumber  problem

    graffer3

      Hi,

      I have a rich:datatable with form fields. These fields have an onchange listener and a converter:

      <h:inputText id="amountT" binding="#{ig003Update.tamntQty}" immediate="false" value="#{ibtl.m.tamntQty}" style="width:50px;">
       <f:convertNumber minFractionDigits="2" groupingUsed="false" locale="#{user.locale}" />
       <a4j:support immediate="true" action="#{ig003Update.changeT}" event="onchange" reRender="data" />
       </h:inputText>
      


      When changing a value the ig003Update.changeT method is executed:

      ...
      public String changeT() {
       logger.debug("Executing change T");
       Ig003Row row = (Ig003Row) dataTable.getRowData();
      
       // binded field: update current value & validate (if required)
       tamntQty.processValidators(FacesContext.getCurrentInstance());
       tamntQty.processUpdates(FacesContext.getCurrentInstance());
       // old value, if converter is used
       logger.debug("tamntQty value: " + row.getM().getTamntQty());
      }
      ...
      


      When no converter is used, the updated value row.getM().getTamntQty() is correct, but when using the converter the value is not set.

      Any ideas?

      Thanks, Georg

        • 1. Re: a4j:support + f:convertNumber  problem
          graffer3

          Some more info: When using:

          <rich:messages/>
          


          it prompts:

          /jsp/ig/ig003.jspx @132,138 value="#{ibtl.m.tamntQty}": java.lang.IllegalArgumentException: argument type mismatch

          after changing an inputtext with converter.

          Anyway I'm using tomcat 6.0.14, richfaces 3.1.2 and JSF RI 1.2