You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Simon B <si...@gmail.com> on 2015/07/12 14:28:35 UTC
categorizing checks in a checkgroup
I have a bean / entity which models a real estate advert.
An advert can have different features checked (e.g. "west facing", "east
facing", "north facing", "sauna", "gym", "swimming pool", "needs
renovating", "repossession", "access by stairs"etc) which are represented as
java enums
e.g.
Set<Feature> Advert.getFeatures()
These features are categorized so for example:
- orientation has the following features - "west facing", "east facing",
"north facing"
- other considerations - "needs renovating" , "repossession", "finance
options"
- luxury features - "sauna", "swimming pool", "gym"
etc
each category is also represented as a java enum from which you can get the
Feature objects for that category
e.g.
Set<Feature> Category.getFeatures();
I'm trying to work out how to put this into a form within a checkgroup in
Wicket 6.20 so the page would display something like
Orientation
X west facing X east facing X north facing
Luxury Features
X sauna X swimming pool X gym X theatre
X library X whirlpool
Other Considerations
X needs renovating X repossession X finance options
It would be nice if the checks could be tabular so that if there were say
more than 4 options in a category it would put the next check on the next
row / line.
Can someone give me a pointer on how I might go about implementing this.
Cheers
Simon
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/categorizing-checks-in-a-checkgroup-tp4671586.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: categorizing checks in a checkgroup
Posted by Simon B <si...@gmail.com>.
Hi Martin,
Thank you for the hint, you're completely right it would be much better as a
span or wicket:container although it did work as a wicket:enclosure.
I've changed it and it works fine,
Thanks once again,
Simon
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/categorizing-checks-in-a-checkgroup-tp4671586p4671591.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: categorizing checks in a checkgroup
Posted by Martin Grigorov <mg...@apache.org>.
Hi Simon,
I pretty sure you don't want to use an enclosure for: <wicket:enclosure
wicket:id="label">display value</wicket:enclosure>
Better use either a <span> (with label.setRenderBodyOnly(true)) or
<wicket:container>.
Martin Grigorov
Freelancer. Available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov
On Mon, Jul 13, 2015 at 10:33 AM, Simon B <si...@gmail.com> wrote:
> Hello,
>
> In the end I managed to do this.
>
> I found following presentation on how to do a bean editor:
>
> https://londonwicket.googlecode.com/files/LondonWicket-BeanEditor.pdf
>
> And using that and a few other things I done in the past came up with the
> following:
>
>
>
> the html was:
>
>
>
>
> and then the
> getGridViewWithCheckGroups(String,CheckGroup,PropertyTypeFeatureGroup)
> implementation was roughly:
>
>
> I hope that helps someone else in the future,
>
> Cheers
>
>
> Simon
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/categorizing-checks-in-a-checkgroup-tp4671586p4671587.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: categorizing checks in a checkgroup
Posted by Simon B <si...@gmail.com>.
Hello,
In the end I managed to do this.
I found following presentation on how to do a bean editor:
https://londonwicket.googlecode.com/files/LondonWicket-BeanEditor.pdf
And using that and a few other things I done in the past came up with the
following:
the html was:
and then the
getGridViewWithCheckGroups(String,CheckGroup,PropertyTypeFeatureGroup)
implementation was roughly:
I hope that helps someone else in the future,
Cheers
Simon
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/categorizing-checks-in-a-checkgroup-tp4671586p4671587.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