Dear users and developers,
Is it legitimate to modify the component tree during a PPR request cycle?
This looks trivial, but I failed to get it work, am I missed anything?
The following code are executed during valueChangeListener.
CoreInputText text = new CoreInputText();
text.setSimple(true);
text.setImmediate(true);
getFileControlComponent().getChildren().add(text);
RequestContext rc = RequestContext.getCurrentInstance();
rc.addPartialTarget(getFileControlComponent());
Where getFileControlComponent() return a panelGroupLayout component.
The following is the corresponding tag snippets:
<tr:panelGroupLayout binding="#{documentPanel.fileControlComponent}">
<tr:inputFile
valueChangeListener="#{documentPanel.onFileUpload}"
simple="true"
immediate="true"
/>
</tr:panelGroupLayout>
<tr:commandLink text="Upload Now!"
id="upload"
immediate="true"
partialSubmit="true"
actionListener="#{documentPanel.upload}"/>
The following is the environment:
JSR RI 1.2_04-b16-p02
Facelets 1.1.12
Trinidad 1.2.1
Thanks!
Best regards,
Zarick