Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7937473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:32:02+00:00 2026-06-03T22:32:02+00:00

I currently have the following problem with Apache Tapestry 5.3.1: The user should be

  • 0

I currently have the following problem with Apache Tapestry 5.3.1:
The user should be able to edit his profile details and to change his password.
For the data there is a “User” entity.

I cannot use the getPassword method of user, as passwords are stored encrypted with a salt that always changes (using Apache Tynamo). As a result, I am trying to store the values in two page properties called passwordValue1 and passwordValue2 and use the rest of the bean.
On validations both passwordValue fields are null, even if I typed something and then submitted the form.
Any ideas why?

        <t:beaneditform object="currentUserInfo" add="password1,password2" t:id="registerForm"
            exclude="username,password,accountLocked,credentialsExpired">
            <p:password1>
                <t:label for="password1" >Passwort</t:label>
                <t:passwordfield t:id="password1" value="passwordValue1" validate="password"/>
            </p:password1>
            <p:password2>
                <t:label for="password2" >Passwort wiederholen</t:label>
                <t:passwordfield t:id="password2" value="passwordValue2" validate="password"/>
            </p:password2>

        </t:beaneditform>

The java code for the tapestry page:

@RequiresUser
public class UserDetails {

@InjectPage
private Index index;

@Inject
UserUtility userUtil;

@Inject
private Session session;

@Inject
@Property
@SessionState(create = false)
private User currentUserInfo; //value is set

@Component(id="password1")
private PasswordField password1;

@Component(id="password2")
private PasswordField password2;

@Property
private String passwordValue2;

@Property
private String passwordValue1;

@InjectComponent
private BeanEditForm registerForm;

    //...snip....

void onValidate() {
    System.out.println("onvalidate");
    if (registerForm.getHasErrors()) {
        return;
    }
            // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            // both passwordValue1 and passwordValue 2 are null here
    if ((passwordValue1 == null && !("".equals(passwordValue1)) 
            || !passwordValue1.equals(passwordValue2))) {
        registerForm.recordError(password1, "Passwords must match");
        registerForm.recordError(password2, "Passwords must match");
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T22:32:03+00:00Added an answer on June 3, 2026 at 10:32 pm

    Your validation method does not specify what you want to validate.
    Rename the method to onValidateFromRegisterForm

    Explanation:
    Every field also triggers a validate event, so it gets called for each field. Those validations are triggered right after a field is set.
    So when the first field is set, the onValidate is called and it checks BOTH fields but of course, all the other fields were not set yet and fail the validation.

    This might help: What is called when on the jumpstart page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following problem using subversion: I'm currently working on the trunk of
I have the following problem: I have a form in site/banen (currently local running
I am currently working on Problem 62 I have tried the following code to
I am currently struggling with the following problem. I have successfully installed Apache2 and
I have currently the following problem: The footers width gets smaller as soon as
I have currently the following problem. I have a directory structure like root -
The following code summarizes the problem I have at the moment. My current execution
I currently have the following table definition: <table border=1 cellspacing=0 bordercolor=#CEDFEF cellpadding=1> I am
I currently have the following CSS for my 4 columns which might grow to
I currently have the following row in my table: course_data: user_id days <-- This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.