You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Kris Rasmussen <kr...@yahoo.com> on 2005/01/28 02:50:50 UTC
<[[CDATA is templates?
Is there any way to prevent tapestry from parsing a section of a template and just have it spit it out as raw html such as a <[[CDATA tag does in xml?
Thanks,
Kris
---------------------------------
Do you Yahoo!?
Yahoo! Search presents - Jib Jab's 'Second Term'
plugin for generate getters and setters
Posted by Alexey Romanchuk <ui...@gorodok.net>.
Hello tapestry community.
Spindle is great plugin for tapestry, but when i use it have found
there is missed handly features. I write simple plugin for generate
abstract getters and setters. If someone intrested visit sourceforge:
http://sourceforge.net/projects/emuz/
submit feature request and bugs via sourceforge tracking or via email.
it works simple - just click on *.page file in navigation or packege
explorer view and choise emuz menu. there is just one item - add
abstract method. then in dialog choise what method you want generate.
thanks for reading!
Alexey Romanchuk
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: <[[CDATA is templates?
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jan 31, 2005, at 1:41 AM, Kris Rasmussen wrote:
> Hey Erik,
> I am thinking I might be able to use sitemesh for the templating
> instead of tapestry templates but I don't really understand what it is
> capable of after reading the docs on sitemesh website.
SiteMesh is for *decorating*, not for templating the original content.
In other words, you'd need some HTML generated by some other means
(static HTML, servlet, JSP, Tapestry, etc) and SiteMesh would parse
that HTML and re-wrap it inside a decorator you'd define. Decorators
can be in Velocity, Freemarker, JSP, and *now Tapestry!* (and could be
in other technologies too, but that would require custom coding).
> Could I have tapestry output things like like....
I don't know what you mean by "output" here. What you show is JSP
taglib syntax.
>
> <page:param name="forumnMessages">
>
> <page:applyDecorator name="forumEntryDecorator">
> <page:param name="message"> some html here </page:param>
> <page:param name="author"> Author name </page:param>
> <page:param name="time">some time</page:param>
> </page>
>
> <page:applyDecorator name="forumEntryDecorator">
> <page:param name="message"> some other html here </page:param>
> <page:param name="author"> Another Author name </page:param>
> <page:param name="time">some other time</page:param>
> </page>
> </page>
>
> And then have sitemesh decorator handle the conversion to html?
SiteMesh, again, decorates existing HTML.
> Would site mesh let me define params recursivly like that?
I don't think so, but I have no experience with the SiteMesh taglibs so
could be wrong.
> Wouldn't this be extremely slow, like cocoon?
Woah! :) First of all, I don't think Cocoon is slow. SiteMesh is not
slow either - its parser is on the order of milliseconds. See the
first FAQ item:
http://www.opensymphony.com/sitemesh/faq.html
> I want to provide the ability to switch templates so that naive users
> who don't know how to use css can create templates and rebrand their
> pages. Also, it is often necessary to reorder basic html content so
> that it can be positioned correctly with css without using absolute
> positioning.
Maybe the simplest solution, since you're not wanting to use Tapestry
templates for the end users, is to generate basic HTML with Tapestry
and SiteMesh it with Velocity templates that the users can tweak.
Velocity, though, has the same risk that Tapestry templates have in
that expressions can dig into the model and call methods that you may
not want exposed.
I still think the best solution is to add a switch to the Tapestry
template parser to disallow @syntax and "ognl:..." expressions.
Erik
>
> Thanks,
> Kris
>
> Kris Rasmussen <kr...@yahoo.com> wrote:
>
> Thanks Erik, I guess that is what I will have to do. However I might
> just try modifying the tapestry template loader to skip over sections
> marked with some flag like <[[CDATA in xml first. That should not be
> to hard should it?
>
> Kris
>
> Jamie Orchard-Hays wrote:
> Hey, that's a great idea.
>
>
> On Jan 28, 2005, at 6:18 AM, Erik Hatcher wrote:
>
>> I'd like to see a switch in Tapestry 3.1 that allows turning off the
>> informal @syntax and "ognl:..." expressions in templates for this very
>> reason though.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: <[[CDATA is templates?
Posted by Kris Rasmussen <kr...@yahoo.com>.
Hey Erik,
I am thinking I might be able to use sitemesh for the templating instead of tapestry templates but I don't really understand what it is capable of after reading the docs on sitemesh website. Could I have tapestry output things like like....
<page:param name="forumnMessages">
<page:applyDecorator name="forumEntryDecorator">
<page:param name="message"> some html here </page:param>
<page:param name="author"> Author name </page:param>
<page:param name="time">some time</page:param>
</page>
<page:applyDecorator name="forumEntryDecorator">
<page:param name="message"> some other html here </page:param>
<page:param name="author"> Another Author name </page:param>
<page:param name="time">some other time</page:param>
</page>
</page>
And then have sitemesh decorator handle the conversion to html? Would site mesh let me define params recursivly like that? Wouldn't this be extremely slow, like cocoon?
I want to provide the ability to switch templates so that naive users who don't know how to use css can create templates and rebrand their pages. Also, it is often necessary to reorder basic html content so that it can be positioned correctly with css without using absolute positioning.
Thanks,
Kris
Kris Rasmussen <kr...@yahoo.com> wrote:
Thanks Erik, I guess that is what I will have to do. However I might just try modifying the tapestry template loader to skip over sections marked with some flag like <[[CDATA in xml first. That should not be to hard should it?
Kris
Jamie Orchard-Hays wrote:
Hey, that's a great idea.
On Jan 28, 2005, at 6:18 AM, Erik Hatcher wrote:
> I'd like to see a switch in Tapestry 3.1 that allows turning off the
> informal @syntax and "ognl:..." expressions in templates for this very
> reason though.
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: <[[CDATA is templates?
Posted by Kris Rasmussen <kr...@yahoo.com>.
Thanks Erik, I guess that is what I will have to do. However I might just try modifying the tapestry template loader to skip over sections marked with some flag like <[[CDATA in xml first. That should not be to hard should it?
Kris
Jamie Orchard-Hays <ja...@dang.com> wrote:
Hey, that's a great idea.
On Jan 28, 2005, at 6:18 AM, Erik Hatcher wrote:
> I'd like to see a switch in Tapestry 3.1 that allows turning off the
> informal @syntax and "ognl:..." expressions in templates for this very
> reason though.
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: <[[CDATA is templates?
Posted by Jamie Orchard-Hays <ja...@dang.com>.
Hey, that's a great idea.
On Jan 28, 2005, at 6:18 AM, Erik Hatcher wrote:
> I'd like to see a switch in Tapestry 3.1 that allows turning off the
> informal @syntax and "ognl:..." expressions in templates for this very
> reason though.
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: <[[CDATA is templates?
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
If users only know about jwcid="..." attributes, then they only have
the power you give them.
I'd like to see a switch in Tapestry 3.1 that allows turning off the
informal @syntax and "ognl:..." expressions in templates for this very
reason though.
You could run the templates the users create through JTidy, remove any
jwcid="@..." attributes and any that have "ognl:" in them. Maybe that
would work as your compilation step?
Erik
On Jan 27, 2005, at 9:29 PM, Kris Rasmussen wrote:
> I am creating a templating system so that users can edit templates and
> then have them used by tapestry however I wanted to limit the power of
> the template. Full tapestry templates have access to more information
> that I am willing to give to the template editors so I would rather
> have tapestry ignore all data other than the tags I allow.
>
> Also, I find that tapestry is not forgiving enough when parsing html
> for the naive user and would like to avoid any problems by forcing
> tapestry to ignore raw html.
>
> My plan was to create an intermediate template format and then compile
> that into a tapestry safe template.
>
> Any ideas?
>
> Kris
>
>
> Erik Hatcher <er...@ehatchersolutions.com> wrote:What problem are you
> having with just putting the HTML in your
> template? Tapestry is relatively forgiving in parsing HTML and should
> just pass through stuff that isn't alive as Tapestry componentry. An
> example of the problem would be helpful.
>
> But, no, there is not a way to have part of the template emit but not
> get parsed. You could have the HTML as a String in Java code and use
> @Insert with raw="true" to pass through text though.
>
> Erik
>
> On Jan 27, 2005, at 8:50 PM, Kris Rasmussen wrote:
>
>> Is there any way to prevent tapestry from parsing a section of a
>> template and just have it spit it out as raw html such as a <[[CDATA
>> tag does in xml?
>>
>> Thanks,
>> Kris
>>
>>
>> ---------------------------------
>> Do you Yahoo!?
>> Yahoo! Search presents - Jib Jab's 'Second Term'
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail - Find what you need with new enhanced search. Learn more.
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: <[[CDATA is templates?
Posted by Kris Rasmussen <kr...@yahoo.com>.
I am creating a templating system so that users can edit templates and then have them used by tapestry however I wanted to limit the power of the template. Full tapestry templates have access to more information that I am willing to give to the template editors so I would rather have tapestry ignore all data other than the tags I allow.
Also, I find that tapestry is not forgiving enough when parsing html for the naive user and would like to avoid any problems by forcing tapestry to ignore raw html.
My plan was to create an intermediate template format and then compile that into a tapestry safe template.
Any ideas?
Kris
Erik Hatcher <er...@ehatchersolutions.com> wrote:What problem are you having with just putting the HTML in your
template? Tapestry is relatively forgiving in parsing HTML and should
just pass through stuff that isn't alive as Tapestry componentry. An
example of the problem would be helpful.
But, no, there is not a way to have part of the template emit but not
get parsed. You could have the HTML as a String in Java code and use
@Insert with raw="true" to pass through text though.
Erik
On Jan 27, 2005, at 8:50 PM, Kris Rasmussen wrote:
> Is there any way to prevent tapestry from parsing a section of a
> template and just have it spit it out as raw html such as a <[[CDATA
> tag does in xml?
>
> Thanks,
> Kris
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Search presents - Jib Jab's 'Second Term'
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search. Learn more.
Re: <[[CDATA is templates?
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
What problem are you having with just putting the HTML in your
template? Tapestry is relatively forgiving in parsing HTML and should
just pass through stuff that isn't alive as Tapestry componentry. An
example of the problem would be helpful.
But, no, there is not a way to have part of the template emit but not
get parsed. You could have the HTML as a String in Java code and use
@Insert with raw="true" to pass through text though.
Erik
On Jan 27, 2005, at 8:50 PM, Kris Rasmussen wrote:
> Is there any way to prevent tapestry from parsing a section of a
> template and just have it spit it out as raw html such as a <[[CDATA
> tag does in xml?
>
> Thanks,
> Kris
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Search presents - Jib Jab's 'Second Term'
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org