struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject RE: [Tiles] definitionsFactory problem
Date Fri, 20 Dec 2002 18:19:26 GMT
> Take a look the controllerClass attribute of the definition 
> element in the
> tiles config.  It allows you to specify a controller class of 
> type package
> org.apache.struts.tiles.Controller.  This class is executed 
> before the tile
> it is associated with is rendered and can be used to 
> dynamically alter the
> component context.

I've thought about this approach and I think it is actually a better approach than using ActionForward
properties to modify things at runtime.  However, it wouldn't help in the case I was working
on.  I've gotten it to work by extending ActionForward and TilesRequestProcessor, but I can't
say for sure that my enhancement adds any real value.

However, it does seem like there would be valid reasons to use properties from an ActionForward
when forwarding to a Tiles definition, and the way TilesRequestProcessor is currently written,
it's a little hokey to extend it that way.  But, that's a discussion for the dev list.

> I personally would prefer something a little more 
> declarative, something
> similar to Cocoon's Selectors.
> So you could do something like the following
>  <select type="someType">
>      <when test="foo">
>         <put name="body" value="/foo.jsp"/>
>      </when>
>      <otherwise>
>          <put name="bar" value="/bar.jsp"/>
>       </otherwise>
>   </selector>

I've considered this type of thing as well and I think it would be very useful.  I'm glad
I'm not the only one who has thought of it.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message