struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig McClanahan" <>
Subject Re: 1.3.x: Action Aliasing
Date Thu, 24 Aug 2006 06:08:00 GMT
On 8/23/06, Paul Benedict <> wrote:
> Ted Husted wrote:
> > Use "action-id" then. The point is that moniker "alias" is going to
> > cause confusion, since it already means something entirely different
> > within the Struts 2 community.
> Right now attributes are squarely mapped to properties. Java does not
> allow dashes in a property name, so what is a workaround?

One way to deal with this would be to provide your own BeanInfo class that
defined a property named "action-id"  with the getter and setter methods
that you want to use.  That way, the JavaBeans introspection logic would use
your setter method, instead of not recognizing this as a property.  But
that's likely to be too painful for this kind of use.

The other approach, if you're using something like Digester (which is true
at least for S1) to parse the config file, is to define an explicit rule
that calls the right setter if there is an attribute with a specified name.


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