[RichFaces]rich:tree/contextmenu et rafraichissement de page
J'ai un composant rich:tree dans lequel j'attache un menu contextuel sur un des noeuds.
Le click sur le menu contextuel doit m'afficher une fenêtre modale.
Le code ci-dessous fonctionne sauf que la page est rafraichie et donc la fenêtre modale apparait puis disparait.
Si quelqu'un a une idée, je suis preneur.
Merci.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
<rich:simpleTogglePanel switchType="ajax" styleClass="tree">
<h:form>
<rich:tree switchType="ajax" id="structureDossier-tree-indemnisation"
adviseNodeOpened="#{structureDossierIndemnisation.isNodeExpandedByDefault}" toggleOnClick="true">
<rich:recursiveTreeNodesAdaptor roots="#{structureDossierIndemnisation.sourceRoots}" var="node"
nodes="#{node.children}">
<rich:treeNode icon="#{node.icon}" iconLeaf="#{node.icon}">
<h:outputText value="#{node.label}" id="nodeLabel" />
<span><h:outputText value="#{node.childCount}" rendered="#{node.displayChildCount}" /></span>
<span><h:outputText value="[#{node.status}]" rendered="#{node.status !='' and node.status !=null}" /></span>
<rich:contextMenu id="structureDossier-tree-indemnisation-contextMenu" event="oncontextmenu" attachTo="nodeLabel">
<rich:menuItem id="creerIndemnisationLink" value="#{resourceBundle['contextMenu.creerIndemnisation']}"
rendered="#{node.identifiant eq 'indemnisationsTreeNode'}" >
<rich:componentControl for="addIndemnisationPanel" attachTo="creerIndemnisationLink" operation="show"
event="onclick" />
</rich:menuItem>
</rich:contextMenu>
</rich:treeNode>
</rich:recursiveTreeNodesAdaptor>
</rich:tree>
</h:form>
</rich:simpleTogglePanel> |