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 the markup) at least which is repetitive and
boring since it brings no added value. It's not just about a logout,
it can be applied, for instance, to any other similar task. I am not
complaining :) Usualy I do it in the method onClick but as I said it's
kinda tedious.

On Mon, Dec 8, 2008 at 11:58 AM, Martijn Dashorst
<[EMAIL PROTECTED]> wrote:
> 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 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 your markup.
>> It's a bit tedious if the link is not unique. Having an anonymous
>> "pageless action" instantiated at the mounting point you will just
>> drop as many links as you need and you will have all this links in the
>> markup only.
>>
>> On Mon, Dec 8, 2008 at 11:40 AM, Martijn Dashorst
>> <[EMAIL PROTECTED]> wrote:
>>> 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 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 especially
>>>> because I would like to jump directly to a home page. It's a bit heavy
>>>> for such a simple thing.
>>>>
>>>>  Vitaly
>>>>
>>>> On Mon, Dec 8, 2008 at 10:51 AM, Martijn Dashorst
>>>> <[EMAIL PROTECTED]> wrote:
>>>>> 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]> wrote:
>>>>>> Hi there,
>>>>>>
>>>>>>   Something like:
>>>>>>
>>>>>>   mountAction ("/logout", new Action () {
>>>>>>      public void perform () {
>>>>>>         doLogout ();
>>>>>>      }
>>>>>>   );
>>>>>>
>>>>>>   Is is somehow possible?
>>>>>>
>>>>>> Vitaly
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Become a Wicket expert, learn from the best: http://wicketinaction.com
>>>>> Apache Wicket 1.3.4 is released
>>>>> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Become a Wicket expert, learn from the best: http://wicketinaction.com
>>> Apache Wicket 1.3.4 is released
>>> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.3.4 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to