Re: Casting beans in JSP

2001-04-23 Thread Craig R. McClanahan
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'

Casting beans in JSP

2001-04-20 Thread Chris Butler
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

Re: Casting beans in JSP

2001-04-20 Thread Peter Alfors
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

Re: Casting beans in JSP

2001-04-20 Thread John Raley
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