Hi there,
Something like:
mountAction (/logout, new Action () {
public void perform () {
doLogout ();
}
);
Is is somehow possible?
Vitaly
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
Wicket is not an action framework. There won't be any mount action
thingies if I can help it.
Why not just create a LogoutLink extends Link which does this?
Think components, not actions.
Martijn
On Mon, Dec 8, 2008 at 11:29 AM, Vitaly Tsaplin
[EMAIL PROTECTED] wrote:
Hi Martijn,
Thank
You already need the link in the markup and you need the action in the
javacode. What are you complaining about?
You don't use base pages?
Martijn
On Mon, Dec 8, 2008 at 11:55 AM, Vitaly Tsaplin
[EMAIL PROTECTED] wrote:
I just called it action. I have never used any action based
framework
I just called it action. I have never used any action based
framework before wicket :) You can think about an action I mentioned
as about a method that can be mounted.
If you create a link as was proposed you have to create a Java
object with onClick () implemented that is referencing to
public class LogoutPage extends WebPage {
public LogoutPage() {
add(new Label(msg, You have been logged out.));
getSession().invalidate();
}
}
mountBookmarkablePage(/logout, LogoutPage.class);
Martijn
On Mon, Dec 8, 2008 at 10:28 AM, Vitaly Tsaplin
[EMAIL PROTECTED]
Hi Martijn,
Thank you for your help.
I meant that defining logic at the mounting point sometimes is a
better idea then to do it at the point where we instantiate an
anonimous link for instance. Regarding your example we have to have a
page class + associated markup which is not necessary
I have a base page. As I said it's perfectly ok if the link is
unique. If not and it jumps to an existing page (so you don't have to
create a new one + markup) all links that you drop on your pages have
to have paired Java objects instantiated and added to the wicket
hierarchy (+ wicket:id in