You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Angelo Chen <an...@yahoo.com.hk> on 2007/09/16 04:48:22 UTC

T5: outputRaw

Hi,
I use following code to output a html text, but it works first time, when I
switch to other users, the page will never be updated, remain the contents
from the first user, any hint? thanks.
 
<div id="profile_right">
            <t:outputraw value = "${CurrentUser.about}" />  </div>

A.c.
-- 
View this message in context: http://www.nabble.com/T5%3A-outputRaw-tf4449911.html#a12696194
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: T5: outputRaw

Posted by Angelo Chen <an...@yahoo.com.hk>.
Hi Howard,

I thought it was intended,  already found a way how to use it:  it can
modify template in the run time achieving effects similar to Titles, but
have not yet tested it. anyway, it's a bug, so will not bother:)
A.C.


Howard Lewis Ship wrote:
> 
> This is a known bug, and fixed. When using the ${...} syntax, Tapestry was
> being over-agressive about caching the result.
> 
> https://issues.apache.org/jira/browse/TAPESTRY-1667
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/T5%3A-outputRaw-tf4449911.html#a12775205
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: T5: outputRaw

Posted by Nick Westgate <ni...@key-planning.co.jp>.
That's the same issue, and as Howard says it has been fixed.
To use the fix you have to build T5 or wait for a snapshot.

Cheers,
Nick.


Marcelo Lotif wrote:
> Righ Howard, but some people wrote this on a recent thread regarding a
> Loop+expansions problem:
> 
>> On 9/17/07, Michael Gottschalk <MG...@gmx.net> wrote:
>>> On Monday 17 September 2007 08:42:46 Davor Hrg wrote:
>>>> I had no problem using expansions in a loop, (T5.0.5)
>>>>
>>>>     <t:loop source="arr" value="value">
>>>>       ${value},
>>>>     </t:loop>
>>> Expansions in a loop are only a problem if they are given as parameters
>>> to components. E.g. your example will work, but the following will not:
>>>
>>> <t:loop source="arr" value="value">
>>>       <t:output value="${value}">,
>>> </t:loop>
>>>
>>>
>>> Cheers,
>>> Michael
> 
> "Michael has it right: in 5.0.5 the second will fail.
> 
> I logged a JIRA earlier, but as Martin kindly points out
> this was fixed back in July!
> 
> There doesn't seem to be a 5.0.6-SNAPSHOT available though.
> 
> Cheers,
> Nick."
> 
> 2007/9/18, Howard Lewis Ship < hlship@gmail.com >:
>> This is a known bug, and fixed. When using the ${...} syntax, Tapestry was
>> being over-agressive about caching the result.
>>
>> https://issues.apache.org/jira/browse/TAPESTRY-1667
>>
>>
>> On 9/15/07, Angelo Chen < angelochen960@yahoo.com.hk > wrote:
>>>
>>> Hi,
>>> I use following code to output a html text, but it works first time,
>> when
>>> I
>>> switch to other users, the page will never be updated, remain the
>> contents
>>> from the first user, any hint? thanks.
>>>
>>> <div id="profile_right">
>>>             <t:outputraw value = "${CurrentUser.about}" />  </div>
>>>
>>> A.c.
>>> --
>>> View this message in context:
>>> http://www.nabble.com/T5%3A-outputRaw-tf4449911.html#a12696194
>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>> --
>> Howard M. Lewis Ship
>> Partner and Senior Architect at Feature50
>>
>> Creator Apache Tapestry and Apache HiveMind
>>
> 
> 
> 

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


Re: T5: outputRaw

Posted by Marcelo Lotif <ml...@gmail.com>.
Righ Howard, but some people wrote this on a recent thread regarding a
Loop+expansions problem:

> On 9/17/07, Michael Gottschalk <MG...@gmx.net> wrote:
> > On Monday 17 September 2007 08:42:46 Davor Hrg wrote:
> > > I had no problem using expansions in a loop, (T5.0.5)
> > >
> > >     <t:loop source="arr" value="value">
> > >       ${value},
> > >     </t:loop>
> >
> > Expansions in a loop are only a problem if they are given as parameters
> > to components. E.g. your example will work, but the following will not:
> >
> > <t:loop source="arr" value="value">
> >       <t:output value="${value}">,
> > </t:loop>
> >
> >
> > Cheers,
> > Michael

"Michael has it right: in 5.0.5 the second will fail.

I logged a JIRA earlier, but as Martin kindly points out
this was fixed back in July!

There doesn't seem to be a 5.0.6-SNAPSHOT available though.

Cheers,
Nick."

