4 Replies Latest reply on Jul 6, 2010 4:34 AM by Nick Belaevski

    Inputtext inside rich:dataGrid

    Ravi kiran Kuchika Newbie

      Hi

       

      I have a rich:datagrid inside a rich:datatable. rich:datagrid consists of h:inputtext componenets on click of save the input text values are not getting updated. Below is my code

       

      <rich:dataTable value="#{filterConfigurationBean.ibFilterNameList}" var="filterNames" >

       

      <

       

      rich:column id="filters">

      ........

      ........

      <

       

      rich:dataGrid value="#{filterNames.filterValueStringList}"

       

      columns="3" var="dataGrid">

       

      <rich:panel>

       

      <f:facet name="header">

       

      </f:facet>

       

      <h:panelGrid>

       

      <h:inputText value="#{dataGrid}"></h:inputText>

       

      </h:panelGrid>

       

      </rich:panel>

       

      </rich:dataGrid>

      </

       

      rich:column>

       

      </rich:dataTable>

       

      what am i doing wrong here???

        • 1. Re: Inputtext inside rich:dataGrid
          Nick Belaevski Master

          Hi,

           

          "var" is request-scoped variable containing current selected item. So, you are actually trying to edit content of request-scoped variable extracted from data collection, that's why it's not working. Convert "dataGrid" into a bean with editable properties and edit their values.

          • 2. Re: Inputtext inside rich:dataGrid
            Ravi kiran Kuchika Newbie

            Hi Nick

             

            Thanks for the reply...

             

            I didn't get what is meant by Convert "dataGrid" into a bean with editable properties and edit their values.

             

            for me datagrid is taking list from datatable object if i need to populate this list from backing bean i need to replicate datatable list into backing bean...

             

            actually my requirement is i should have 3 dynamic columns in a row using datagrid.. which i am getting it properly.. thing is i am not getting updated value of the list on click of save meaning on click of save i need updated ibFilterNameList  with all datagrid's list without any other manipulations.

             

            can you please eloberate on what need to be done?? I am attaching my xhtml file for reference

             

            Thanks..

            • 3. Re: Inputtext inside rich:dataGrid
              Ravi kiran Kuchika Newbie

              I tried a sample like i just took a sample datagrid and try to give list of string to datagrid and tried updating string values on click of save list is not getting updated where as if i take list of objects upon save updated values are coming..

               

              May i know if it  is the behaviour of datagrid???? for rich:datatable also it is not updating the list of strings

              • 4. Re: Inputtext inside rich:dataGrid
                Nick Belaevski Master

                Once again, iteration component cannot change value of immutable component (such as string), it can only update its value in some scope (here it is updating attribute of request placing new string there). You should make it mutable by adding bean with editable property.