This would be a daunting task.
Tapestry 5 components live within a specialized, managed
infrastructure. It was never the intent to allow them to be used as
JSP tags. I've thought about going the other direction (mapping a JSP
tag as a Tapestry component automagically). Tapestry components
expect to live inside a Tapestry page. All of these things are linked
together, which is why a T5 app can execute with almost no
configuration.
Tapestry components often cooperate with each other, for example, the
relationship between a Form component and an enclosed TextField
component. This form of communication is very dynamic and also hard to
map to the JSP space.
Finally, the code you provide for a component or page is actually only
a very, very, very small part of the Tapestry application; not only is
there a large amount of machinery behind the scenes, but the code you
provide is instrumented heavily at runtime.
On Mon, Jun 9, 2008 at 7:17 AM, Lance Java <[EMAIL PROTECTED]> wrote:
> Hi, I'm a tapestry newbie and want to use tapestry5 for a new set of pages.
> There is a requirement that some of the new components can be re-used on
> some existing struts/JSP based pages. I was hoping that I could write a jsp
> tag library which would initialize t5 components, include their javascript /
> css and render the html inline.
>
> Perhaps something like:
>
> <%@ taglib uri="/WEB-INF/tapestry5" prefix="t5" %>
> <t5:root>
> <t5:init component="grid" name="userGrid">
> <t5:param name="users" value="${users}" />
> </t5:init>
> <t5:init component="beaneditform" name="userForm">
> <t5:param name="id" value="form" />
> <t5:param name="object" value="${user}" />
> </t5:init>
>
> <html>
> <head>
> <!-- this will include any js or css required grid or beaneditform
> -->
> <t5:head />
> </head>
>
> <!-- reference to the t5:init above -->
> <t5:component name="userGrid">
>
> <!-- reference to the t5:init above -->
> <t5:component name="userForm" />
> </html>
> </t5:root>
> Can someone let me know if i'm barking mad or not?
> If this is possible, what classes etc I should be looking at and what
> potential issues I might have.
>
>
> Thanks,
> Lance.
>
--
Howard M. Lewis Ship
Creator Apache Tapestry and Apache HiveMind
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]