jsf 2 - JSF - Rich Tree CheckBox -


i need regarding check box tree in jsf, have created jsf check box tree . selecting node tree select check boxes of child nodes , selecting check box of child node unselected parent node .

problem faced : after clearing check boxes, if tree collapsed , expanded , child tree nodes getting selected . snippet of xhtml :

            <rich:treenode type="market" iconcollapsed="#{marketzone.icon}" iconexpanded="#{marketzone.icon}" id="markettreeid"  >                 <h:selectbooleancheckbox id="selmarketid"  value="#{busermgt.markettreecheckmap[marketzone.id]}" onclick="selectallzonesformarket(this)">                 <a4j:ajax listener="#{busermgt.selectedmarketvalue}"/></h:selectbooleancheckbox>                  <h:outputtext  value="#{marketzone.name}" />            </rich:treenode>              <rich:treenode type="zone" iconcollapsed="#{marketzone.icon}" iconexpanded="#{marketzone.icon}" id="zonetreeid"  >                <h:selectbooleancheckbox id="selzoneid"  value="#{busermgt.zonetreecheckmap[marketzone.id]}" onclick="deselectallzonesformarket(this)" >                 <a4j:ajax listener="#{busermgt.selectedzonevalue}"/>                </h:selectbooleancheckbox>                 <h:outputtext  value="#{marketzone.name}"/>            </rich:treenode>                  </rich:tree> 

selectallzonesformarket() , deselectallzonesformarket() : javascript code function selecting , deselecting checkboxes

can please in letting me know missing? thanks.

use selectionmode="checkbox" in treetable working fine according requirement in prime faces. go throw link : http://www.primefaces.org/showcase/ui/treetablecheckbox.jsf


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -