You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ken in Nashua <kc...@live.com> on 2012/09/29 07:00:17 UTC

cannot output table tags in outputraw compnnent

Folks,

If the output and outputraw components cannot contain a left angel bracket <

or other angle brackets

ex. <t:output value="</tr><tr>"/>   <t:outputraw value="</tr><tr>"/> 

Then I am left with doing this...

<t:outputraw value="&lt;/tr&gt;&lt;tr&gt;"/> 

But if yeilds the following exception

java.lang.RuntimeExceptionError parsing property expression '</tr><tr>': Unable to parse input at character position 1.
Does anyone know how to output table tags in my template ?

Thanks

kcolassi@live.com
 

 		 	   		  

RE: cannot output table tags in outputraw compnnent

Posted by Ken in Nashua <kc...@live.com>.
Thanks Guys for the help... both your solutions I know will work as I woke up this morning thinking of same.

Yeah you cant just do straight markup in the tml... it destabilises the IF component

org.xml.sax.SAXParseExceptionThe element type "t:If" must be terminated by the matching end-tag "</t:If>".
have nice weekend

kcolassi@live.com

 		 	   		  

Re: cannot output table tags in outputraw compnnent

Posted by Shing Hing Man <ma...@yahoo.com>.
The following works.


In .tml:
  

  ${myTag}


In .java : 
public String getMyTag(){
        return "</tr><tr>";
    }



Alternatively, you could put your tag in the .properties file :
${message:myTag}

.properties:
myTag=</tr><tr>



Shing 


----- Original Message -----
From: Ken in Nashua <kc...@live.com>
To: users@tapestry.apache.org
Cc: 
Sent: Saturday, September 29, 2012 6:00 AM
Subject: cannot output table tags in outputraw compnnent


Folks,

If the output and outputraw components cannot contain a left angel bracket <

or other angle brackets

ex. <t:output value="</tr><tr>"/>   <t:outputraw value="</tr><tr>"/> 

Then I am left with doing this...

<t:outputraw value="&lt;/tr&gt;&lt;tr&gt;"/> 

But if yeilds the following exception

java.lang.RuntimeExceptionError parsing property expression '</tr><tr>': Unable to parse input at character position 1.
Does anyone know how to output table tags in my template ?

Thanks

kcolassi@live.com

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


Re: cannot output table tags in outputraw compnnent

Posted by "mailinglist@j-b-s.de" <ma...@j-b-s.de>.
I do not understand what you are trying to achieve
> <t:output value="</tr><tr>"/>
in a template is identically to <tr></tr> right? There is no need to wrap html elements inside outputraw within a template. Use output raw to stream html from your page class, for example assume you have a preformated product description Incl bold, underline, whatever as a string object than:

In java page
public String getProductDescription() {
   return "<b>header</b><br/>text text text...";
}

In your tml:
<t:outputraw value="${productDescription}"/>

Jens

Von meinem iPad gesendet

Am 29.09.2012 um 07:00 schrieb Ken in Nashua <kc...@live.com>:

> 
> Folks,
> 
> If the output and outputraw components cannot contain a left angel bracket <
> 
> or other angle brackets
> 
> ex. <t:output value="</tr><tr>"/>   <t:outputraw value="</tr><tr>"/> 
> 
> Then I am left with doing this...
> 
> <t:outputraw value="&lt;/tr&gt;&lt;tr&gt;"/> 
> 
> But if yeilds the following exception
> 
> java.lang.RuntimeExceptionError parsing property expression '</tr><tr>': Unable to parse input at character position 1.
> Does anyone know how to output table tags in my template ?
> 
> Thanks
> 
> kcolassi@live.com
> 
> 
>                         

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


Re: cannot output table tags in outputraw compnnent

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Sat, 29 Sep 2012 02:00:17 -0300, Ken in Nashua <kc...@live.com>  
wrote:

>
> Folks,
>
> If the output and outputraw components cannot contain a left angel  
> bracket <
>
> or other angle brackets
>
> ex. <t:output value="</tr><tr>"/>   <t:outputraw value="</tr><tr>"/>
>
> Then I am left with doing this...
>
> <t:outputraw value="&lt;/tr&gt;&lt;tr&gt;"/>
>
> But if yeilds the following exception
>
> java.lang.RuntimeExceptionError parsing property expression '</tr><tr>':  
> Unable to parse input at character position 1.
> Does anyone know how to output table tags in my template ?

Tapestry 5 templates must be valid XML documents and XML doesn't allow the  
< and > characters in attribute values. Properly escape them and it will  
work. By the way, I have no idea why you're using OutputRaw to output  
static content.

-- 
Thiago H. de Paula Figueiredo

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