You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by tbt <na...@yahoo.com> on 2007/09/13 09:09:19 UTC

updating form component models when a link is clicked

Hi

I'm a newbie to wicket and I have a form and several components attached to
it. There are several links in this form and when each link is clicked a
different page is loaded. But the component models are not getting updated
when the onClick event is called in each link. How can the models be
updated.
-- 
View this message in context: http://www.nabble.com/updating-form-component-models-when-a-link-is-clicked-tf4434008.html#a12649853
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: updating form component models when a link is clicked

Posted by tbt <na...@yahoo.com>.
Hi Martijn,

I'm using SubmitLink and it's working fine now. Thanks :)


Martijn Dashorst wrote:
> 
> Ehrm... Double negative question...
> 
> Yes, you can't use it without JavaScript.
> 
> As a    doesn't provide a way to submit a form, it uses
> javascript for calling form.submit(). In that case the only solution
> would be to use <input type="submit" /> everywhere, and have the form
> surround all the 'links'.
> 
> Martijn
> 
> On 9/13/07, Erik van Oosten <e....@chello.nl> wrote:
>> You cannot use SubmitLink in a browser without javascript, right?
>>
>>     Erik.
>>
>>
>> Martijn Dashorst wrote:
>> > Or SubmitLink, which seems more appropriate in this case.
>> >
>> > Martijn
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> 
> -- 
> Buy Wicket in Action: http://manning.com/dashorst
> Apache Wicket 1.3.0-beta3 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/updating-form-component-models-when-a-link-is-clicked-tf4434008.html#a12651944
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: updating form component models when a link is clicked

Posted by Martijn Dashorst <ma...@gmail.com>.
Ehrm... Double negative question...

Yes, you can't use it without JavaScript.

As a <a href=""> doesn't provide a way to submit a form, it uses
javascript for calling form.submit(). In that case the only solution
would be to use <input type="submit" /> everywhere, and have the form
surround all the 'links'.

Martijn

On 9/13/07, Erik van Oosten <e....@chello.nl> wrote:
> You cannot use SubmitLink in a browser without javascript, right?
>
>     Erik.
>
>
> Martijn Dashorst wrote:
> > Or SubmitLink, which seems more appropriate in this case.
> >
> > Martijn
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-beta3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/

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


Re: updating form component models when a link is clicked

Posted by Erik van Oosten <e....@chello.nl>.
You cannot use SubmitLink in a browser without javascript, right?

    Erik.


Martijn Dashorst wrote:
> Or SubmitLink, which seems more appropriate in this case.
>
> Martijn
>
>   


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


Re: updating form component models when a link is clicked

Posted by Erik van Oosten <e....@chello.nl>.
Cool! Didn't know about that.

Thanks,
    Erik.

Martijn Dashorst schreef:
> Or SubmitLink, which seems more appropriate in this case.
>
> Martijn
>   


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


Re: updating form component models when a link is clicked

Posted by Martijn Dashorst <ma...@gmail.com>.
Or SubmitLink, which seems more appropriate in this case.

Martijn

On 9/13/07, Erik van Oosten <e....@chello.nl> wrote:
> Hi,
>
> If you are using links, the browser won't submit the values. You should
> use buttons.
>
> Regards,
>     Erik.
>
>
> tbt schreef:
> > Hi
> >
> > I'm a newbie to wicket and I have a form and several components attached to
> > it. There are several links in this form and when each link is clicked a
> > different page is loaded. But the component models are not getting updated
> > when the onClick event is called in each link. How can the models be
> > updated.
> >
>
> --
> Erik van Oosten
> http://2008.rubyenrails.nl/
> http://www.day-to-day-stuff.blogspot.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-beta3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/

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


Re: updating form component models when a link is clicked

Posted by Gerolf Seitz <ge...@gmail.com>.
On 9/13/07, Erik van Oosten <e....@chello.nl> wrote:
>
> Hi,
>
> If you are using links, the browser won't submit the values. You should
> use buttons.


you could use SubmitLink or AjaxSubmitLink...

  gerolf


Regards,
>     Erik.
>
>
> tbt schreef:
> > Hi
> >
> > I'm a newbie to wicket and I have a form and several components attached
> to
> > it. There are several links in this form and when each link is clicked a
> > different page is loaded. But the component models are not getting
> updated
> > when the onClick event is called in each link. How can the models be
> > updated.
> >
>
> --
> Erik van Oosten
> http://2008.rubyenrails.nl/
> http://www.day-to-day-stuff.blogspot.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: updating form component models when a link is clicked

Posted by Erik van Oosten <e....@chello.nl>.
Hi,

If you are using links, the browser won't submit the values. You should 
use buttons.

Regards,
    Erik.


tbt schreef:
> Hi
>
> I'm a newbie to wicket and I have a form and several components attached to
> it. There are several links in this form and when each link is clicked a
> different page is loaded. But the component models are not getting updated
> when the onClick event is called in each link. How can the models be
> updated.
>   

-- 
Erik van Oosten
http://2008.rubyenrails.nl/
http://www.day-to-day-stuff.blogspot.com/


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


Re: updating form component models when a link is clicked

Posted by Jan Kriesten <ja...@renitence.de>.
> I'm a newbie to wicket and I have a form and several components attached to
> it. There are several links in this form and when each link is clicked a
> different page is loaded. But the component models are not getting updated
> when the onClick event is called in each link. How can the models be
> updated.

the model is updated when the form is submitted. so, make sure it is when a link
is clicked. :-)

regards, --- jan.



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