You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by JayJay <j....@gmail.com> on 2010/11/05 20:12:38 UTC

navomatic example doesnt´t work

Hi,

I´m new to wicket and i tried out the navomatic example.
I just copied the code to my eclipse engine but it didn´t work.
I got the following error:
WicketMessage: Unable to find component with id 'navigationBorder' in
[NavomaticBorder [Component id = navomaticBorder]]. This means that you
declared wicket:id=navigationBorder 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 in the NavomaticBorder.java constructor looks like that:

        public NavomaticBorder(final String id)
        {
                super(id);
                add(new BoxBorder("navigationBorder"));
                add(new BoxBorder("bodyBorder"));
        }

Can anyone help me please.
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/navomatic-example-doesnt-t-work-tp3029232p3029232.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: navomatic example doesnt´t work

Posted by Martin Grigorov <mg...@apache.org>.
Fixed with r1196632. Will be updated on the site soon
Thanks.

On Wed, Nov 2, 2011 at 4:03 PM, jjg <jj...@gmail.com> wrote:
> I am new to Wicket and had the same
> issue.(http://wicket.apache.org/learn/examples/navomatic.html)
> Updated the code to addToBorder(), and it started working. <smiley
> image='smiley_beam.gif
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/navomatic-example-doesnt-t-work-tp3029232p3973360.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: navomatic example doesnt´t work

Posted by jjg <jj...@gmail.com>.
I am new to Wicket and had the same
issue.(http://wicket.apache.org/learn/examples/navomatic.html)
Updated the code to addToBorder(), and it started working. <smiley
image='smiley_beam.gif



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/navomatic-example-doesnt-t-work-tp3029232p3973360.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: navomatic example doesnt´t work

Posted by jsturnbull <js...@hotmail.com>.
Hello, 

I encountered the same problem. I found using addToBorder rather than add
fixed it though: 

        public NavomaticBorder(final String id) 
        { 
                super(id); 
                addToBorder(new BoxBorder("navigationBorder")); 
                addToBorder(new BoxBorder("bodyBorder")); 
        }

I am using version 1.5
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/navomatic-example-doesnt-t-work-tp3029232p3061760.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: navomatic example doesnt´t work

Posted by Igor Vaynberg <ig...@gmail.com>.
your page markup does not contain a tag with
wicket:id="navomaticBorder", also your border does not contain a tag
with wicket:id="bodyBorder"

-igor

On Sat, Nov 6, 2010 at 12:59 AM, JayJay <j....@gmail.com> wrote:
>
> I´m using version 1.4.13
>
> NavomaticApplication.java:
>
> public class NavomaticApplication extends WebApplication
> {
>        /**
>         * Constructor.
>         */
>        public NavomaticApplication()
>        {
>        }
>
>        /**
>         * @see org.apache.wicket.Application#getHomePage()
>         */
>        @Override
>        public Class< ? extends Page> getHomePage()
>        {
>                return Page1.class;
>        }
>
>
> }
>
> NavomaticBorder.html:
>
> <html xmlns:wicket="http://wicket.apache.org/">
> <head>
> <title>Wicket Examples - navomatic</title>
> <link rel="stylesheet" type="text/css" href="style.css" />
> </head>
> <body>
> <wicket:border>
>        <p>
>        <table height="100%">
>                <tr>
>                        <td height="100%" valign="top">
>                        <div wicket:id="navigationBorder">Navigation Links
>                        <p><wicket:link>
>                                 Page1.html Page1
>                                <br />
>                                 Page2.html Page2
>                                <br />
>                                 Page3.html Page3
>                        </wicket:link></p>
>                        </div>
>                        </td>
>                        <td valign="top"> <wicket:body />
>                        </td>
>                </tr>
>        </table>
>        </p>
> </wicket:border>
> </body>
> </html>
>
> WicketBorder.java:
>
> public class NavomaticBorder extends Border
> {
>
>        /**
>         * Constructor
>         *
>         * @param id
>         *            The id of this component
>         */
>        public NavomaticBorder(final String id)
>        {
>                super(id);
>                add(new BoxBorder("navigationBorder"));
>                add(new BoxBorder("bodyBorder"));
>        }
> }
>
> Page1.html:
>
> <html xmlns:wicket="http://wicket.apache.org/">
> <head>
>    <title>Wicket Examples - navomatic</title>
>    <link rel="stylesheet" type="text/css" href="style.css"/>
> </head>
> <body>
>
>                <div style = "width:250px">
>                <center><h3>Page 1</h3></center>
>                Welcome to Navomatic.  The navigation links on the left
>                will allow you to navigate between three pages.  Notice that the current
> page
>                (Page1) is displayed in the "Navigation Links" area as italicized text,
>                while the other pages are displayed as clickable links.  Go ahead
>                and click the "Page2" link now.
>                </div>
>
> </body>
> </html>
>
> Page1.java:
>
> public class Page1 extends WebPage
> {
>        /**
>         * Constructor
>         */
>        public Page1()
>        {
>                add(new NavomaticBorder("navomaticBorder"));
>        }
> }
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/navomatic-example-doesnt-t-work-tp3029232p3029763.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: navomatic example doesnt´t work

Posted by JayJay <j....@gmail.com>.
I´m using version 1.4.13

NavomaticApplication.java:

public class NavomaticApplication extends WebApplication
{
	/**
	 * Constructor.
	 */
	public NavomaticApplication()
	{
	}

	/**
	 * @see org.apache.wicket.Application#getHomePage()
	 */
	@Override
	public Class< ? extends Page> getHomePage()
	{
		return Page1.class;
	}


}

NavomaticBorder.html:

<html xmlns:wicket="http://wicket.apache.org/">
<head>
<title>Wicket Examples - navomatic</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<wicket:border>
	<p>
	<table height="100%">
		<tr>
			<td height="100%" valign="top">
			<div wicket:id="navigationBorder">Navigation Links
			<p><wicket:link>
				 Page1.html Page1 
				<br />
				 Page2.html Page2 
				<br />
				 Page3.html Page3 
			</wicket:link></p>
			</div>
			</td>
			<td valign="top"> <wicket:body />
			</td>
		</tr>
	</table>
	</p>
</wicket:border>
</body>
</html>

WicketBorder.java:

public class NavomaticBorder extends Border
{

	/**
	 * Constructor
	 * 
	 * @param id
	 *            The id of this component
	 */
	public NavomaticBorder(final String id)
	{
		super(id);
		add(new BoxBorder("navigationBorder"));
		add(new BoxBorder("bodyBorder"));
	}
}

Page1.html:

<html xmlns:wicket="http://wicket.apache.org/">
<head>
    <title>Wicket Examples - navomatic</title>
    <link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body>
    
		<div style = "width:250px">
		<center><h3>Page 1</h3></center>
		Welcome to Navomatic.  The navigation links on the left 
		will allow you to navigate between three pages.  Notice that the current
page 
		(Page1) is displayed in the "Navigation Links" area as italicized text, 
		while the other pages are displayed as clickable links.  Go ahead 
		and click the "Page2" link now.
		</div>
    
</body>
</html>

Page1.java:

public class Page1 extends WebPage
{
	/**
	 * Constructor
	 */
	public Page1()
	{
		add(new NavomaticBorder("navomaticBorder"));
	}
}



-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/navomatic-example-doesnt-t-work-tp3029232p3029763.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: navomatic example doesnt´t work

Posted by Igor Vaynberg <ig...@gmail.com>.
what version of wicket are you trying this with? and paste the
complete source and markup.

-igor

On Fri, Nov 5, 2010 at 12:12 PM, JayJay <j....@gmail.com> wrote:
>
> Hi,
>
> I´m new to wicket and i tried out the navomatic example.
> I just copied the code to my eclipse engine but it didn´t work.
> I got the following error:
> WicketMessage: Unable to find component with id 'navigationBorder' in
> [NavomaticBorder [Component id = navomaticBorder]]. This means that you
> declared wicket:id=navigationBorder 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 in the NavomaticBorder.java constructor looks like that:
>
>        public NavomaticBorder(final String id)
>        {
>                super(id);
>                add(new BoxBorder("navigationBorder"));
>                add(new BoxBorder("bodyBorder"));
>        }
>
> Can anyone help me please.
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/navomatic-example-doesnt-t-work-tp3029232p3029232.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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