let me get this straight
you do a request to the server where the onClick is handled
But you dont send anything to the browser? Even if the browser does expect data?

I guess it works in youre case because the page IS refreshed. But also jumped.
Because do you set somewhere are EmptyRequestTarget in the onClick?

johan


On 3/6/06, Ali Zaid <[EMAIL PROTECTED] > wrote:
Hi;

I wanted to do something easy, which is I wanted to have a link that
do some action by overriding onClick, but after the action is done, I
don't want only to refresh the page I want it to jump to an Anchor in
the same page.

while this is easy, it involved hard code the anchor name in java
code, so what I did is:

@Override
protected String getURL() {
        String url = "" + "#someWhereInThePage";
        return url;
}

What I would suggest is to check the link href attribute, if the
attribute has something behind # then it should do the above in the
getURL of the super class, if the href has nothing or only #, it
should not, so simple but I guess it's more wicket sense than what I'm
doing now :)

Hope you like it.

P.S: Yah! Yah! Yah!

@Override
protected String getURL() {
        BufferString url = "" BufferString(super.getURL());
        url.append("#someWhereInThePage");
        return url.toString();
}

:) just joking!

--
Regards, Ali


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to