Re: how to make tapestry ignore some html tags while parsing tml file

2010-11-11 Thread Everton Agner
Does  works?

___
Everton Agner Ramos


2010/11/10 hese <1024h...@gmail.com>

>
> Thanks for all your replies!
>
> Fernando, I like your solution.  I was thinking on similar lines...but not
> as a component, but a function that would return  the "<#=" tags which i
> could 'outputraw' into the tml, like
>
> 
> 
> data.yesterday.totalImpressions $endTag}>
> 
> 
>
> and have two functions
>
> String getBeginTag() {
>   return "<#=";
> }
>
>
> String getEndTag() {
>   return "#>";
> }
>
> but was wondering if there is a short cut to do it :)
>
> Thanks!
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/how-to-make-tapestry-ignore-some-html-tags-while-parsing-tml-file-tp3257771p3258819.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: how to make tapestry ignore some html tags while parsing tml file

2010-11-10 Thread hese

Thanks for all your replies!

Fernando, I like your solution.  I was thinking on similar lines...but not
as a component, but a function that would return  the "<#=" tags which i
could 'outputraw' into the tml, like



data.yesterday.totalImpressions



and have two functions

String getBeginTag() {
   return "<#=";
}


String getEndTag() {
   return "#>";
}

but was wondering if there is a short cut to do it :)

Thanks!



-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/how-to-make-tapestry-ignore-some-html-tags-while-parsing-tml-file-tp3257771p3258819.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: how to make tapestry ignore some html tags while parsing tml file

2010-11-09 Thread Thiago H. de Paula Figueiredo
On Tue, 09 Nov 2010 21:53:07 -0200, Fernando Padilla   
wrote:


I would create my own component that would output the "<#= " " #>" text  
around it's body:


void beginRender( MarkupWriter writer ) {writer.raw("<#= ");}
void afterRender( MarkupWriter writer ) {writer.raw(" #>");}

then you can use that component anywhere in your templates


data.yesterday.totalImpressions



Amazing approach, Fernando! :)

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: how to make tapestry ignore some html tags while parsing tml file

2010-11-09 Thread Fernando Padilla
I would create my own component that would output the "<#= " " #>" text 
around it's body:


void beginRender( MarkupWriter writer ) {writer.raw("<#= ");}
void afterRender( MarkupWriter writer ) {writer.raw(" #>");}



then you can use that component anywhere in your templates


data.yesterday.totalImpressions




On 11/9/10 3:19 PM, Thiago H. de Paula Figueiredo wrote:

On Tue, 09 Nov 2010 20:08:04 -0200, hese <1024h...@gmail.com> wrote:


Hi,


Hi!

I am using html templates in my TML file...something like the below, 
to be used with jQuery and other libraries to dynamically fill values 
easily.


<#= data.yesterday.totalImpressions #>



Tapestry templates must be well-formed XML and it's parsed by an XML 
parser, so you need to find another solution. Maybe you'll need to use 
the OutputRaw component.


By the way, using <#= inside HTML seems very, very hacky to my taste.



-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: how to make tapestry ignore some html tags while parsing tml file

2010-11-09 Thread Thiago H. de Paula Figueiredo

On Tue, 09 Nov 2010 20:08:04 -0200, hese <1024h...@gmail.com> wrote:


Hi,


Hi!

I am using html templates in my TML file...something like the below, to  
be used with jQuery and other libraries to dynamically fill values  
easily.


  <#= data.yesterday.totalImpressions #>



Tapestry templates must be well-formed XML and it's parsed by an XML  
parser, so you need to find another solution. Maybe you'll need to use the  
OutputRaw component.


By the way, using <#= inside HTML seems very, very hacky to my taste.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: how to make tapestry ignore some html tags while parsing tml file

2010-11-09 Thread Paul Stanton

the only way i know of is to comment it out



which will probably still cause you problems...

p.

On 10/11/2010 9:08 AM, hese wrote:


Hi,

I am using html templates in my TML file...something like the below, to be
used with jQuery and other libraries to dynamically fill values easily.


...
...

   <#= data.yesterday.totalImpressions #>




note the '#' in the html, which is parsed by a JS function and replaced with
actual values.

but when the tml loads tapestry is throwing an error

Unexpected character '#' (code 38) in content after '<' (malformed start
element?).
  at [row,col {unknown-source}]: [43,30]

I also tried# instead of # to see if it is escaped.  but the same
error.

Does anyone know a way to tell tapestry to ignore certain parts of the tml
file and not to parse them?

Thanks




-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org