You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Steve Swinsburg <st...@gmail.com> on 2012/11/01 00:35:58 UTC

Re: form with arbitrary number of fields

Hi,

Thanks, I have a repeater already and have the form components, but the part I am unsure about is how those form components map to a model. So when the person clicks submit, how do I get the arbitrary number of fields of data that were submitted?

Is there an example of this?

cheers,
Steve



On 29/09/2012, at 2:39 PM, Ondrej Zizka <oz...@redhat.com> wrote:

> On Fri, 2012-09-28 at 13:37 +0530, vineet semwal wrote:
> 
>> sorry somehow i didn't type last message correctly :)
>> use a repeater and you can add your formcoponents to its items ,see
>> listview/dataview
> 
> FYC,
> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/markup/repeater/RepeatingView.html
> 
> 
> 
>> 
>> On Fri, Sep 28, 2012 at 1:35 PM, vineet semwal <vi...@gmail.com> wrote:
>>> use a repeater which and yo can attach your formcomponents to items
>>> 
>>> On Fri, Sep 28, 2012 at 8:18 AM, Steve Swinsburg
>>> <st...@gmail.com> wrote:
>>>> Hi all,
>>>> 
>>>> I have a form that allows users to add an arbitrary number of fields, for example keywords for an item where there could be multiple.
>>>> 
>>>> Up until now I have been processing my form where the fields are known and map directly to a model. However I'm unsure as to how this mapping works, for example having two or more keywords for one item. Would the property in the backing model be a list for this item? Rather than a string for example?
>>>> 
>>>> Are there any examples of a similar dynamic form?
>>>> 
>>>> cheers,
>>>> Steve
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> regards,
>>> 
>>> Vineet Semwal
>> 
>> 
>> 
> 
> 


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


Re: form with arbitrary number of fields

Posted by Igor Vaynberg <ig...@gmail.com>.
this should get you most of the way there

http://wicketinaction.com/2008/10/building-a-listeditor-form-component/

-igor

On Wed, Oct 31, 2012 at 4:35 PM, Steve Swinsburg
<st...@gmail.com> wrote:
> Hi,
>
> Thanks, I have a repeater already and have the form components, but the part I am unsure about is how those form components map to a model. So when the person clicks submit, how do I get the arbitrary number of fields of data that were submitted?
>
> Is there an example of this?
>
> cheers,
> Steve
>
>
>
> On 29/09/2012, at 2:39 PM, Ondrej Zizka <oz...@redhat.com> wrote:
>
>> On Fri, 2012-09-28 at 13:37 +0530, vineet semwal wrote:
>>
>>> sorry somehow i didn't type last message correctly :)
>>> use a repeater and you can add your formcoponents to its items ,see
>>> listview/dataview
>>
>> FYC,
>> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/markup/repeater/RepeatingView.html
>>
>>
>>
>>>
>>> On Fri, Sep 28, 2012 at 1:35 PM, vineet semwal <vi...@gmail.com> wrote:
>>>> use a repeater which and yo can attach your formcomponents to items
>>>>
>>>> On Fri, Sep 28, 2012 at 8:18 AM, Steve Swinsburg
>>>> <st...@gmail.com> wrote:
>>>>> Hi all,
>>>>>
>>>>> I have a form that allows users to add an arbitrary number of fields, for example keywords for an item where there could be multiple.
>>>>>
>>>>> Up until now I have been processing my form where the fields are known and map directly to a model. However I'm unsure as to how this mapping works, for example having two or more keywords for one item. Would the property in the backing model be a list for this item? Rather than a string for example?
>>>>>
>>>>> Are there any examples of a similar dynamic form?
>>>>>
>>>>> cheers,
>>>>> Steve
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> regards,
>>>>
>>>> Vineet Semwal
>>>
>>>
>>>
>>
>>
>
>
> ---------------------------------------------------------------------
> 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