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

  • Home
  • SEARCH
  • 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 7973745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:11:35+00:00 2026-06-04T08:11:35+00:00

I have some logic in onSubmit of the button (which is in Form), which

  • 0

I have some logic in onSubmit of the button (which is in Form), which may fail, so I would like to show a message using error(myMessage). But it doesn’t work, and it seems that it is normal:

Feedback panel added but does not show all messages

Is there any possibility to render feedback panels with errors reported in onSubmit?

There is no ajax used on the page. I am using wicket 1.5.6

EDIT:

MyPage.java

public class MyPage extends WebPage {

    private static final Logger logger = Logger.getLogger(MyPage.class);
    private static final long serialVersionUID = -8874964120018036584L;

    public MyPage(PageParameters parameters) {
        super(parameters);
        logger.debug("Creating new login page");

        add(new MyLoginForm("loginForm"));
    }
}

MyLoginForm.java

public class MyLoginForm extends StatelessForm<Void> {

    private static final Logger logger = Logger.getLogger(MyLoginForm.class);
    private static final long serialVersionUID = -8694389090804630170L;
    private MyUser user = new MyUser();

    public MyLoginForm(String id) {
        super(id);
        setOutputMarkupId(true);
        logger.debug("Creating new stateless login form");

        add(new RequiredTextField<String>("login", new PropertyModel<String>(user, "login")));
        add(new PasswordTextField("password", new PropertyModel<String>(user, "password")));
        add(new Button("submit"));
        add(new FeedbackPanel("feedback"));
    }

    @Override
    public void onSubmit() {
        info("test info");
    }
}

MyPage.html

<body>
    <form wicket:id="loginForm">
        <fieldset>
            <legend><wicket:message key="form.login.legend"/></legend>
            <input type="text" wicket:id="login" />
            <input type="password" wicket:id="password" />
            <input type="submit" wicket:id="submit" />
            <span wicket:id="feedback"></span>
        </fieldset>
    </form>
</body>

catalina.out

16 May 2012 15:24:20:860 WARN  [http-8080-2] [WebSession:135] Component-targetted feedback message was left unrendered. This could be because you are missing a FeedbackPanel on the page.  Message: [FeedbackMessage message = "test info", reporter = loginForm, level = INFO]

The same happens when I try to overwrite the onSubmit method in Button instead of the one in MyLoginForm…

  • 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-04T08:11:37+00:00Added an answer on June 4, 2026 at 8:11 am

    You need to add a FeedbackPanel to your Page. Feedback messages ‘bubble’ up in the component hierarchie. The easiest way is to have one feedbackpanel on your page.

    But, you can also display errors close to the FormComponent that reports the error. See this pdf for inspiration or for a possible implementation.

    Edit: I just build a very simple test, using the wicket quickstart. Changed the HomePage as below and it worked (I saw all error / info messages)

    html:

    <form wicket:id="form">
                <div wicket:id="feedback"></div>
                <input wicket:id="submit" type="button" value="submit">
    
    </form>
    

    Java:

    Form<Void> form = new Form<Void>("form") {
            @Override
            protected void onSubmit() {
                super.onSubmit();
                error("test error from form");
                error("test info from form");
            }
        };
        add(form);
        form.add(new FeedbackPanel("feedback"));
        form.add(new SubmitLink("submit") {
            @Override
            public void onSubmit() {
                super.onSubmit();
                error("an error occurred in button submit");
                info("test info from the button");
            }
        });
    

    Edit 2: It turns out, that a StatelessForm is used (I overlooked that detail). Switching back to (normal) Form, the messages should be displayed correctly.

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

Sidebar

Related Questions

I am using MVC3, and have some logic for changing the culture which all
I have some logic which I am using to construct a series of clusters.
I have some logic, which defines and uses some user-defined types, like these: class
I have some logic that I would like to store as an integer. I
I have a situation like below in which I have some problem in freeing
In a site navigation bar, I have some logic that determines which page the
I have web form in which I have to make sure that 'SUBMIT' button
I have realized some logic using integers import java.util.concurrent.locks.*; public class MassageSalon implements Salon{
I have a registration page and would like to perform some validation (in addition
I have some PLSQL code which loops through some logic: FOR I in cur1

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.