1

Please help me !I writing JSF page, which requires users to click at least on a one checkbox. And I am using rich:tree and jbpm. And user can select just child nodes. I have to validate for null and if user didn't select any checkboxes show alert . I have following code in place:

<rich:panel id="treePanel" styleClass="theme6 rich-panel-header-off">
    <rich:tree id="tree" ajaxSubmitSelection="true" switchType="client" value="#{lastCategoryManager.makeCategoryTree()}" var="node">

        <rich:treeNode>
            <h:selectBooleanCheckbox value="#{ vars['categorySelection'].selection} }" rendered="#{lastCategoryManager.lookForChild(node)}">
                <h:outputText value="#{node}" style="padding-left:5px" />
        </rich:treeNode>

    </rich:tree>
</rich:panel>
Tiny
  • 27,221
  • 105
  • 339
  • 599
  • 1
    One of the drawbacks of JSF-2 is the lack to declare multiple component validation. It's [actually possible](http://stackoverflow.com/questions/3478133/jsf-validate-two-fields-in-one-time) to access other components inside one's validator. You could also solve it checking the values in your action method and adding a custom error message if the selection is wrong. – Aritz Jul 26 '14 at 12:41

0 Answers0