You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Marc Marc <ma...@mail.be> on 2012/04/15 08:47:21 UTC

Unable to find error during hello World

Hello,

I am a new user. I succeeded the quickstart but can not run the "Hello World"
example. I get the following error:
Unable to find component with id 'message' in [Page class =
com.modelandgo.HomePage, id = 0, render count = 1]	Expected: '.message'.

I searched in the mailing list but did not found the solution.
I add my simple code hereunder.

Thanks!
Marc
__________________________________________________

my application:
public class WicketApplication extends WebApplication
{    	
	@Override
	public Class<HomePage> getHomePage()
	{
		return HomePage.class;
	}

}

my page:
public class HomePage extends WebPage {
	private static final long serialVersionUID = 1L;

    public HomePage(final PageParameters parameters) {
    	
        add(new Label("message", "I am a newbie"));

    }
}

my html:
<!DOCTYPE html>
<html xmlns:wicket="http://wicket.apache.org">
	<body>
    	<span wicket:id="message">Message goes here</span>
	</body>
	
</html>


-----------------------------------------------------
Mail.be, WebMail and Virtual Office
http://www.mail.be

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


Re: Unable to find error during hello World

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

The code looks perfectly fine.
I just copy/pasted it and it prints the label without any error.

On Sun, Apr 15, 2012 at 9:47 AM, Marc Marc <ma...@mail.be> wrote:
> Hello,
>
> I am a new user. I succeeded the quickstart but can not run the "Hello World"
> example. I get the following error:
> Unable to find component with id 'message' in [Page class =
> com.modelandgo.HomePage, id = 0, render count = 1]      Expected: '.message'.
>
> I searched in the mailing list but did not found the solution.
> I add my simple code hereunder.
>
> Thanks!
> Marc
> __________________________________________________
>
> my application:
> public class WicketApplication extends WebApplication
> {
>        @Override
>        public Class<HomePage> getHomePage()
>        {
>                return HomePage.class;
>        }
>
> }
>
> my page:
> public class HomePage extends WebPage {
>        private static final long serialVersionUID = 1L;
>
>    public HomePage(final PageParameters parameters) {
>
>        add(new Label("message", "I am a newbie"));
>
>    }
> }
>
> my html:
> <!DOCTYPE html>
> <html xmlns:wicket="http://wicket.apache.org">
>        <body>
>        <span wicket:id="message">Message goes here</span>
>        </body>
>
> </html>
>
>
> -----------------------------------------------------
> Mail.be, WebMail and Virtual Office
> http://www.mail.be
>
> ---------------------------------------------------------------------
> 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: Unable to find error during hello World

Posted by Marc Marc <ma...@mail.be>.
Martin,

thanks for your test. This allowed me to deduce that the cause is elsewhere:
I found it now:
I did not stopped the embedded Jetty server before trying my changes. 

Regards,
Marc

> ----------------------------------------
> From: Marc Marc <ma...@mail.be>
> Sent: Sun Apr 15 08:47:21 CEST 2012
> To: <us...@wicket.apache.org>
> Subject: Unable to find error during hello World
> 
> 
> Hello,
> 
> I am a new user. I succeeded the quickstart but can not run the "Hello World"
> example. I get the following error:
> Unable to find component with id 'message' in [Page class =
> com.modelandgo.HomePage, id = 0, render count = 1]	Expected: '.message'.
> 
> I searched in the mailing list but did not found the solution.
> I add my simple code hereunder.
> 
> Thanks!
> Marc
> __________________________________________________
> 
> my application:
> public class WicketApplication extends WebApplication
> {    	
> 	@Override
> 	public Class<HomePage> getHomePage()
> 	{
> 		return HomePage.class;
> 	}
> 
> }
> 
> my page:
> public class HomePage extends WebPage {
> 	private static final long serialVersionUID = 1L;
> 
>     public HomePage(final PageParameters parameters) {
>     	
>         add(new Label("message", "I am a newbie"));
> 
>     }
> }
> 
> my html:
> <!DOCTYPE html>
> <html xmlns:wicket="http://wicket.apache.org">
> 	<body>
>     	<span wicket:id="message">Message goes here</span>
> 	</body>
> 	
> </html>
> 
> 
> -----------------------------------------------------
> Mail.be, WebMail and Virtual Office
> http://www.mail.be
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 

-----------------------------------------------------
Mail.be, WebMail and Virtual Office
http://www.mail.be

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