No need for the VariableResolver for such stuff... As Volker pointed out, it depends on the getter/setter methods.
VariableResolver in ManagedBeans is only needed when you need to look up some beans with which you basolutely no direct connection. I dare to guesitmate that this will hit less than 1% of all JSF-applications... hth Alexander > -----Original Message----- > From: Philippe Lamote [mailto:[EMAIL PROTECTED] > Sent: Monday, February 06, 2006 12:02 PM > To: MyFaces Discussion > Subject: Re: Variable Resolver > > Yes I did... > I'll reconstruct the code, for the moment I have bypassed the > prob by > having LoginBean extend Person. :-( > Originally loginPerson(the field itself) itself was private, made it > public just in case, but that didn't change anything. > I have also googled for this (perhaps with the wrong terms, > like "JSF > and recursive variable resolving") but that didn't came up with > much. :-) > > What I don't know is whether the Variabe Resolver was specified to > also resolve in that fashion in the first place. > What I also tried was to make the model.Person class a > (managed) bean > to see whether that would make a diff, but it didn't. > > Philippe > > On 06 Feb 2006, at 11:49, Volker Weber wrote: > > 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. > >