You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cagataycivici
changed the title
To submit possible without any selected element on treeTable with selection and required
TreeTable required selection validation problem
Feb 12, 2016
Reported by Pro User;
I can submit a p:treeTable which is selectable and required with an empty selection.
Examplecode - modified from Showcase-Example
<h:panelGrid columns="1" cellpadding="5" id="myPanelGrid"> <p:message for="testTreeTable" /> <p:treeTable id="testTreeTable" value="#{ttSelectionView.root1}" var="document" required="true" selectionMode="single" selection="#{ttSelectionView.selectedNode}"> <p:column headerText="Name"> <h:outputText value="#{document.name}" /> </p:column> <p:column headerText="Size"> <h:outputText value="#{document.size}" /> </p:column> <p:column headerText="Type"> <h:outputText value="#{document.type}" /> </p:column> </p:treeTable> <p:separator/> <p:outputLabel value="selectedNode: #{ttSelectionView.selectedNode}"/> </h:panelGrid> <p:commandButton update="myPanelGrid" process="myPanelGrid" value="Submit" />
Steps to reproduce:
=> now we see the empty selection is stored in the backend
=> Now we see the Required-Error-Message
The text was updated successfully, but these errors were encountered: