On Fri, 20 Apr 2001, John Raley wrote:
Try using bean:define and specifying the type you want. The 'id'
attribute value in bean:define will be the downcast reference.
Example:
% ... a bean of type Foo is in the page under the attribute name 'aFoo'
%
bean:define name='aFoo'
heya folx,
is there anyway to use a tag to cast an object from
one type to another? just curious. the reason is
that a top level bean implements a generic interface
and i need to access the 'actual' object rather than a
the generic attributes returned by interface.
i'm loathe to use any java
I don't know if one already exists, but if not...
You could write your own that would take
pageContext attribute id (scripting variable name) of the object to
cast
the type to cast it to. (fully qualified of coarse)
pageContext attribute id (scripting variable name) of the new
Try using bean:define and specifying the type you want. The 'id'
attribute value in bean:define will be the downcast reference.
Example:
% ... a bean of type Foo is in the page under the attribute name 'aFoo'
%
bean:define name='aFoo' type='mypkg.SubFoo' id='aSubFoo'/
aSubFoo now refers to
4 matches
Mail list logo