So here is a problem I was running into, I usually use rich:modalpanel just to display some data to the user, but the other day I needed to collect some input. After happily submitting my page all the submitted values were null, what the hell. After some research here are my conclusions on this problem.
We need to put “form” elements inside the modalPanel in order for this to work, and make sure that the ui:insert in our template is not nested within out top form.
Reason for this is because of where modalpanel is appended to the DOM, that is also a reason why we have a4j:form inside the panel.
Solution 2 : Expanding only nodes that meet our criteria
try {
final TreeState state = (TreeState) sampleTreeBinding.getComponentState();
sampleTreeBinding.walk(FacesContext.getCurrentInstance(), new DataVisitor(){
@SuppressWarnings("unchecked")
public void process(FacesContext context, Object rowKey, Object argument)
throws IOException {
TreeRowKey
Here we are only expanding nodes at depth 1 but it could be anything. Idea is that we are walking the tree
and checking if we are interested in the doing something with that node if so then we can modify it here.