Hi,

I have a problem with my wicket application.
I get the following error:

"WicketMessage: Unable to find component with id 'home' in [NavomaticBorder
[Component id = navomaticBorder]]. This means that you declared
wicket:id=home in your markup, but that you either did not add the component
to your page at all, or that the hierarchy does not match."

But I think that I added the component.

my Markup:

<html xmlns:wicket="http://wicket.apache.org/";>
<head>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<wicket:border>
        <table align="center">
                <tr>
                        <!-- Row 1 Logo/Banner -->
                        <td id="banner" colspan="2">Fußballverein DLRG</td>
                </tr>
                <!-- Row 2 Navigation-->
                <tr>
                        <td id="navigation" colspan="2">
                                 Home 
                                 Termine 
                                 Mitglieder 
                                 Mitglied werden 
                                 Spiel vereinbaren 
                                 Admin 
                        </td>
                </tr>
                <!-- Row 3  Login/MainPage-->
                <tr>
                        <!--Login-->
                        <td id="login">
                        <h1>Login</h1>
                        <div wicket:id="feedback"></div>
                        <form wicket:id="form">
                        <table>
                                <tr>
                                        <td>EMail</td>
                                        <td><input wicket:id="EMail"></td>
                                </tr>
                                <tr>
                                        <td>Passwort</td>
                                        <td><input wicket:id="Password" 
type="password"></td>
                                </tr>
                                <tr>
                                        <td colspan="2">
                                        <button>Anmelden</button>
                                        </td>
                                </tr>
                        </table>
                        </form>
                        </td>
                        <!--MainPage-->
                        <td id="main">
                        <p>test Border on <wicket:body /></p>
                        </td>
                </tr>
                <!-- Row 4 Footer-->
                <tr>
                        <td id="footer" colspan="2">created by Julian von den 
Busch</td>
                </tr>
        </table>
</wicket:border>
</body>
</html>


My Page:

public class NavomaticBorder extends Border {

        /**
         * Constructor
         * 
         * @param id
         *            The id of this component
         */
        public NavomaticBorder(final String id) {
                super(id);

                add(new BookmarkablePageLink<Home>("home", Home.class));
                add(new BookmarkablePageLink<Termine>("termine", 
Termine.class));
                add(new BookmarkablePageLink<Mitglieder>("mitglieder", 
Mitglieder.class));
                add(new BookmarkablePageLink<Mitgliedwerden>("mitgliedwerden",
                                Mitgliedwerden.class));
                add(new 
BookmarkablePageLink<Spielvereinbaren>("spielvereinbaren",
                                Spielvereinbaren.class));
                add(new BookmarkablePageLink<Admin>("admin", Admin.class));

                add(new FeedbackPanel("feedback"));

                Form<LoginBean> form = new Form<LoginBean>("form",
                                new CompoundPropertyModel<LoginBean>(new 
LoginBean())) {
                        @Override
                        protected void onSubmit() {
                                LoginBean loginBean = getModel().getObject();
                                User user = 
LoginManager.getUserByEmail(loginBean.eMail);
                                if (user != null) {
                                        if 
(user.isPasswordValid(loginBean.getPassword())) {
                                                
SecurePageSession.get().setUser(user);
                                                if 
(!continueToOriginalDestination()) {
                                                        
setResponsePage(WicketApplication.get()
                                                                        
.getHomePage());
                                                }
                                        } else
                                                error("EMail oder Passwort 
falsch (Passwort natürlich)");
                                } else
                                        error("EMail oder Passwort falsch 
(EMail natürlich)");
                        }
                };
                form.add(new TextField<String>("EMail").setRequired(true));
                form.add(new PasswordTextField("Password"));
                add(form);
        }
}

I hope you can help me to figure out what´s wrong.

regards JayJay
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicketNewbee-Unable-to-finde-Component-with-ID-tp3043334p3043334.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to