I am new to JSF and need to convert a Swing project into JSF. The screen of the Swing GUI is in 2 parts. The left side has a tree menu and the right side is created dynamically depending on the selected tree menu item. I have implemented the tree menu but need help with creating right panel dynamically.
The treenodes have context menus, here is an example of one:
<p:contextMenu for="treeSingle" nodeType="xxxx">
<p:menuitem value="menu 1" actionListener="#{treeManagedBean.menu1selected}"/>
</p:contextMenu>
The menu1selected function in treeManagedBean is correctly called.
The right part of the screen is currently only:
<p:layoutUnit position="center">
</p:layoutUnit>
How can I create a panel and contents in java when a tree node is selected - i.e. what do I need to put in menu1selected function to erase existing contents and create new contents. The contents may be a table, some buttons, labels etc.