You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Shengche Hsiao <sh...@gmail.com> on 2014/03/07 04:53:25 UTC
Radio Button
Suppose I have a map (data source from db and have unknown size) as follows
final Map<String, String> data = new HashMap();
data.put("TEST1", "DESCRIPTION1");
data.put("TEST2", "DESCRIPTION2");
data.put("TEST3", "DESCRIPTION3");
data.put("TEST4", "DESCRIPTION4");
final List<String> key = new ArrayList<String>();
key.addAll(data.keySet());
in order to use RadioGroup i transfer the map keyset to list!
as you can see, i want users to check radio and get it's key to find map
value!
But i cannot assign the key into radio's value, do you have any suggestions?
--
----------------------------------------------------------------------->
We do this not because it is easy. We do this because it is hard.
----------------------------------------------------------------------->
ShengChe Hsiao
----------------------------------------------------------------------->
front713@gmail.com
front713@tc.edu.tw
----------------------------------------------------------------------->
VoIP : 070-910-2450
----------------------------------------------------------------------->
Re: Radio Button
Posted by Shengche Hsiao <sh...@gmail.com>.
sorry, I am idiot!
I forgot to assign an model to it.
On Fri, Mar 7, 2014 at 11:53 AM, Shengche Hsiao <sh...@gmail.com>wrote:
> Suppose I have a map (data source from db and have unknown size) as follows
>
> final Map<String, String> data = new HashMap();
> data.put("TEST1", "DESCRIPTION1");
> data.put("TEST2", "DESCRIPTION2");
> data.put("TEST3", "DESCRIPTION3");
> data.put("TEST4", "DESCRIPTION4");
> final List<String> key = new ArrayList<String>();
> key.addAll(data.keySet());
>
> in order to use RadioGroup i transfer the map keyset to list!
>
> as you can see, i want users to check radio and get it's key to find map
> value!
>
> But i cannot assign the key into radio's value, do you have any
> suggestions?
>
>
> --
>
> ----------------------------------------------------------------------->
> We do this not because it is easy. We do this because it is hard.
> ----------------------------------------------------------------------->
> ShengChe Hsiao
> ----------------------------------------------------------------------->
> front713@gmail.com
> front713@tc.edu.tw
> ----------------------------------------------------------------------->
> VoIP : 070-910-2450
> ----------------------------------------------------------------------->
>
--
----------------------------------------------------------------------->
We do this not because it is easy. We do this because it is hard.
----------------------------------------------------------------------->
ShengChe Hsiao
----------------------------------------------------------------------->
front713@gmail.com
front713@tc.edu.tw
----------------------------------------------------------------------->
VoIP : 070-910-2450
----------------------------------------------------------------------->