Uploaded image for project: 'Spring Tool Suite'
  1. Spring Tool Suite
  2. STS-2711

update.jspx (roo, mvc) does not pass password field value into the class member

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: ROO
    • Labels:
    • Environment:
      Ubuntu 12.04 64-bit, STS 2.9.2, Roo 1.2.1.RELEASE

      Description

      I added a password confirmation field into the User.java, corresponding field in create.jspx and update.jspx. I'd like to perform some password encryption before storing password in a database, so I added a @PrePersist @PreUpdate method in this class. When I add user (create.jspx), everything is ok. When I change user (update.jspx), form returns empty string instead of the entered not-empty confirmation field value. The same problem is with usual(non-password) text field.

      User.java:
      ...
      @Transient
      private String newPasswd2 = "";

      public String getNewPasswd2()

      { return newPasswd2; }

      public void setNewPasswd2(String newPasswd2)

      { this.newPasswd2 = newPasswd2; }

      @PrePersist
      @PreUpdate
      protected void encryptPassword() {
      String pwd = this.getPwd(), pwd2 = this.getNewPasswd2(); // HERE pwd2 is EMPTY !
      ...

      create.jspx:
      <field:input field="newPasswd2" id="xxx_newPasswd2" required="true" type="password" z=""/>

      update.jspx
      <field:input field="newPasswd2" id="xxx_newPasswd2" required="true" type="password" z=""/>

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              golfp-96 Dmitry
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1d
                1d
                Remaining:
                Remaining Estimate - 1d
                1d
                Logged:
                Time Spent - Not Specified
                Not Specified