You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by nate roe <ph...@gmail.com> on 2008/05/02 01:08:11 UTC
How to show a bottom-of-the-page feedback panel?
If I have a feedback panel positioned together with a form at the bottom of
a very long page, how can I cause the browser to snap to that feedback panel
upon validation error?
I could use an anchor tag at the feedback panel, but how would I tell Wicket
to go to that anchor upon validation error?
Thanks,
Nate Roe
Re: How to show a bottom-of-the-page feedback panel?
Posted by nate roe <ph...@gmail.com>.
Excellent. Thank you!
On Thu, May 1, 2008 at 10:32 PM, Matthew Young <gi...@gmail.com> wrote:
> public class YourPage extends WebPage implement IHeadContributor {
>
> ........
>
> // in case form has error, scroll down
> @Override public void renderHead(IHeaderResponse r) {
> if (form.hasError()) {
> r.renderOnLoadJavascript("location.hash='YOUR-ANCHOR'");
> }
> }
>
> }
>
> On Thu, May 1, 2008 at 4:08 PM, nate roe <ph...@gmail.com> wrote:
>
> > If I have a feedback panel positioned together with a form at the bottom
> > of
> > a very long page, how can I cause the browser to snap to that feedback
> > panel
> > upon validation error?
> >
> > I could use an anchor tag at the feedback panel, but how would I tell
> > Wicket
> > to go to that anchor upon validation error?
> >
> > Thanks,
> > Nate Roe
> >
>
Re: How to show a bottom-of-the-page feedback panel?
Posted by Matthew Young <gi...@gmail.com>.
public class YourPage extends WebPage implement IHeadContributor {
........
// in case form has error, scroll down
@Override public void renderHead(IHeaderResponse r) {
if (form.hasError()) {
r.renderOnLoadJavascript("location.hash='YOUR-ANCHOR'");
}
}
}
On Thu, May 1, 2008 at 4:08 PM, nate roe <ph...@gmail.com> wrote:
> If I have a feedback panel positioned together with a form at the bottom
> of
> a very long page, how can I cause the browser to snap to that feedback
> panel
> upon validation error?
>
> I could use an anchor tag at the feedback panel, but how would I tell
> Wicket
> to go to that anchor upon validation error?
>
> Thanks,
> Nate Roe
>