0 Replies Latest reply on Jul 21, 2007 9:33 AM by kaviarasu

    Text area displayed for all rows when trying to display a  t

    kaviarasu

      hi
      i have to display datas from a database using rich:table
      each row i display data with a unique id
      there is a button name write comment in each row
      when the button is pressed a text area with submit button want to appear . For that i set in bean.
      when it value is 0 the text area is invisible
      when i click write comment button the bean value set 1 , so im getting all the text area is visible. i want the text area for particular row want to be displayed not for other rows,


      <h:commandLink value="write comment" action="#{usermessage2.select}" actionListener="#{usermessage2.test}"/>
       <h:inputTextarea rendered="#{usermessage2.read}"></h:inputTextarea>
       <h:commandButton value="submit" action="#{usermessage2.deselect}" rendered="#{usermessage2.read}"></h:commandButton>




      public boolean isRead() {
       return read;
       }
       public void setRead(boolean read) {
       this.read = read;
       }
      
       public void select() {
      
       setRead(true);
      
       }
      public void deselect() {
       setRead(false);
      
       }

      Thank you
      regards
      kavi