myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <simon.kitch...@rhe.co.nz>
Subject Re: question about BackingBeans and POJO's
Date Tue, 31 Oct 2006 23:44:30 GMT
Mick Knutson wrote:
> I am looking for a best practices for creating BackingBeans with sub 
> objects.
>
> Such as, I want a UserBackingBean that has a User associated with it.
>
>
> But I have done that, but use:
>
>                         <h:inputText id="firstName"
>                                      
> value="#{UserBackingBean.user.firstName}">
>                             <f:validateLength minimum="2"
>                                               maximum="25" />
>                         </h:inputText>
>
The class that UserBackingBean refers to needs to define a method
  User getUser()

The User class needs to define
  String getFirstName()

Everything should then work fine. This is all standard JavaBeans 
conventions.

Regards,

Simon

Mime
View raw message