Re: T5: how to eval 'canned' expansions (stored in db)?

2010-01-21 Thread britske

I'd rather have an all- tapestry solution. Neverthless i'll have a look
thanks.

2010/1/21 Thiago H. de Paula Figueiredo [via Tapestry Users] <
ml-node+4433143-269793...@n2.nabble.com
>

> On Thu, 21 Jan 2010 09:12:02 -0200, britske <[hidden 
> email]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4433143&i=0>>
> wrote:
>
> > One of these components gets it's content from a database and writes it
>
> > in the BeginRender() - phase.  The content to store in the database is
> > some
> > html possibly with tapestry expansions. E.g: "today is:   #foo
> > ${dateAsString} " or something.  (The database route is the way to go
> > for me in this scenario, as content is not known at design-time)
>
> What about using some template engine like FreeMarker or Velocity in
> conjunction with the OutputRaw component or MarkupWriter.writeRaw()?
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, software architect and developer, Ars Machina Tecnologia da
> Informação Ltda.
> http://www.arsmachina.com.br
>
> -
> To unsubscribe, e-mail: [hidden 
> email]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4433143&i=1>
> For additional commands, e-mail: [hidden 
> email]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4433143&i=2>
>
>
>
> --------------
>  View message @
> http://n2.nabble.com/T5-how-to-eval-canned-expansions-stored-in-db-tp4433039p4433143.html
> To unsubscribe from T5: how to eval 'canned' expansions (stored in db)?, click
> here< (link removed) =>.
>
>
>

-- 
View this message in context: 
http://n2.nabble.com/T5-how-to-eval-canned-expansions-stored-in-db-tp4433039p4434300.html
Sent from the Tapestry Users mailing list archive at Nabble.com.


Re: T5: how to eval 'canned' expansions (stored in db)?

2010-01-21 Thread britske

Thanks, this looks like the way to go.

2010/1/21 Howard Lewis Ship [via Tapestry Users] <
ml-node+4434057-1227788...@n2.nabble.com
>

> You can inject the PropertyConduitSource service (it is public). You
> can obtain PropertyConduits, which are the compiled versions of
> property expressions (as used by parameter bindings).
>
> The PCS caches the result, so it's reasonable to pass an a class and
> an expression, get back a PC, and discard it.
>
> On Thu, Jan 21, 2010 at 3:12 AM, britske <[hidden 
> email]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4434057&i=0>>
> wrote:
>
> >
> > I have a page showing different blocks (ala myYahoo , netvibes, etc) .
> > Each block is a different component.
> >
> > One of these components gets it's content from a database and writes it
> in
> > the BeginRender() - phase.  The content to store in the database is some
> > html possibly with tapestry expansions. E.g: "today is:   #foo
> > ${dateAsString} " or something.  (The database route is the way to go for
> me
> > in this scenario, as content is not known at design-time)
> >
> > Is there a way to "evaluate" the expansions in the the html in the
> > component.beginRender phase and render the result?
> > This would be pretty powerful stuff.
> >
> > Thanks,
> > Geert-Jan
> > --
> > View this message in context:
> http://n2.nabble.com/T5-how-to-eval-canned-expansions-stored-in-db-tp4433039p4433039.html
> > Sent from the Tapestry Users mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: [hidden 
> > email]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4434057&i=1>
> > For additional commands, e-mail: [hidden 
> > email]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4434057&i=2>
> >
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
>
> -----------------
> To unsubscribe, e-mail: [hidden 
> email]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4434057&i=3>
> For additional commands, e-mail: [hidden 
> email]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4434057&i=4>
>
>
>
> --
>  View message @
> http://n2.nabble.com/T5-how-to-eval-canned-expansions-stored-in-db-tp4433039p4434057.html
> To unsubscribe from T5: how to eval 'canned' expansions (stored in db)?, click
> here< (link removed) =>.
>
>
>

-- 
View this message in context: 
http://n2.nabble.com/T5-how-to-eval-canned-expansions-stored-in-db-tp4433039p4434292.html
Sent from the Tapestry Users mailing list archive at Nabble.com.


Re: T5: how to eval 'canned' expansions (stored in db)?

2010-01-21 Thread Howard Lewis Ship
You can inject the PropertyConduitSource service (it is public). You
can obtain PropertyConduits, which are the compiled versions of
property expressions (as used by parameter bindings).

The PCS caches the result, so it's reasonable to pass an a class and
an expression, get back a PC, and discard it.

On Thu, Jan 21, 2010 at 3:12 AM, britske  wrote:
>
> I have a page showing different blocks (ala myYahoo , netvibes, etc) .
> Each block is a different component.
>
> One of these components gets it's content from a database and writes it in
> the BeginRender() - phase.  The content to store in the database is some
> html possibly with tapestry expansions. E.g: "today is:   #foo
> ${dateAsString} " or something.  (The database route is the way to go for me
> in this scenario, as content is not known at design-time)
>
> Is there a way to "evaluate" the expansions in the the html in the
> component.beginRender phase and render the result?
> This would be pretty powerful stuff.
>
> Thanks,
> Geert-Jan
> --
> View this message in context: 
> http://n2.nabble.com/T5-how-to-eval-canned-expansions-stored-in-db-tp4433039p4433039.html
> Sent from the Tapestry Users 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
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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



Re: T5: how to eval 'canned' expansions (stored in db)?

2010-01-21 Thread Thiago H. de Paula Figueiredo

On Thu, 21 Jan 2010 09:12:02 -0200, britske  wrote:

One of these components gets it's content from a database and writes it  
in the BeginRender() - phase.  The content to store in the database is  
some

html possibly with tapestry expansions. E.g: "today is:   #foo
${dateAsString} " or something.  (The database route is the way to go  
for me in this scenario, as content is not known at design-time)


What about using some template engine like FreeMarker or Velocity in  
conjunction with the OutputRaw component or MarkupWriter.writeRaw()?


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, 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



T5: how to eval 'canned' expansions (stored in db)?

2010-01-21 Thread britske

I have a page showing different blocks (ala myYahoo , netvibes, etc) . 
Each block is a different component. 

One of these components gets it's content from a database and writes it in
the BeginRender() - phase.  The content to store in the database is some
html possibly with tapestry expansions. E.g: "today is:   #foo
${dateAsString} " or something.  (The database route is the way to go for me
in this scenario, as content is not known at design-time) 

Is there a way to "evaluate" the expansions in the the html in the
component.beginRender phase and render the result?
This would be pretty powerful stuff.

Thanks, 
Geert-Jan
-- 
View this message in context: 
http://n2.nabble.com/T5-how-to-eval-canned-expansions-stored-in-db-tp4433039p4433039.html
Sent from the Tapestry Users 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