jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Waffle
  • WAFFLE-102

Validator method can't be found if action method contains MessagesContext

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Not A Bug
  • Affects Version/s: None
  • Fix Version/s: 1.3
  • Component/s: Core
  • Labels:
    None

Description

I have:
register("login",LoginController.class);
register("loginValidator",LoginControllerValidator.class);

public class LoginControllerValidator {
public void forgotPassword(final ErrorsContext errors, final String email) {...}
}

When I don't have MessagesContext in action method validation method is called normally

@PRG(false)
public void forgotPassword(final String email) {...}

If I put MessagesContext in action method validation method is never called

@PRG(false)
public void forgotPassword(final MessagesContext mctx, final String email) {...}

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Gleb Mazursky added a comment - 14/Mar/10 7:34 AM

hmm, i'm not sure but maybe it has sense in the rare case when validator method needs to output "messages" together with "errors"...

Show
Gleb Mazursky added a comment - 14/Mar/10 7:34 AM hmm, i'm not sure but maybe it has sense in the rare case when validator method needs to output "messages" together with "errors"...
Hide
Permalink
Michael Ward added a comment - 16/Mar/10 9:52 AM

I believe the validator would expect the action method signature to be:

public void forgotPassword(final String email)

Have you tried updating the LoginControllerValidtor method to be:

public void forgotPassword(final ErrorsContext errors, final MessagesContext mctx, final String email)

--Mike

Show
Michael Ward added a comment - 16/Mar/10 9:52 AM I believe the validator would expect the action method signature to be: public void forgotPassword(final String email) Have you tried updating the LoginControllerValidtor method to be: public void forgotPassword(final ErrorsContext errors, final MessagesContext mctx, final String email) --Mike
Hide
Permalink
Gleb Mazursky added a comment - 16/Mar/10 4:58 PM

yes, it's working fine with forgotPassword(final ErrorsContext errors, final MessagesContext mctx, final String email)

I think it does not require fixing

Show
Gleb Mazursky added a comment - 16/Mar/10 4:58 PM yes, it's working fine with forgotPassword(final ErrorsContext errors, final MessagesContext mctx, final String email) I think it does not require fixing

People

  • Assignee:
    Michael Ward
    Reporter:
    Gleb Mazursky
Vote (0)
Watch (0)

Dates

  • Created:
    14/Mar/10 6:39 AM
    Updated:
    16/Mar/10 4:59 PM
    Resolved:
    16/Mar/10 4:59 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.