As you will see in my post below I am new to Prime Faces, but so far I love it .
What I need atm. is to dinamically add some h:outputText-s and p:selectOneMenu-s to my h:panelGrid, when a value is chosen from a p:selectOneMenu. So far I declared the listener in the axaj to address a method im my bean where I shall handle the code. And here comes the hard part - I don't know how to add my newly created instances of SelectOneMenu to my PanelGrid, or to add my SelectItem to my SelectOneMenu. The same problem I will have with adding attributes to the controls etc. I understand that my question is probably something that cant be answered in one forum post..., I don't expect you to give me the answer, but a place where I can read it myself. I spend quite some time on browsing this forum and stackoverflow and google, but couldn't find my answers ... A snapshot of a part of code where you do such think will also be really useful.
Here is what i got so far:
Code: Select all
SelectOneMenu myMenu = new SelectOneMenu();
SelectItem myItem = new SelectItem();
PanelGrid myGrid = (PanelGrid)FacesContext.getCurrentInstance().getViewRoot().
findComponent(":ruleForm:ruleAccordion:inputRuleTab:inputRulePanel:ruleGrid");
Thanks for the help guys!.
Have a nice day.