Hi,
I have rich:modalPanel with one text box in it and I want to use the same modalPanel for both adding new value and renaming nodes in the tree. In the first situation when user clicks on the Add button, modal panel will contain no text in the text box. In the second situation when users selects the node in the tree and clicks on the Rename button, modal panel will present currently selected node's name. When user clicks on the OK button in the modalPanel, save action on the server should be invoked.
My problem is that I don't know how to recognize on the server in which situation modalPanel was is used. In my code I have:
<h:graphicImage value="/images/add.gif" alt="#{msg.AddNode}" onclick="positionAndOpenModal()"> <a4j:support event="onclick" actionListener="#{bean.addNodeClicked}"/> </h:graphicImage> <h:graphicImage value="/images/rename.gif" alt="#{msg.RenameNode}" onclick="positionAndOpenModal()"> <a4j:support event="onclick" actionListener="#{bean.renameNodeClicked}"/> </h:graphicImage>