title: How to realize rowToggle in primefaces 3.3?
body: <p>I'm now using primefaces 3.3, but this version doesn't support <code>event="rawToggle"</code> for datatable. So I chose to use the <code>onExpandStart</code> instead of <code>rowToggle</code>, but I met with another problem. Here I want to put another datatable as the expanded row, so everytime I toggle one row in <code>nodetable</code>, I need to pass the <code>nodeId</code> of that row to <code>backingbean</code> to get all the contents of that node. If I have <code>event="rowToggle</code>", I can do it without any problem! But if I use the attribute <code>onExpandStart</code> of the dataTable, I cannot get the <code>somenode.nodeId</code> in the <code>backingbean</code>, anyone knows how to solve it?
  I've also tried to put a hidden input tag <code>&lt;input type="hidden" name="hidden" value="#{somenode.nodeId}"/&gt;</code> inside the <code>rowToggler</code>, but the value I get in <code>backingbean</code> is null.
  Have been worked on it for several days, but still no ideas. Help please please please!</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;p:dataTable id="nodetable" value="#{nodeedit.list}" var="somenode"
               styleClass="datatable" editable="true" 
               onExpandStart="#{nodeedit.toggle(somenode.nodeId)}" &gt;
     &lt;p:ajax event="rowEdit" listener="#{nodeedit.save('node')}"/&gt;
  
         &lt;p:column style="width:4%"&gt;
            &lt;p:rowToggler&gt;
               &lt;h:form&gt;
                 &lt;input type="hidden" name="hidden" value="#{somenode.nodeId}"/&gt;
               &lt;/h:form&gt;
            &lt;/p:rowToggler&gt;
         &lt;/p:column&gt; 
  
         &lt;p:column&gt;
            &lt;f:facet name="header"&gt;ID&lt;/f:facet&gt;
               &lt;h:form&gt;
                  &lt;h:commandLink action="nodeedit"&gt;#{somenode.norder}&lt;/h:commandLink&gt;
               &lt;/h:form&gt;
         &lt;/p:column&gt;
  
         &lt;p:column headerText="Name"&gt;
             &lt;p:cellEditor&gt; 
                &lt;f:facet name="output"&gt; 
                  &lt;h:outputText value="#{somenode.title}" /&gt; 
                &lt;/f:facet&gt; 
                &lt;f:facet name="input"&gt; 
                   &lt;p:inputTextarea value="#{somenode.title}" style="width:100%"/&gt; 
                &lt;/f:facet&gt; 
             &lt;/p:cellEditor&gt; 
         &lt;/p:column&gt;
  
         &lt;p:column headerText="Edit" style="width:50px"&gt; 
             &lt;p:rowEditor /&gt; 
         &lt;/p:column&gt;
  
         &lt;p:rowExpansion&gt;
                 &lt;p:dataTable id="contentId" var="content" 
                              value="#{nodeedit.contents}" id="contents" editable="true"&gt; 
                    &lt;p:ajax event="rowEdit" listener="#{nodeedit.save('content')}"/&gt;
  
                    &lt;p:column headerText="Text" style="width:450px"&gt; 
                       &lt;p:cellEditor&gt; 
                          &lt;f:facet name="output"&gt; 
                              &lt;h:outputText value="#{content.text}" escape="false" /&gt; 
                          &lt;/f:facet&gt; 
                          &lt;f:facet name="input"&gt; 
                              &lt;p:inputTextarea value="#{content.text}" style="width:100%"/&gt; 
                          &lt;/f:facet&gt; 
                       &lt;/p:cellEditor&gt; 
                     &lt;/p:column&gt; 
  
                     &lt;p:column headerText="Edit" style="width:50px"&gt; 
                        &lt;p:rowEditor /&gt; 
                     &lt;/p:column&gt; 
  
            &lt;/p:dataTable&gt; 
         &lt;/p:rowExpansion&gt;
    &lt;/p:dataTable&gt;
  </code></pre>
  
  <p>I have also tried another way. The Content of a Node is also an object, in the Node Class I have defined </p>
  
  <pre class="lang-java prettyprint-override"><code>       List&lt;LibContent&gt; contents = new ArrayList&lt;LibContent&gt;();
  </code></pre>
  
  <p>so, like what siebzOr said, I wrote in my jsf something like:</p>
  
  <pre class="lang-xml prettyprint-override"><code>    &lt;p:rowExpansion&gt;
           &lt;p:dataTable var="content" value="#{somenode.content}"&gt;
  
              **&lt;p:ajax event="rowEdit" listener="#{nodeedit.save()}"/&gt;**
  
              &lt;p:column&gt;
                 &lt;h:outputText value="#{content.someValue}" /&gt;
              &lt;/p:column&gt;
  
              &lt;!-- Other columns --&gt;
  
           &lt;/p:dataTable&gt;
      &lt;/p:rowExpansion&gt;
  </code></pre>
  
  <p>and in backingbean nodeedit, I have</p>
  
  <pre class="lang-java prettyprint-override"><code>        public void save() {
              for (Content content : node.contents)
                    System.out.println("content.text");
          }
  </code></pre>
  
  <p>I found that the content.text never changed no matter what I did in the page. But if I define <code>List&lt;Content&gt; contents = new ArrayList&lt;Content&gt;()</code> directly in <code>nodeedit</code>, it can get the new value!! That's why I tried to get the <code>nodeId</code> everytime I toggle the node-table and then update the contents in <code>backingbean</code>. Did I do something wrong with it?  </p>