You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Chris Butler <ch...@unsurface.com> on 2001/04/20 16:52:48 UTC
& static
Another q:
is it possible to access a static method
[ie. public static getX()] from a bean:write?
<bean:write name="myBean" property="x"/>
seems to throw an exception for me.
i would have guessed that it would work...
although i question what would happen if
you tried to put something in the attribute.
the setX() wouldn't exist...
Chris
Re: & static
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Fri, 20 Apr 2001, Chris Butler wrote:
> Another q:
>
> is it possible to access a static method
> [ie. public static getX()] from a bean:write?
>
> <bean:write name="myBean" property="x"/>
>
> seems to throw an exception for me.
> i would have guessed that it would work...
> although i question what would happen if
> you tried to put something in the attribute.
> the setX() wouldn't exist...
>
> Chris
>
>
See the JavaBeans spec. Static methods are not recognized as properties.
Craig