Woops. Should have thought that the list server would strip attachments.
Here is the Java (without imports)
----------------
public class AccessDenied extends AccessDeniedPage implements Serializable
{
private static final long serialVersionUID = 200802012L;
public AccessDenied()
{
WebMarkupContainer wrapper = new
WebMarkupContainer("signedInWrapper")
{
private static final long serialVersionUID =
200802013L;
public boolean isVisible()
{
SignInSession currSess =
(SignInSession)SignInSession.get() ;
return (currSess.isSignedIn());
}
};
add(wrapper);
Link signout = new Link("signOut")
{
private static final long serialVersionUID =
200802014L;
@Override
public void onClick()
{
SignInSession currSess =
(SignInSession)SignInSession.get() ;
mwh.WicketApplication wa =
(mwh.WicketApplication)currSess.getApplication() ;
currSess.signOut();
setResponsePage(wa.getSignInPageClass());
}
};
wrapper.add(signout) ;
Link pageHome = new Link("home")
{
private static final long serialVersionUID =
20080205L;
@Override
public void onClick()
{
SignInSession currSess =
(SignInSession)SignInSession.get() ;
mwh.WicketApplication wa =
(mwh.WicketApplication)currSess.getApplication() ;
setResponsePage(wa.getHomePage());
}
};
wrapper.add(pageHome) ;
Link signin = new Link("signIn")
{
private static final long serialVersionUID =
200802015L;
@Override
public void onClick()
{
SignInSession currSess =
(SignInSession)SignInSession.get() ;
mwh.WicketApplication wa =
(mwh.WicketApplication)currSess.getApplication() ;
currSess.signOut();
setResponsePage(wa.getSignInPageClass());
}
@Override
public boolean isVisible()
{
SignInSession currSess =
(SignInSession)SignInSession.get() ;
return (!currSess.isSignedIn());
}
};
add(signin) ;
}
@Override
public boolean isErrorPage()
{
return (true) ;
}
}
----------------
And the html:
----------------
<body>
<div wicket:id="signedInWrapper">
<div>
<a wicket:id="signOut" href="">Sign Out</a>
</div>
<div>
<a wicket:id="home" href="">Home</a>
</div>
</div>
<div>
<a wicket:id="signIn" href="">Sign In</a>
</div>
</body>
----------------
Again, thanks for any pointers.
Bruce McGuire.
-----Original Message-----
From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 05 February, 2008 12:24 PM
To: [email protected]
Subject: Re: Component failed to render
The attachments have gone AWOL, but I managed to take a look at them while
they were in the moderation queue.
s/home/homePageLink/
Martijn
On 2/5/08, Bruce McGuire <[EMAIL PROTECTED]> wrote:
>
> Hi there.
>
>
>
> I am new to Wicket, and have been trying to create a new small application
> to test it out before we switch completely to using Wicket and Hibernate
> (through Databinder).
>
>
>
> I am getting an error with my AccessDenied page, saying that a component
> failed to render.
>
>
>
> ERROR - RequestCycle - The component(s) below failed to
> render. A common problem is that you have added a component in code but
> forgot to reference it in the markup (thus the component will never be
> rendered).
>
> 1. [MarkupContainer [Component id = homePageLink, page =
> mwh.page.error.AccessDenied, path = 3:homePageLink.BookmarkablePageLink,
> isVisible = true, isVersioned = false]]
>
> org.apache.wicket.WicketRuntimeException: The component(s) below failed to
> render. A common problem is that you have added a component in code but
> forgot to reference it in the markup (thus the component will never be
> rendered).
>
> 1. [MarkupContainer [Component id = homePageLink, page =
> mwh.page.error.AccessDenied, path = 3:homePageLink.BookmarkablePageLink,
> isVisible = true, isVersioned = false]]
>
>
>
>
>
> I have the component in the page, and have tried it within a div, span,
> etc, in different places, and so on, but I cant get past this error.
>
>
>
> If anyone has a pointer, I would greatly appreciate it.
>
>
>
> Thanks,
>
>
>
> Bruce.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]