You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Vinod Singh <Vi...@rmsi.com> on 2005/03/16 15:05:41 UTC
Nested beans
Hi All,
What is the best way to deal with nested beans? For example a User belongs
to Group so User bean will have an association with Group bean. The ui form
for User creation will have an select option for Group ID. Now I want to
map this select tag to group field of User bean, do I have create a custoom
converter o some other approach is there?
Thanks,
Vinod
public class User
{
private String name;
private Group group;
}
public class Group
{
private String name;
private List<User> users;
}
Re: Nested beans
Posted by Heath Borders <he...@gmail.com>.
A custom converter is probably the easiest way to handle it.
On Wed, 16 Mar 2005 19:35:41 +0530, Vinod Singh <Vi...@rmsi.com> wrote:
> Hi All,
>
> What is the best way to deal with nested beans? For example a User belongs
> to Group so User bean will have an association with Group bean. The ui form
> for User creation will have an select option for Group ID. Now I want to
> map this select tag to group field of User bean, do I have create a custoom
> converter o some other approach is there?
>
> Thanks,
>
> Vinod
>
> public class User
> {
> private String name;
> private Group group;
> }
>
> public class Group
> {
> private String name;
> private List<User> users;
> }
>
>
--
-Heath Borders-Wing
hborders@mail.win.org