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 2011/09/03 05:39:27 UTC

Re: outputting < > with outputRaw

Can someone help me resolve this markup...

I went with the symbols but tap5 is not holding water.

Thanks
KEN

Could not convert ' << ' into a 
component parameter binding: Error parsing property expression ' 
<< ': Unable to parse input at character position 2.locationclasspath:org/tynamo/examples/hibernatesecurity/components/Gallery.tml, line 5045				</td>46			</tr>47			<tr>48				<td align="left" NOWRAP="nowrap" colspan="2">49					<div style="font-size:10pt; text-align: center;">50						<a> <t:eventLink t:id="FirstPage"/> <t:outputraw value=" &lt;&lt; "/> </a>	last line is the culprit
thanks
 		 	   		  

Re: outputting < > with outputRaw

Posted by Steve Eynon <st...@alienfactory.co.uk>.
I would use the literal prefix binding like this:

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

See the list of Binding Expressions here:
http://tapestry.apache.org/component-parameters.html

Steve.




On 3 September 2011 12:22, Robert Zeigler <ro...@roxanemy.com> wrote:
> Default prefix for outputraw is "prop" (see http://tapestry.apache.org/current/tapestry-core/ref/org/apache/tapestry5/corelib/components/OutputRaw.html). Tapestry is trying to convert your string to a property expression.  Solution:
>  1) surround your string with ' ' (so: value="' &lt;&lt; '")
>  or
>  2) do: value="outputValue" in the template, and create: public String getOutputValue() { return " &lt;&lt "; } to the java file. Also, if it's in the java file, you ought to be able to use << directly since there won't be parsing issues anymore, so: public String getOutputValue() { return " << "; }
>
> Robert
>
> On Sep 2, 2011, at 9/210:39 PM , Ken in Nashua wrote:
>
>>
>> Can someone help me resolve this markup...
>>
>> I went with the symbols but tap5 is not holding water.
>>
>> Thanks
>> KEN
>>
>> Could not convert ' << ' into a
>> component parameter binding: Error parsing property expression '
>> << ': Unable to parse input at character position 2.locationclasspath:org/tynamo/examples/hibernatesecurity/components/Gallery.tml, line 5045                         </td>46                 </tr>47                 <tr>48                          <td align="left" NOWRAP="nowrap" colspan="2">49                                 <div style="font-size:10pt; text-align: center;">50                                             <a> <t:eventLink t:id="FirstPage"/> <t:outputraw value=" &lt;&lt; "/> </a>      last line is the culprit
>> thanks
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

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


Re: outputting < > with outputRaw

Posted by Robert Zeigler <ro...@roxanemy.com>.
Default prefix for outputraw is "prop" (see http://tapestry.apache.org/current/tapestry-core/ref/org/apache/tapestry5/corelib/components/OutputRaw.html). Tapestry is trying to convert your string to a property expression.  Solution:
  1) surround your string with ' ' (so: value="' &lt;&lt; '")
  or
  2) do: value="outputValue" in the template, and create: public String getOutputValue() { return " &lt;&lt "; } to the java file. Also, if it's in the java file, you ought to be able to use << directly since there won't be parsing issues anymore, so: public String getOutputValue() { return " << "; }

Robert

On Sep 2, 2011, at 9/210:39 PM , Ken in Nashua wrote:

> 
> Can someone help me resolve this markup...
> 
> I went with the symbols but tap5 is not holding water.
> 
> Thanks
> KEN
> 
> Could not convert ' << ' into a 
> component parameter binding: Error parsing property expression ' 
> << ': Unable to parse input at character position 2.locationclasspath:org/tynamo/examples/hibernatesecurity/components/Gallery.tml, line 5045				</td>46			</tr>47			<tr>48				<td align="left" NOWRAP="nowrap" colspan="2">49					<div style="font-size:10pt; text-align: center;">50						<a> <t:eventLink t:id="FirstPage"/> <t:outputraw value=" &lt;&lt; "/> </a>	last line is the culprit
> thanks
> 		 	   		  


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


