Is it possible to update child components of a composite component just by specifying the parent composite ID? E.g. if I have:
<composite:interface>
    <composite:attribute name="value" type="..." required="true"/>
</composite:interface>
<composite:implementation>
    <p:treeTable id="main-tree" ...>
        ...
    </p:treeTable>
</composite:implementation>
and to use it somehow like this:
<my:comp id="composite-component" />
...
<p:ajax update="composite-component" />
Is that possible? Right now the only way I see is to specify the child component ID explicitly:
<p:ajax update="composite-component:main-tree" />
                This can be done by wrapping  a <div> around your composite components implementation and set the div's id=#{cc.clientId}:
<html ...>
    <composite:interface>
       ...
    </composite:interface>
    <composite:implementation>
      <div id="#{cc.clientId}">
        ...
      </div>
    </composite:implementation>    
</html>
And in the using page:
<my:comp id="composite-component" />
....
<h:commandButton value="Update first name">
   <f:ajax execute="composite-component" render="composite-component">
</h:commandButton>
The <p:ajax>should work accordingly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With