Manter a arvore aberta - tree do richfaces - a missao!

1 resposta
lblanco

Salve Salve, galera !!!

Tenho uma tree no richfaces que está da seguinte forma:

<r:tree id="treeMenu" style="width:300px" reRender="selectedNode" ajaxSubmitSelection="true" switchType="client" nodeSelectListener="#{asController.processSelection}" value="#{asController.tree}" var="tree"> <r:treeNode> <h:commandLink action="#{asController.callOper}"> <h:outputText value="#{tree}"/> </h:commandLink> </r:treeNode> </r:tree>

O problema é que sempre que volto para a página em questão , ela está toda fechada. Tem como deixar ela aberta ? Usei os parametros preserveDataInRequest e
preserveModel mas de nada adiantou.

Obrigado.

1 Resposta

lblanco

Rapaziada , problema resolvido.

No meu managed-bean criei o seguinte atributo:

private TreeState treeState       = null;

logo em seguida criei os get e o set dele.

Aí mudei a minha arvore para…

<r:tree id="treeMenu"
                                    style="width:300px"
                                    switchType="client"
                                    nodeSelectListener="#{asController.processSelection}"
                                    value="#{asController.tree}"
                                    preserveModel="state"
                                    ajaxSingle="true"
                                    componentState="#{asController.treeState}"
                                    var="tree">
Criado 15 de junho de 2008
Ultima resposta 20 de jun. de 2008
Respostas 1
Participantes 1