Re: outputting < > with outputRaw

Posted by Steve Eynon <st...@alienfactory.co.uk>.
Don't forget you need an XML Doctype declared at the start of the .tml
for it to be valid XML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

http://tapestry.apache.org/component-templates.html

then <t:outputraw value="literal: &lt;&lt; "/> will have no problems.

Steve.

On 3 September 2011 22:46, Ken in Nashua <kc...@live.com> wrote:
>
> Hi All,
>
> I went with the symbols &lt;&lt; but tap5 is not holding water for some reason.
>
> location
>
>    classpath:org/tynamo/examples/hibernatesecurity/components/Gallery.tml, line 50
>
> ...
>    </td>
> </tr>
> <tr>
>    <td align="left" NOWRAP="nowrap" colspan="2">
>        <div style="font-size:10pt; text-align: center;">
>            <a> <t:eventLink t:id="FirstPage"/> <t:outputraw value=" &lt;&lt; "/> </a>
> ...
>
> last line is the culprit
> Could not convert ' << ' into a component parameter binding:
>    Error parsing property expression ' << ': Unable to parse input at character position 2.
>
> Why would tapestry think &lt;&lt; is a parameter binding ?
>
> thanks in advance

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


Re: outputting < > with outputRaw

Posted by Robert Zeigler <ro...@roxanemy.com>.
Because it IS a parameter binding.  The parameter is "value".  You're trying to bind a value to it.  In your case, you're trying to bind the literal value << to it. But the default prefix for value for output raw is "prop", and you don't specify otherwise, so it assumes you've provided a property expression, and attempts to convert " &lt;&lt; " to a property expression, and fails.  I gave two possible solutions in my previous e-mail; Steve gave another (which I neglected to add before): prefix your value with "literal:" which will override the default binding type of "prop":

<teventlink t:id="firstpage"><t:outputraw value="literal: &lt;&lt; "/>

Also, why are you wrapping eventlink in an anchor? Event link will generate an anchor tag for you...

<div style="font-size:10pt; text-align: center;">
  <a t:type="eventlink" t:id="firstpage"><t:outputraw value="literal: &lt;&lt; "/></a>

The one thing that I don't recall offhand is whether the literal binding trims whitespace off the ends of the value; you'll have to check that.

Robert

On Sep 3, 2011, at 9/39:46 AM , Ken in Nashua wrote:

> 
> Hi All,
> 
> I went with the symbols &lt;&lt; but tap5 is not holding water for some reason.
> 
> location
> 
>    classpath:org/tynamo/examples/hibernatesecurity/components/Gallery.tml, line 50
> 
> ...
>    </td>
> </tr>
> <tr>
>    <td align="left" NOWRAP="nowrap" colspan="2">
>        <div style="font-size:10pt; text-align: center;">
>            <a> <t:eventLink t:id="FirstPage"/> <t:outputraw value=" &lt;&lt; "/> </a> 
> ...
> 
> last line is the culprit
> Could not convert ' << ' into a component parameter binding: 
>    Error parsing property expression ' << ': Unable to parse input at character position 2.
> 
> Why would tapestry think &lt;&lt; is a parameter binding ?
> 
> thanks in advance 		 	   		  


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


outputting < > with outputRaw

Posted by Ken in Nashua <kc...@live.com>.
Hi All,

I went with the symbols &lt;&lt; but tap5 is not holding water for some reason.

location

    classpath:org/tynamo/examples/hibernatesecurity/components/Gallery.tml, line 50

...
    </td>
</tr>
<tr>
    <td align="left" NOWRAP="nowrap" colspan="2">
        <div style="font-size:10pt; text-align: center;">
            <a> <t:eventLink t:id="FirstPage"/> <t:outputraw value=" &lt;&lt; "/> </a> 
...

last line is the culprit
Could not convert ' << ' into a component parameter binding: 
    Error parsing property expression ' << ': Unable to parse input at character position 2.

Why would tapestry think &lt;&lt; is a parameter binding ?

thanks in advance