You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by cloudsuser cloudsuser <cl...@gmail.com> on 2010/10/25 04:05:32 UTC
[jexl] how to access properties of nested java dataobject
Using the syntax "${status}" as defined below i can able to access the value
of status form JavaBeanObject(A)
<column name="STATUS" type="string">
<value>${status}</value>
</column>
But how to get the value of nested bean object.Example...
public class A {
private String status;
private B b;
.....
..........
}
How to get the value of b.getStatus(); ????????????? Need to replace
${status} to ${b.status} ????????
Re: [jexl] how to access properties of nested java dataobject
Posted by Paul Libbrecht <pa...@activemath.org>.
Clouduser,
(that doesn't taste like a name),
provided a is in context of type A and class A has a getter getB() then ${A.b} gives you the return of getB().
That's how I always accessed nested java objects.
I don't understand your XML-example though... at least not its relevance for jexl.
Can you maybe say which language it is in?
paul
On 25 oct. 2010, at 04:05, cloudsuser cloudsuser wrote:
> Using the syntax "${status}" as defined below i can able to access the value
> of status form JavaBeanObject(A)
>
> <column name="STATUS" type="string">
> <value>${status}</value>
> </column>
>
> But how to get the value of nested bean object.Example...
> public class A {
> private String status;
> private B b;
> .....
> ..........
> }
>
> How to get the value of b.getStatus(); ????????????? Need to replace
> ${status} to ${b.status} ????????
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org