struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson, Erik" <erik.hud...@gd-ais.com>
Subject Setting bean property from another bean
Date Wed, 02 Jun 2004 16:23:36 GMT
If you have two beans in scope and both have a property of the same class,
is there a way to set one's property to the other property's value using one
of the tag libraries?

If you have

class C;

class A
{
   private C propA; // with get & set methods
}

class B
{
   private C propB; // with get & set methods
}

In a scriptlet, you could do

<% a.setPropA(b.getPropB()); %>

Can you replace the scriptlet with an equivalent tag?

Thanks,

Erik

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message