Arnab wrote:
Thanks Chris, but here is my confusion
:sessionScope.customer.address
Not sure how target can determine what is customer, if it needs the actual object. Customer is the name of object/bean Person.
so I would have liked to see sessionScope.Person.address
Maybe I'll need to write a small app to figure this out.
Arnab lets go see it step by step
"sessionScope.customer" - here we say return me an object bound to session scope with name customer. just like session.getAttribute("customer")
Now using reflection i can determine the type of the class.
Now the last part is ".address"
It is something like invoking getAddress in the bean returned in the first step. So target now has the instance of the Address class,
Other two attributes property and value will be used on this object thats is Address.
Now you said, you would have liked to see
sessionScope.Person.address
What will happen if i have two Person instances bound in session scope with different names?
Does that solve your problem?