2007/9/18, Howard Lewis Ship < hlship@gmail.com >:
>
> This is a known bug, and fixed. When using the ${...} syntax, Tapestry was
> being over-agressive about caching the result.
>
> https://issues.apache.org/jira/browse/TAPESTRY-1667
>
>
> On 9/15/07, Angelo Chen < angelochen960@yahoo.com.hk > wrote:
> >
> >
> > Hi,
> > I use following code to output a html text, but it works first time,
> when
> > I
> > switch to other users, the page will never be updated, remain the
> contents
> > from the first user, any hint? thanks.
> >
> > <div id="profile_right">
> >             <t:outputraw value = "${CurrentUser.about}" />  </div>
> >
> > A.c.
> > --
> > View this message in context:
> > http://www.nabble.com/T5%3A-outputRaw-tf4449911.html#a12696194
> > Sent from the Tapestry - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Howard M. Lewis Ship
> Partner and Senior Architect at Feature50
>
> Creator Apache Tapestry and Apache HiveMind
>



-- 
Atenciosamente,
Marcelo Lotif

Re: T5: outputRaw

Posted by Howard Lewis Ship <hl...@gmail.com>.
This is a known bug, and fixed. When using the ${...} syntax, Tapestry was
being over-agressive about caching the result.

https://issues.apache.org/jira/browse/TAPESTRY-1667


On 9/15/07, Angelo Chen <an...@yahoo.com.hk> wrote:
>
>
> Hi,
> I use following code to output a html text, but it works first time, when
> I
> switch to other users, the page will never be updated, remain the contents
> from the first user, any hint? thanks.
>
> <div id="profile_right">
>             <t:outputraw value = "${CurrentUser.about}" />  </div>
>
> A.c.
> --
> View this message in context:
> http://www.nabble.com/T5%3A-outputRaw-tf4449911.html#a12696194
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship
Partner and Senior Architect at Feature50

Creator Apache Tapestry and Apache HiveMind

Re: T5: outputRaw and how to display html formated data?

Posted by Nick Westgate <ni...@key-planning.co.jp>.
 > String : the data source should be a string, but the currentTime is a date
 > in my sample, still acceptable, why?

Read about parameter type coercion here:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/parameters.html

Cheers,
Nick.


Angelo Chen wrote:
> Hi Nick,
> 
> Thanks, it works!, I tried to avoid asking question first so I have been
> reading outputraw doc for a long time, but can't understand it, here is:
> 
> Name	Type	Flags	Default	Default Prefix	Description
> value	String	Required		prop	The value to to render. If unbound, and a
> property of the container matches the component's id, then that property
> will be the source of the value.
> 
> Here is how I undertand it:
> 
> Value : parameter name, use it to specify a data source
> String : the data source should be a string, but the currentTime is a date
> in my sample, still acceptable, why?
> Prop: the data source should have a prefix which defaults to 'prob'
> 
> and also the description, how to interpret it? help me understand it so that
> I can understand the rest of the doc, thanks.
> 
> A.C.
> 
> 
> 
> 
> 
> Nick Westgate wrote:
>> Attributes default to the prop binding, so there's no need to use
>> expansions:
>>      <t:outputraw value = "currentTime}" />
>>
>> See the current "loop problem" thread.
>>
>> Cheers,
>> Nick.
>>
>>
>> Angelo Chen wrote:
>>> Hi Erik,
>>>
>>> To make things easier, i use this:
>>>
>>>   public Date getCurrentTime()
>>> 	{
>>> 		return new Date();
>>> 	}        
>>>
>>> then in my html file I use:
>>>
>>>   <t:outputraw value = "${CurrentTime}" />
>>>
>>> when the page is displayed second time, the time does not change, you
>>> have
>>> to restart the program to have the time updated, my impression is,
>>> outputraw
>>> will update the template and remain static until re-start, if that's the
>>> case, my question is, how to display html formated data?
>>>
>>>
>>> Erik Vullings-2 wrote:
>>>> Hi Angelo,
>>>>
>>>> And how did you define currentuser? Any annotations?
>>>>
>>>> Cheers, Erik
>>>>
>> ---------------------------------------------------------------------
>> 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: T5: outputRaw and how to display html formated data?

Posted by Angelo Chen <an...@yahoo.com.hk>.
Hi Nick,

Thanks, it works!, I tried to avoid asking question first so I have been
reading outputraw doc for a long time, but can't understand it, here is:

Name	Type	Flags	Default	Default Prefix	Description
value	String	Required		prop	The value to to render. If unbound, and a
property of the container matches the component's id, then that property
will be the source of the value.

Here is how I undertand it:

Value : parameter name, use it to specify a data source
String : the data source should be a string, but the currentTime is a date
in my sample, still acceptable, why?
Prop: the data source should have a prefix which defaults to 'prob'

and also the description, how to interpret it? help me understand it so that
I can understand the rest of the doc, thanks.

A.C.





Nick Westgate wrote:
> 
> Attributes default to the prop binding, so there's no need to use
> expansions:
>      <t:outputraw value = "currentTime}" />
> 
> See the current "loop problem" thread.
> 
> Cheers,
> Nick.
> 
> 
> Angelo Chen wrote:
>> Hi Erik,
>> 
>> To make things easier, i use this:
>> 
>>   public Date getCurrentTime()
>> 	{
>> 		return new Date();
>> 	}        
>> 
>> then in my html file I use:
>> 
>>   <t:outputraw value = "${CurrentTime}" />
>> 
>> when the page is displayed second time, the time does not change, you
>> have
>> to restart the program to have the time updated, my impression is,
>> outputraw
>> will update the template and remain static until re-start, if that's the
>> case, my question is, how to display html formated data?
>> 
>> 
>> Erik Vullings-2 wrote:
>>> Hi Angelo,
>>>
>>> And how did you define currentuser? Any annotations?
>>>
>>> Cheers, Erik
>>>
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/T5%3A-outputRaw-tf4449911.html#a12728683
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: T5: outputRaw and how to display html formated data?

Posted by Nick Westgate <ni...@key-planning.co.jp>.
Attributes default to the prop binding, so there's no need to use expansions:
     <t:outputraw value = "currentTime}" />

See the current "loop problem" thread.

Cheers,
Nick.


Angelo Chen wrote:
> Hi Erik,
> 
> To make things easier, i use this:
> 
>   public Date getCurrentTime()
> 	{
> 		return new Date();
> 	}        
> 
> then in my html file I use:
> 
>   <t:outputraw value = "${CurrentTime}" />
> 
> when the page is displayed second time, the time does not change, you have
> to restart the program to have the time updated, my impression is, outputraw
> will update the template and remain static until re-start, if that's the
> case, my question is, how to display html formated data?
> 
> 
> Erik Vullings-2 wrote:
>> Hi Angelo,
>>
>> And how did you define currentuser? Any annotations?
>>
>> Cheers, Erik
>>
> 

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


Re: T5: outputRaw and how to display html formated data?

Posted by Angelo Chen <an...@yahoo.com.hk>.
Hi Erik,

To make things easier, i use this:

  public Date getCurrentTime()
	{
		return new Date();
	}        

then in my html file I use:

  <t:outputraw value = "${CurrentTime}" />

when the page is displayed second time, the time does not change, you have
to restart the program to have the time updated, my impression is, outputraw
will update the template and remain static until re-start, if that's the
case, my question is, how to display html formated data?


Erik Vullings-2 wrote:
> 
> Hi Angelo,
> 
> And how did you define currentuser? Any annotations?
> 
> Cheers, Erik
> 

-- 
View this message in context: http://www.nabble.com/T5%3A-outputRaw-tf4449911.html#a12727880
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: T5: outputRaw

Posted by Marcelo Lotif <ml...@gmail.com>.
i saw it few minutes ago...
try to write:
<t:outputraw value = "CurrentUser.about" />

2007/9/16, Erik Vullings <er...@gmail.com>:
>
> Hi Angelo,
>
> And how did you define currentuser? Any annotations?
>
> Cheers, Erik
>
> On 9/16/07, Angelo Chen <an...@yahoo.com.hk> wrote:
> >
> >
> > Hi,
> > I use following code to output a html text, but it works first time,
> when
> > I
> > switch to other users, the page will never be updated, remain the
> contents
> > from the first user, any hint? thanks.
> >
> > <div id="profile_right">
> >             <t:outputraw value = "${CurrentUser.about}" />  </div>
> >
> > A.c.
> > --
> > View this message in context:
> > http://www.nabble.com/T5%3A-outputRaw-tf4449911.html#a12696194
> > Sent from the Tapestry - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>



-- 
Atenciosamente,
Marcelo Lotif

Re: T5: outputRaw

Posted by Erik Vullings <er...@gmail.com>.
Hi Angelo,

And how did you define currentuser? Any annotations?

Cheers, Erik

On 9/16/07, Angelo Chen <an...@yahoo.com.hk> wrote:
>
>
> Hi,
> I use following code to output a html text, but it works first time, when
> I
> switch to other users, the page will never be updated, remain the contents
> from the first user, any hint? thanks.
>
> <div id="profile_right">
>             <t:outputraw value = "${CurrentUser.about}" />  </div>
>
> A.c.
> --
> View this message in context:
> http://www.nabble.com/T5%3A-outputRaw-tf4449911.html#a12696194
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>