title: Primefaces Form values not displaying
body: <p>I have  primefaces dataTable whose rows I would like to edit. I do submit the Id for the row and display the values in a panel to be edited. Using the same object, if I print out the values using h:outputText, I see the values. p:inputText does not show the value. If I refresh the page using the browser reload button, form value shows up just fine. Below is the condensed version of my code.</p>
  
  <p><strong>Model</strong></p>
  
  <pre><code>@Entity
  @Table(name = "TICKET")
  public class Ticket extends AuditTrail implements Serializable 
  {
      private static final long serialVersionUID = 1L;
  
      private static Logger log = Logger.getLogger(Ticket.class);
  
      @Id
      @SequenceGenerator(name = "TICKET_TICKETID_GENERATOR", sequenceName = "TICKET_SEQ")
      @GeneratedValue(strategy = GenerationType.AUTO, generator = "TICKET_TICKETID_GENERATOR")
      @Column(name = "TICKET_ID", unique = true, nullable = false, precision = 0)
      private Long ticketId;
  
      @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "ticket")
      @OrderBy(clause = "createdBy")
      private Set&lt;Comment&gt; comments = new LinkedHashSet&lt;Comment&gt;(0);
  }
  
  @Entity
  @Table(name = "COMMENT_LOG")
  public class Comment extends AuditTrail implements java.io.Serializable {
  
      // Fields
  
      private static final long serialVersionUID = 1L;
  
      @Id
      @Column(name = "COMMENT_LOG_ID", unique = true, nullable = false, precision = 0)
      @SequenceGenerator(name = "COMMENT_COMMENTID_GENERATOR", sequenceName = "COMMENT_SEQ")
      @GeneratedValue(strategy = GenerationType.AUTO, generator = "COMMENT_COMMENTID_GENERATOR")
      private Long commentId;
  
      @ManyToOne(fetch = FetchType.LAZY)
      @JoinColumn(name = "TICKET_ID")
      private Ticket ticket;
  
      @Column(name = "COMMENT1", nullable = false, length = 300)
      private String comment1;
  
  }
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>@Named("ticketBean")
  @Scope(value = "session", proxyMode = ScopedProxyMode.TARGET_CLASS)
  public class TicketBean implements Serializable
  {
   private Ticket ticket = new Ticket();
   private Comment comment = new Comment();
   /**
     * getters &amp; setters
         */
      public void editComment(long commentId) 
      {
          for (Comment editComment: ticket.getComment())
          {
              if ( editComment.getCommentId().longValue() == commentId)
              {
                  this.comment = editComment;
                  changeButtonValue("tabView:commentForm1:submitAddComment", "Save");             
                  break;
              }
          }
      }
  }
  </code></pre>
  
  <p><strong>XHTML</strong></p>
  
  <pre><code>   &lt;h:form prependId="false" id="commentForm1"&gt;
      &lt;p:panel id="panelComment"&gt;
      &lt;h:outputText value="#{ticketBean.comment.comment1}"/&gt;
      &lt;p:inputTextarea styleClass="textarea" value="#{ticketBean.comment.comment1}" 
                          rows="4" 
                      cols="60"
                      maxlength="255" 
                      counter="counter2"
                      counterTemplate="{0} characters remaining." 
                      id="comment1"
                      required="true"
                      requiredMessage="Comment is required"/&gt;
  &lt;br /&gt;
  &lt;h:outputText id="counter2" style="font-size:8pt;" /&gt;
  &lt;p:commandButton id="submitAddComment" value="Add" 
  actionListener="#{ticketBean.addComment()}"
                                           ajax="true"
                                           style="font-size:11pt;" process="panelComment"
                                           update=":tabView:commentForm1" /&gt;
  
  &lt;p:dataTable id="ticketCommentsList" var="com"
           value="#{ticketBean.ticket.comments.toArray()}"
           paginator="true" dynamic="true" rows="10"
           paginatorPosition="bottom" lazy="true"
           paginatorAlwaysVisible="false" widgetVar="projTable"
           paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
                                  rowsPerPageTemplate="10,15,20" styleClass="prime-datatable"&gt;
  
      &lt;p:column id="comment1" headerText="Comment"&gt;
              &lt;h:outputText value="#{com.comment1}" /&gt;
          &lt;/p:column&gt;                             
      &lt;p:column&gt;
         &lt;f:facet name="header"&gt;Edit&lt;/f:facet&gt;
      &lt;p:commandLink  action="#{ticketBean.editComment(com.commentId)}"                                               
                          ajax="true" value="Edit" 
                          update=":tabView:commentForm1" 
                          immediate="true"/&gt;
           &lt;/p:column&gt;
      &lt;/p:dataTable&gt;
  &lt;/p:panel&gt;  
  &lt;/h:form&gt;
  </code></pre>
  
  <p>why would <code>&lt;h:outputText  value="#{ticketBean.comment.comment1}"/&gt;</code> print out the value but
          <code>&lt;p:inputTextarea value="#{ticketBean.comment.comment1}"/&gt;</code> not show the value?</p>
  
  <p>Thanks for your help. </p>