You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by manoj kumar <ma...@gmail.com> on 2014/10/02 14:21:32 UTC
Mapping two UI componets to Single Model
Can i Map a Two UI Components to a Single Model Object with some delimiter
seperating the two values?
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Mapping-two-UI-componets-to-Single-Model-tp4667796.html
Sent from the Users forum 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: Mapping two UI componets to Single Model
Posted by Paul Bors <pa...@bors.ws>.
Please reffer to the free user guide, section 12.9 Creating complex form
components with FormComponentPanel at:
http://wicket.apache.org/guide/guide/single.html#forms2_9
In short you need to create your own compound FormComponentPanel that
encapsulates both from components and accepts a single model. Then you
would take that model and pass each individual part of it to the
corresponding form component you want.
On Mon, Oct 6, 2014 at 3:50 AM, manoj kumar <ma...@gmail.com>
wrote:
> Yes Sebastien it is related to my previous post.
>
> Actually we are using this for adding filters for a Report, where each
> filter is a Row consisting of:
>
> for ex: a Report might be on the Employee Table. where user could add a
> filter as:
>
> Attribute Operator Value Editor
> Department IN In this case it is
> Multi Select
> DOB EQ
> DateTimeField
> EmpName LIKE textField
> joining date Between <DateTimeFeild1> &
> <DateTimeField2>.
>
> There are Two Drop downs one for a attribute of a report and a value
> Editor:
>
> Based on The Attribute selected:
> 1. The Value Editor is changed to either text Field, Date or multi select &
> also
> 2. The List of the Operators allowed for that attribute is shown.
> 3. Now We have added the Between Operator for the Date attributes.
>
> For Date we are using
> org.apache.wicket.extensions.yui.calendar.DateTimeField. which only accepts
> the Single date model object.
>
> so my Question is when between is checked i will show two DateTimeFields,
> and these two should map to a Single Model object, is this possible?
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Mapping-two-UI-componets-to-Single-Model-tp4667796p4667829.html
> Sent from the Users forum 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: Mapping two UI componets to Single Model
Posted by manoj kumar <ma...@gmail.com>.
Yes Sebastien it is related to my previous post.
Actually we are using this for adding filters for a Report, where each
filter is a Row consisting of:
for ex: a Report might be on the Employee Table. where user could add a
filter as:
Attribute Operator Value Editor
Department IN In this case it is Multi Select
DOB EQ DateTimeField
EmpName LIKE textField
joining date Between <DateTimeFeild1> & <DateTimeField2>.
There are Two Drop downs one for a attribute of a report and a value Editor:
Based on The Attribute selected:
1. The Value Editor is changed to either text Field, Date or multi select &
also
2. The List of the Operators allowed for that attribute is shown.
3. Now We have added the Between Operator for the Date attributes.
For Date we are using
org.apache.wicket.extensions.yui.calendar.DateTimeField. which only accepts
the Single date model object.
so my Question is when between is checked i will show two DateTimeFields,
and these two should map to a Single Model object, is this possible?
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Mapping-two-UI-componets-to-Single-Model-tp4667796p4667829.html
Sent from the Users forum 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: Mapping two UI componets to Single Model
Posted by Sebastien <se...@gmail.com>.
Hi,
If your question is related to your previous post about the
rangedatetimepicker [1], you better have to have a custom RangeDateTime (or
RangeValue, whatever) as model object...
[1]
http://apache-wicket.1842946.n4.nabble.com/DateTimeRangePicker-td4667763.html
On Thu, Oct 2, 2014 at 2:40 PM, Martin Grigorov <mg...@apache.org>
wrote:
> Yes! Sure you can!
>
> Give us more information what you want to do and we will give you more
> information how to do it!
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Thu, Oct 2, 2014 at 2:21 PM, manoj kumar <ma...@gmail.com>
> wrote:
>
> > Can i Map a Two UI Components to a Single Model Object with some
> delimiter
> > seperating the two values?
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/Mapping-two-UI-componets-to-Single-Model-tp4667796.html
> > Sent from the Users forum 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: Mapping two UI componets to Single Model
Posted by Martin Grigorov <mg...@apache.org>.
Yes! Sure you can!
Give us more information what you want to do and we will give you more
information how to do it!
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
On Thu, Oct 2, 2014 at 2:21 PM, manoj kumar <ma...@gmail.com>
wrote:
> Can i Map a Two UI Components to a Single Model Object with some delimiter
> seperating the two values?
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Mapping-two-UI-componets-to-Single-Model-tp4667796.html
> Sent from the Users forum 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
>
>