[ https://issues.apache.org/jira/browse/WICKET-4544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271322#comment-13271322 ]
Martin Grigorov commented on WICKET-4544: ----------------------------------------- Do you say that a non-submitting component like AjaxFallbackLink did the job in 1.5.x ? You need a submitting component to actually submit the values of the form components. The NullPointerException is in your code so I don't think this is Wicket's problem. The feedback message's component is null-ified at the end of the request to prevent OutOfMemoryError. This is since WICKET-2384 (early days of 1.4.x branch). If you still think there is a problem in Wicket please create a quickstart app and attach it to this ticket and we will reopen it. > FeedbackMessage.getReporter() returns null at accept(final FeedbackMessage > message) overriding > ---------------------------------------------------------------------------------------------- > > Key: WICKET-4544 > URL: https://issues.apache.org/jira/browse/WICKET-4544 > Project: Wicket > Issue Type: Bug > Components: wicket > Affects Versions: 6.0.0-beta1 > Reporter: Alexander > Labels: FeedbackMessage.getReporter > > After migratin from 1.5.5 to 6 beta I've got a nullpointerExc. trying to > execute feadback message filter. > That is my code: > public final class SignInForm extends Form > { > private final ValueMap properties = new ValueMap(); > final FeedbackPanel feedback = new FeedbackPanel("loginfeedback" > , new IFeedbackMessageFilter() > { > public boolean accept(final FeedbackMessage message) { > if(SignInForm.this==message.getReporter()) > return true; > else return "loginForm".equals(message.getReporter().getId()); > } > } > ); > AjaxFallbackLink loginButton = new AjaxFallbackLink("loginbutton") > { > @Override > public void onClick(AjaxRequestTarget target) { > if (target != null) { > process(null); > } > } > }; > public SignInForm(final String id) > { > super(id); > add(feedback); > TextField<String> loginField= new TextField<String>("login", new > PropertyModel<String>(properties, "username")); > TextField passwordField= new PasswordTextField("password", new > PropertyModel<String>(properties, "password")); > loginField.setRequired(true); > add(new Label("lll",(new ResourceModel("LoginPanel.login")))); > add(loginField); > passwordField.setRequired(true); > add(new Label("lpl", new ResourceModel("LoginPanel.password"))); > add(passwordField); > add(loginButton); > } > @Override > public final void onSubmit() > { > super.onSubmit(); > SignInSession session = (SignInSession)getPage().getSession(); > // Sign the user in > if (session.authenticate(properties.getString("username"), > properties.getString("password"))) > { > if (session.getUser() != null > && (session.getUser().getRole()==3)) > setResponsePage(ValidationPage.class); > else > setResponsePage(MasterPage.class); > } > else > { > // final String errmsg = > getLocalizer().getString("loginError", this, "Unable to sign you in"); > error("Unable to sign you in"); > // continueToOriginalDestination(); > } > } > } -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira