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

Update Faces 2.3 Bean Validation Application to Address Challenge 1715 #1768

Merged
merged 2 commits into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import java.io.Serializable;

@UserPassword
@UserPassword(groups = {UserPasswordValidatorGroup.class})
public class User implements Serializable {

private static final long serialVersionUID = 1L;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception, which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

package ee.jakarta.tck.faces.test.javaee8.validateWholeBean;

public interface UserPasswordValidatorGroup {

}
8 changes: 6 additions & 2 deletions tck/faces23/validateWholeBean/src/main/webapp/Issue4083.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,14 @@
<h:panelGrid columns="2">

<h:outputText value="Password" />
<h:inputSecret id="password1" value="#{backingBean.password1}"/>
<h:inputSecret id="password1" value="#{backingBean.password1}">
<f:validateBean validationGroups="ee.jakarta.tck.faces.test.javaee8.validateWholeBean.UserPasswordValidatorGroup" />
</h:inputSecret>

<h:outputText value="Password again" />
<h:inputSecret id="password2" value="#{backingBean.password2}"/>
<h:inputSecret id="password2" value="#{backingBean.password2}">
<f:validateBean validationGroups="ee.jakarta.tck.faces.test.javaee8.validateWholeBean.UserPasswordValidatorGroup" />
</h:inputSecret>

<h:commandButton id="submit" value="Submit"/>
</h:panelGrid>
Expand Down
12 changes: 9 additions & 3 deletions tck/faces23/validateWholeBean/src/main/webapp/Issue4313.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,23 @@
<h:panelGrid columns="2">

<h:outputText value="Password" />
<h:inputSecret id="password1" value="#{backingBean.user.password1}"/>
<h:inputSecret id="password1" value="#{backingBean.user.password1}">
<f:validateBean validationGroups="ee.jakarta.tck.faces.test.javaee8.validateWholeBean.UserPasswordValidatorGroup" />
</h:inputSecret>

<h:outputText value="Password again" />
<h:inputSecret id="password2" value="#{backingBean.user.password2}"/>
<h:inputSecret id="password2" value="#{backingBean.user.password2}">
<f:validateBean validationGroups="ee.jakarta.tck.faces.test.javaee8.validateWholeBean.UserPasswordValidatorGroup" />
</h:inputSecret>

<h:commandButton id="submit" value="Submit"/>
</h:panelGrid>

<h:messages id="err"/>

<f:validateWholeBean value="#{backingBean.user}" />
<f:validateWholeBean
value="#{backingBean.user}"
validationGroups="ee.jakarta.tck.faces.test.javaee8.validateWholeBean.UserPasswordValidatorGroup" />
</h:form>
</h:body>
</html>