Hi Philippe,
did you have public getter and setter for Person in loginBean?
the expression #{loginbean.loginPerson.lastName} is resoved to
"loginbean.getLoginPerson().getLastName()"
where loginBean is the object from session scope.
otherwise please post the stacktrace and more of your relevant code.
Regards,
Volker
Philippe Lamote wrote:
> Hi,
>
> I have a Variable Resolver question.
> To set the scene first:
>
> Trying to follow good practice, I build up my model classes in
> "XXX.model.modelClass". e.g. "XXX.model.Person"
> For the front end, there's a package "XXX.web.beans" e.g.
> "XXX.web.beans.LoginBean"
>
> & In that LoginBean I had a field declared:
> "Person loginPerson;"
>
> --> In the JSF page I obviously tried:
> Login: #{loginbean.loginPerson.lastName} (I declared "loginbean"
> properly in the faces-config, session scope)
>
> Yet this continues to give me errors. (of type conversion/validation
> "while updating model")
>
> Which made me wonder whether the Variable Resolver was made for this
> sort of schemas after all?
> If not that would be a pitty I think.
>
> I made it work by having LoginBean extend Person but qua design I think
> this is much less elegant.
> (but still way better than copy all fields again in front-end classes -
> why make a model then?!)
>
> Philippe
>
>
--
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.