You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Martin Makundi <ma...@koodaripalvelut.com> on 2009/08/16 12:00:38 UTC
jQuery+Wicket+Form
Hi!
I need to implement a "custom drop down" -select component, because I
need to display more information than can be fit onto a single line.
I am considering using jQuery or similar RIA widgets on a web page
running on Wicket.
My problem is: how do I bind the custom select into wicket form
processing model? Is that the right way to go at it at all?
I tried looking around and came across:
* http://stackoverflow.com/questions/34705/best-practices-with-jquery-form-binding-code-in-an-application
* http://www.wickext.org/documentation/ui/jquery-ui-wicket-integration.html
.. but I haven't really found any example having RIA form components.
Date picker is simple, because it sets the value of an existing
<input> element. But what if I have a custome select that is not a
select at all.. how would that work with wicket?
**
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
RE: jQuery+Wicket+Form
Posted by Stefan Lindner <li...@visionet.de>.
I see that I synchronize the model too in onBeforeRender:
@Override
protected void onBeforeRender() {
internalModel.setObject(getModelObject());
internalField.setRequired(isRequired());
super.onBeforeRender();
}
Stefan
________________________________
Von: Martin Makundi [mailto:martin.makundi@koodaripalvelut.com]
Gesendet: So 16.08.2009 12:53
An: users@wicket.apache.org
Betreff: Re: jQuery+Wicket+Form
Hmm.. this might actually work, it uses the original form component to
store the value:
http://v2.easy-designs.net/articles/replaceSelect/
However.. that's a "hand-made" one. Anybody know of a similary library
solution that is skinnable etc.?
**
Martin
2009/8/16 Martin Makundi <ma...@koodaripalvelut.com>:
> Hi!
>
> I need to implement a "custom drop down" -select component, because I
> need to display more information than can be fit onto a single line.
>
> I am considering using jQuery or similar RIA widgets on a web page
> running on Wicket.
>
> My problem is: how do I bind the custom select into wicket form
> processing model? Is that the right way to go at it at all?
>
> I tried looking around and came across:
> * http://stackoverflow.com/questions/34705/best-practices-with-jquery-form-binding-code-in-an-application
> * http://www.wickext.org/documentation/ui/jquery-ui-wicket-integration.html
>
> .. but I haven't really found any example having RIA form components.
> Date picker is simple, because it sets the value of an existing
> <input> element. But what if I have a custome select that is not a
> select at all.. how would that work with wicket?
>
> **
> Martin
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: jQuery+Wicket+Form
Posted by Martin Makundi <ma...@koodaripalvelut.com>.
Ok, have that, never had time to read. Tnx for the tip.
**
Martin
2009/8/16 Stefan Lindner <li...@visionet.de>:
> Yes!
>
> ________________________________
>
> Von: Martin Makundi [mailto:martin.makundi@koodaripalvelut.com]
> Gesendet: So 16.08.2009 15:50
> An: users@wicket.apache.org
> Betreff: Re: jQuery+Wicket+Form
>
>
>
> Hi, by WIA you mean Wicket in Action?
>
> **
> Martin
>
> 2009/8/16 Stefan Lindner <li...@visionet.de>:
>> I Just made a custom Formcomonent with jQuery and I followed the guidelines shiown in WIA. I use a local model for my costum component, put it into a FormComponent
>>
>> public class Clock extends FormComponentPanel<Time> implements IHeaderContributor {
>>
>> and use the
>>
>> onBeforeRender()
>>
>> method to synchronize the required flag of my internal fields (not needed it there are no formfields at all
>> and the
>>
>> @Override
>> protected void convertInput() {
>> setConvertedInput(internalModel.getObject());
>> }
>>
>> to pass my internal model to the 'Component's model.
>>
>> I hope i did not forgeth anything. But, as mentioned, take a look at WIA. the mechanisms described for the date adn time component worked for me.
>>
>> Stefan
>>
>>
>>
>>
>> ________________________________
>>
>> Von: Martin Makundi [mailto:martin.makundi@koodaripalvelut.com]
>> Gesendet: So 16.08.2009 12:53
>> An: users@wicket.apache.org
>> Betreff: Re: jQuery+Wicket+Form
>>
>>
>>
>> Hmm.. this might actually work, it uses the original form component to
>> store the value:
>>
>> http://v2.easy-designs.net/articles/replaceSelect/
>>
>> However.. that's a "hand-made" one. Anybody know of a similary library
>> solution that is skinnable etc.?
>>
>> **
>> Martin
>>
>> 2009/8/16 Martin Makundi <ma...@koodaripalvelut.com>:
>>> Hi!
>>>
>>> I need to implement a "custom drop down" -select component, because I
>>> need to display more information than can be fit onto a single line.
>>>
>>> I am considering using jQuery or similar RIA widgets on a web page
>>> running on Wicket.
>>>
>>> My problem is: how do I bind the custom select into wicket form
>>> processing model? Is that the right way to go at it at all?
>>>
>>> I tried looking around and came across:
>>> * http://stackoverflow.com/questions/34705/best-practices-with-jquery-form-binding-code-in-an-application
>>> * http://www.wickext.org/documentation/ui/jquery-ui-wicket-integration.html
>>>
>>> .. but I haven't really found any example having RIA form components.
>>> Date picker is simple, because it sets the value of an existing
>>> <input> element. But what if I have a custome select that is not a
>>> select at all.. how would that work with wicket?
>>>
>>> **
>>> Martin
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
RE: jQuery+Wicket+Form
Posted by Stefan Lindner <li...@visionet.de>.
Yes!
________________________________
Von: Martin Makundi [mailto:martin.makundi@koodaripalvelut.com]
Gesendet: So 16.08.2009 15:50
An: users@wicket.apache.org
Betreff: Re: jQuery+Wicket+Form
Hi, by WIA you mean Wicket in Action?
**
Martin
2009/8/16 Stefan Lindner <li...@visionet.de>:
> I Just made a custom Formcomonent with jQuery and I followed the guidelines shiown in WIA. I use a local model for my costum component, put it into a FormComponent
>
> public class Clock extends FormComponentPanel<Time> implements IHeaderContributor {
>
> and use the
>
> onBeforeRender()
>
> method to synchronize the required flag of my internal fields (not needed it there are no formfields at all
> and the
>
> @Override
> protected void convertInput() {
> setConvertedInput(internalModel.getObject());
> }
>
> to pass my internal model to the 'Component's model.
>
> I hope i did not forgeth anything. But, as mentioned, take a look at WIA. the mechanisms described for the date adn time component worked for me.
>
> Stefan
>
>
>
>
> ________________________________
>
> Von: Martin Makundi [mailto:martin.makundi@koodaripalvelut.com]
> Gesendet: So 16.08.2009 12:53
> An: users@wicket.apache.org
> Betreff: Re: jQuery+Wicket+Form
>
>
>
> Hmm.. this might actually work, it uses the original form component to
> store the value:
>
> http://v2.easy-designs.net/articles/replaceSelect/
>
> However.. that's a "hand-made" one. Anybody know of a similary library
> solution that is skinnable etc.?
>
> **
> Martin
>
> 2009/8/16 Martin Makundi <ma...@koodaripalvelut.com>:
>> Hi!
>>
>> I need to implement a "custom drop down" -select component, because I
>> need to display more information than can be fit onto a single line.
>>
>> I am considering using jQuery or similar RIA widgets on a web page
>> running on Wicket.
>>
>> My problem is: how do I bind the custom select into wicket form
>> processing model? Is that the right way to go at it at all?
>>
>> I tried looking around and came across:
>> * http://stackoverflow.com/questions/34705/best-practices-with-jquery-form-binding-code-in-an-application
>> * http://www.wickext.org/documentation/ui/jquery-ui-wicket-integration.html
>>
>> .. but I haven't really found any example having RIA form components.
>> Date picker is simple, because it sets the value of an existing
>> <input> element. But what if I have a custome select that is not a
>> select at all.. how would that work with wicket?
>>
>> **
>> Martin
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: jQuery+Wicket+Form
Posted by Martin Makundi <ma...@koodaripalvelut.com>.
Hi, by WIA you mean Wicket in Action?
**
Martin
2009/8/16 Stefan Lindner <li...@visionet.de>:
> I Just made a custom Formcomonent with jQuery and I followed the guidelines shiown in WIA. I use a local model for my costum component, put it into a FormComponent
>
> public class Clock extends FormComponentPanel<Time> implements IHeaderContributor {
>
> and use the
>
> onBeforeRender()
>
> method to synchronize the required flag of my internal fields (not needed it there are no formfields at all
> and the
>
> @Override
> protected void convertInput() {
> setConvertedInput(internalModel.getObject());
> }
>
> to pass my internal model to the 'Component's model.
>
> I hope i did not forgeth anything. But, as mentioned, take a look at WIA. the mechanisms described for the date adn time component worked for me.
>
> Stefan
>
>
>
>
> ________________________________
>
> Von: Martin Makundi [mailto:martin.makundi@koodaripalvelut.com]
> Gesendet: So 16.08.2009 12:53
> An: users@wicket.apache.org
> Betreff: Re: jQuery+Wicket+Form
>
>
>
> Hmm.. this might actually work, it uses the original form component to
> store the value:
>
> http://v2.easy-designs.net/articles/replaceSelect/
>
> However.. that's a "hand-made" one. Anybody know of a similary library
> solution that is skinnable etc.?
>
> **
> Martin
>
> 2009/8/16 Martin Makundi <ma...@koodaripalvelut.com>:
>> Hi!
>>
>> I need to implement a "custom drop down" -select component, because I
>> need to display more information than can be fit onto a single line.
>>
>> I am considering using jQuery or similar RIA widgets on a web page
>> running on Wicket.
>>
>> My problem is: how do I bind the custom select into wicket form
>> processing model? Is that the right way to go at it at all?
>>
>> I tried looking around and came across:
>> * http://stackoverflow.com/questions/34705/best-practices-with-jquery-form-binding-code-in-an-application
>> * http://www.wickext.org/documentation/ui/jquery-ui-wicket-integration.html
>>
>> .. but I haven't really found any example having RIA form components.
>> Date picker is simple, because it sets the value of an existing
>> <input> element. But what if I have a custome select that is not a
>> select at all.. how would that work with wicket?
>>
>> **
>> Martin
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
RE: jQuery+Wicket+Form
Posted by Stefan Lindner <li...@visionet.de>.
I Just made a custom Formcomonent with jQuery and I followed the guidelines shiown in WIA. I use a local model for my costum component, put it into a FormComponent
public class Clock extends FormComponentPanel<Time> implements IHeaderContributor {
and use the
onBeforeRender()
method to synchronize the required flag of my internal fields (not needed it there are no formfields at all
and the
@Override
protected void convertInput() {
setConvertedInput(internalModel.getObject());
}
to pass my internal model to the 'Component's model.
I hope i did not forgeth anything. But, as mentioned, take a look at WIA. the mechanisms described for the date adn time component worked for me.
Stefan
________________________________
Von: Martin Makundi [mailto:martin.makundi@koodaripalvelut.com]
Gesendet: So 16.08.2009 12:53
An: users@wicket.apache.org
Betreff: Re: jQuery+Wicket+Form
Hmm.. this might actually work, it uses the original form component to
store the value:
http://v2.easy-designs.net/articles/replaceSelect/
However.. that's a "hand-made" one. Anybody know of a similary library
solution that is skinnable etc.?
**
Martin
2009/8/16 Martin Makundi <ma...@koodaripalvelut.com>:
> Hi!
>
> I need to implement a "custom drop down" -select component, because I
> need to display more information than can be fit onto a single line.
>
> I am considering using jQuery or similar RIA widgets on a web page
> running on Wicket.
>
> My problem is: how do I bind the custom select into wicket form
> processing model? Is that the right way to go at it at all?
>
> I tried looking around and came across:
> * http://stackoverflow.com/questions/34705/best-practices-with-jquery-form-binding-code-in-an-application
> * http://www.wickext.org/documentation/ui/jquery-ui-wicket-integration.html
>
> .. but I haven't really found any example having RIA form components.
> Date picker is simple, because it sets the value of an existing
> <input> element. But what if I have a custome select that is not a
> select at all.. how would that work with wicket?
>
> **
> Martin
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: jQuery+Wicket+Form
Posted by Martin Makundi <ma...@koodaripalvelut.com>.
Hmm.. this might actually work, it uses the original form component to
store the value:
http://v2.easy-designs.net/articles/replaceSelect/
However.. that's a "hand-made" one. Anybody know of a similary library
solution that is skinnable etc.?
**
Martin
2009/8/16 Martin Makundi <ma...@koodaripalvelut.com>:
> Hi!
>
> I need to implement a "custom drop down" -select component, because I
> need to display more information than can be fit onto a single line.
>
> I am considering using jQuery or similar RIA widgets on a web page
> running on Wicket.
>
> My problem is: how do I bind the custom select into wicket form
> processing model? Is that the right way to go at it at all?
>
> I tried looking around and came across:
> * http://stackoverflow.com/questions/34705/best-practices-with-jquery-form-binding-code-in-an-application
> * http://www.wickext.org/documentation/ui/jquery-ui-wicket-integration.html
>
> .. but I haven't really found any example having RIA form components.
> Date picker is simple, because it sets the value of an existing
> <input> element. But what if I have a custome select that is not a
> select at all.. how would that work with wicket?
>
> **
> Martin
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org