Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TreeTable required selection validation problem #1091

Closed
mertsincan opened this issue Feb 1, 2016 · 0 comments
Closed

TreeTable required selection validation problem #1091

mertsincan opened this issue Feb 1, 2016 · 0 comments
Labels
5.2.20 5.3.7 🐞 defect Bug...Something isn't working
Milestone

Comments

@mertsincan
Copy link
Member

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:

  1. Select an entry and press submit
  2. deselect the entry and press submit
    => now we see the empty selection is stored in the backend
  3. press submit again
    => Now we see the Required-Error-Message
@mertsincan mertsincan added 🐞 defect Bug...Something isn't working 5.2.20 5.3.7 labels Feb 1, 2016
@mertsincan mertsincan added this to the 6.0 milestone Feb 1, 2016
@cagataycivici 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.2.20 5.3.7 🐞 defect Bug...Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant