ICEfaces
  1. ICEfaces
  2. ICE-11481

ace:dataTable, rowIndexVar not returning correct value when used in f:attribute

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.3.0.GA_P07
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Windows Vista; Windows XP; Other
    • Support Case References:
      00014567

      Description

      Hi,

      We have ace:dataTable and inside the ace:column we supposed to use <h:selectBooleanCheckbox valueChangeListener="#{page1.payModeValueChange}" with f:attribute and passing the dataTable index.

      The index is not passed to the backing bean valuechangelister

      public void payModeValueChange(ValueChangeEvent event) {
      Integer val = (Integer) ((UIInput) event.getSource()).getAttributes().get("val"); //val is null
      System.out.println(val);
      }

      Sample program is attached here and kindly let us know whats wrong and advice us.

      thanks

      -----
      More info

      page1.xhtml
      --------------------------
      <h:selectBooleanCheckbox value="#{page1.agree}"
      valueChangeListener="#{page1.payModeValueChange}">
      <f:ajax execute="@this" render="@all" />
      <!-- Why the f:attribute value is not passed to the backing bean if it inside the ace column ?? -->
      <f:attribute name="raw" value="#{row}" />
      </h:selectBooleanCheckbox>

      Page1Bean.java
      ---------------------------
      public void payModeValueChange(ValueChangeEvent event) {
      Integer val = (Integer) ((UIInput) event.getSource()).getAttributes().get("val");
      System.out.println(val);
      }

        Activity

        Sierra Mckinney created issue -
        Sierra Mckinney made changes -
        Field Original Value New Value
        Description Hi,

        We have ace:dataTable and inside the ace:column we supposed to use <h:selectBooleanCheckbox valueChangeListener="#{page1.payModeValueChange}" with f:attribute and passing the dataTable index.

        The index is not passed to the backing bean valuechangelister

        public void payModeValueChange(ValueChangeEvent event) {
        Integer val = (Integer) ((UIInput) event.getSource()).getAttributes().get("val"); //val is null
        System.out.println(val);
        }

        Sample program is attached here and kindly let us know whats wrong and advice us.

        thanks
        Hi,

        We have ace:dataTable and inside the ace:column we supposed to use <h:selectBooleanCheckbox valueChangeListener="#{page1.payModeValueChange}" with f:attribute and passing the dataTable index.

        The index is not passed to the backing bean valuechangelister

        public void payModeValueChange(ValueChangeEvent event) {
        Integer val = (Integer) ((UIInput) event.getSource()).getAttributes().get("val"); //val is null
        System.out.println(val);
        }

        Sample program is attached here and kindly let us know whats wrong and advice us.

        thanks

        -----
        More info

        page1.xhtml
        --------------------------
        <h:selectBooleanCheckbox value="#{page1.agree}"
        valueChangeListener="#{page1.payModeValueChange}">
        <f:ajax execute="@this" render="@all" />
        <!-- Why the f:attribute value is not passed to the backing bean if it inside the ace column ?? -->
        <f:attribute name="raw" value="#{row}" />
        </h:selectBooleanCheckbox>

        Page1Bean.java
        ---------------------------
        public void payModeValueChange(ValueChangeEvent event) {
        Integer val = (Integer) ((UIInput) event.getSource()).getAttributes().get("val");
        System.out.println(val);
        }
        Sierra Mckinney made changes -
        Attachment ICE11481page1.xhtml [ 23322 ]
        Sierra Mckinney made changes -
        Attachment ICE11481page1.xhtml [ 23322 ]
        Sierra Mckinney made changes -
        Attachment ICE11481page1.xhtml [ 23323 ]
        Sierra Mckinney made changes -
        Comment [ A comment with security level 'icesoft-internal-developers' was removed. ]
        Hide
        Sierra Mckinney added a comment -

        From Client:
        Hi,

        Correction in the .xhtml file

        Kindly change the <f:attribute name="raw" value="#

        {row}" /> to <f:attribute name="val" value="#{row}

        " /> and its not working under ace:dataTable + ace:column

        <h:selectBooleanCheckbox value="#

        {page1.agree}

        "
        valueChangeListener="#

        {page1.payModeValueChange}

        ">
        <f:ajax execute="@this" render="@all" />
        <!-- Why the f:attribute value is not passed to the backing bean if it inside the ace column ?? -->
        <f:attribute name="val" value="#

        {row}

        " />
        </h:selectBooleanCheckbox>

        Page1Bean.java
        ---------------------------
        public void payModeValueChange(ValueChangeEvent event)

        { Integer val = (Integer) ((UIInput) event.getSource()).getAttributes().get("val"); System.out.println(val); }

        Thanks

        Show
        Sierra Mckinney added a comment - From Client: Hi, Correction in the .xhtml file Kindly change the <f:attribute name="raw" value="# {row}" /> to <f:attribute name="val" value="#{row} " /> and its not working under ace:dataTable + ace:column <h:selectBooleanCheckbox value="# {page1.agree} " valueChangeListener="# {page1.payModeValueChange} "> <f:ajax execute="@this" render="@all" /> <!-- Why the f:attribute value is not passed to the backing bean if it inside the ace column ?? --> <f:attribute name="val" value="# {row} " /> </h:selectBooleanCheckbox> Page1Bean.java --------------------------- public void payModeValueChange(ValueChangeEvent event) { Integer val = (Integer) ((UIInput) event.getSource()).getAttributes().get("val"); System.out.println(val); } Thanks
        Ken Fyten made changes -
        Assignee Arturo Zambrano [ artzambrano ]
        Affects Version/s EE-3.3.0.GA_P07 [ 13118 ]
        Component/s ACE-Components [ 10050 ]
        Hide
        Arturo Zambrano added a comment -

        r53115: put the updated rowIndexVar value in the request map every time setRowIndex() is called on the data table component, so that its value be available for EL expressions

        Show
        Arturo Zambrano added a comment - r53115: put the updated rowIndexVar value in the request map every time setRowIndex() is called on the data table component, so that its value be available for EL expressions
        Arturo Zambrano made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Arturo Zambrano added a comment -

        r53116: committed fix to customer branch

        Show
        Arturo Zambrano added a comment - r53116: committed fix to customer branch
        Ken Fyten made changes -
        Fix Version/s EE-3.3.0.GA_P08 [ 13293 ]
        Fix Version/s EE-4.3.0.GA_P02 [ 13292 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #53119 Thu Dec 05 11:07:46 MST 2019 art.zambrano ICE-11481 put the updated rowIndexVar value in the request map every time setRowIndex() is called on the data table component, so that its value be available for EL expressions
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/datatable/DataTable.java
        Hide
        Arturo Zambrano added a comment -

        r53116: committed fix to the 4.x trunk

        Show
        Arturo Zambrano added a comment - r53116: committed fix to the 4.x trunk
        Arturo Zambrano made changes -
        Summary Regarding - f:attribute is not passing value inside ace:datatable - ace:column ace:dataTable, rowIndexVar not returning correct value when used in f:attribute
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Sierra Mckinney
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: