You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Kai Mütz <km...@googlemail.com> on 2008/08/22 19:17:17 UTC

Form with tabbed panel: Tracking changes

Hi,

I have a tabbed panel within a form. I have overwritten the newlink method
and return a submitlink instead of regular link in order to keep the form
content. Everything works fine for far.
While using these submitlinks I want to differentiate if the user has made
some changes within the tab he is leaving or not. If so I want to diplay a
message. Is there a possibilty to check if the model has changed while
selecting another tab?

Obviously I don't want to add an AjaxFormComponentUpdatingBehavior to ervery
single form component.

Thanks in advance,
Kai


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Form with tabbed panel: Tracking changes

Posted by Ned Collyer <ne...@gmail.com>.
I have adapted forms with flair, however I've found that the onbeforerender
of the form is not executed when its contents are updated with ajax.

It will depend on your impl i guess.


Kai Mütz wrote:
> 
> Nino Saturnino Martinez Vazquez Wael <> wrote:
>> Look at Ivisitor and add one to the form, that could add it for
>> you... I think theres a example pdf on jweekends homepage...
>> 
>> http://www.jweekend.com/dev/ArticlesPage/
> 
> I will try this. Thank you.
> 
> Kai
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Form-with-tabbed-panel%3A-Tracking-changes-tp19111738p19137226.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Form with tabbed panel: Tracking changes

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.

Kai Mütz wrote:
> Nino Saturnino Martinez Vazquez Wael <> wrote:
>   
>> Look at Ivisitor and add one to the form, that could add it for
>> you... I think theres a example pdf on jweekends homepage...
>>     
>
> I have tried the IVisitor approach, but there are 2 problems:
>
> 1) I invoke the visitChildren() methon within the onBeforeRender() method of
> the form. Thus visitChildren() only visits the components of the selected
> tab because only the selected tab is rendered while loading the page.
>   
Okay...
> 2) I have some form components with AjaxFormComponentUpdatingBehavior added.
> If I add another AjaxFormComponentUpdatingBehavior within the IVisitor the
> original behavior doesn't work reliably anymore. Is it possible to add 2
> AjaxFormComponentUpdatingBehavior to the same form component, one while
> constructing, other while rendering?
>   
It should be I guess but I have never tried, as it should just append 
the js I think..
> Thanks, Kai
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>   

-- 
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Form with tabbed panel: Tracking changes

Posted by Kai Mütz <km...@googlemail.com>.
Nino Saturnino Martinez Vazquez Wael <> wrote:
> Look at Ivisitor and add one to the form, that could add it for
> you... I think theres a example pdf on jweekends homepage...

I have tried the IVisitor approach, but there are 2 problems:

1) I invoke the visitChildren() methon within the onBeforeRender() method of
the form. Thus visitChildren() only visits the components of the selected
tab because only the selected tab is rendered while loading the page.

2) I have some form components with AjaxFormComponentUpdatingBehavior added.
If I add another AjaxFormComponentUpdatingBehavior within the IVisitor the
original behavior doesn't work reliably anymore. Is it possible to add 2
AjaxFormComponentUpdatingBehavior to the same form component, one while
constructing, other while rendering?

Thanks, Kai


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Form with tabbed panel: Tracking changes

Posted by Kai Mütz <km...@googlemail.com>.
Nino Saturnino Martinez Vazquez Wael <> wrote:
> Look at Ivisitor and add one to the form, that could add it for
> you... I think theres a example pdf on jweekends homepage...
> 
> http://www.jweekend.com/dev/ArticlesPage/

I will try this. Thank you.

Kai


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Form with tabbed panel: Tracking changes

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Look at Ivisitor and add one to the form, that could add it for you... I 
think theres a example pdf on jweekends homepage...

http://www.jweekend.com/dev/ArticlesPage/

London Wicket - Al's Forms With Flair

Someone did'nt care to mount articles as shared resources I see.

Kai Mütz wrote:
> Hi,
>
> I have a tabbed panel within a form. I have overwritten the newlink method
> and return a submitlink instead of regular link in order to keep the form
> content. Everything works fine for far.
> While using these submitlinks I want to differentiate if the user has made
> some changes within the tab he is leaving or not. If so I want to diplay a
> message. Is there a possibilty to check if the model has changed while
> selecting another tab?
>
> Obviously I don't want to add an AjaxFormComponentUpdatingBehavior to ervery
> single form component.
>
> Thanks in advance,
> Kai
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>   

-- 
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org