On 6/27/01 4:30 AM, "James Devenish" <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I've got myself into a tight little knot trying to work out how to
> "short-circuit" them templating mechanism.
>
> What I have is an application developed with Velocity and Turbine.
> During the execution of one of my VelocityActions (a type of
> ActionEvent) I want to divert the output mechanism so that it runs some
> code that will set the response type to something other than text/html
> and generate that output (in effect, supersede the templating mechanism
> from within Turbine). So, for example, I might have an ActionEvent that
> usually runs the normal templating mechanism but in special circumstances
> it should instead cause the verbatim contents of a file residing in the
> server's filesystem to be output via the HTTP response. I have had
> trouble trying to work out how to fit within the
> org.apache.turbine.modules.Page/org.apache.ecs.Document and
> Screens/Service structure that Turbine uses. I thought I might be able
> to subclass Page and Document to achieve what I want, but got confused
> in the process of trying to work out how to approach this. An
> alternative option is to HTTP redirect the user to a different servlet
> that does what I want. However, then what am I supposed to do about the
> Turbine ACLs (other than reimplement...)?
>
> So...has anyone thought about this sort of thing before and if so, what
> are the best strategies? (If my description has not been sufficient I
> will repost something better if I can think of how to express it.)
Yes. Turbine 2.2 will definitely deal with localization and content types
better. I understand what you are trying to say, and it's not that easy
currently in Turbine to output arbitrary content types from within an
application. It is certainly possible but it can get rather convoluted.
Discussions for solutions will soon begin. There are pieces of code
in Jetspeed that already try to deal with this and Ilkka (turbine developer)
has a system that already deals with localization and content type
effectively so I think we will be able to take pieces of both these
methodologies and make a mechanism in 2.2 that deals with localization
and content types is a less painful manner.
> Thank you.
>
> PS. If there is an FAQ I couldn't find it at jakarta.apache.org:8080/jyve...
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
jvz.
Jason van Zyl
http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]