You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Vjeran Marcinko <vj...@email.t-com.hr> on 2009/06/29 12:29:57 UTC

Tapestry not suitable for this environment?

Hi,

I think I already know the answer, but I just want to be sure.
Looking at some non-Tapestry web applications in my company, some of them 
are deployed in environments where customer's header and footer have to be 
included in application's web layout. This is not the case where customer's 
web portal includes my application inside some "iframe", but they provide 
header as HTML portion that contains starting tags such as 
<html>,<head>,<body> and some content. Likewise, footer contains ending tags 
(</html> etc..) and content. And I have to include them at start and end of 
my web application.

Since Tapestry controls the whole page during processing, adding all kind of 
stuff in its head or footer, I guess tapestry is not suitable for these 
environments?

Regards,
Vjeran 


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


Re: Tapestry not suitable for this environment?

Posted by Andy Pahne <an...@googlemail.com>.
You can simply fetch any remote content and write it out raw. We are 
doing this all the time...


Ben Gidley schrieb:
> You could still do this if the HTML is relatively clean.
> In your layout rather than provide a TML you can programatically create the
> HTML element by element. So you could fetch their file and then parse it and
> load it in bit by bit. That wouldn't break anything.
>
> There is a very basic example of writing content in
> http://tapestry.apache.org/tapestry5.1/guide/component-classes.html. You
> basically just use the writer class to output everything.
>
> For performance (as remote fetching will be slow) you would probably want to
> cache the fetched snippet in memory.
>
>
> Ben Gidley
>
> www.gidley.co.uk
> ben@gidley.co.uk
>
>
> On Mon, Jun 29, 2009 at 12:16 PM, Vjeran Marcinko <
> vjeran.marcinko@email.t-com.hr> wrote:
>
>   
>> Sorry for not explaiining the thing clear enough...
>> I need to include dynamicaly this header and footer from remote location.
>> Usually this is achieved inside some other framework like this (velocity
>> template - layout.vm):
>>
>> $includeTool.include(http://someheader.url)
>> $screen_content
>> $includeTool.include(http://somefooter.url)
>>
>> I guess I could probably make some type of this "IncludeTool" in Tapestry,
>> but I guess Tapestry requires HTML portion like <head> to be statically
>> present inside template to be able to manipulate with it (like adding
>> javascript file references etc...). If this HTML portion is contained at
>> remote location, then Tapestry cannot manage it I guess.
>>
>> Regards,
>> Vjeran
>>
>> ----- Original Message ----- From: "Ben Gidley" <be...@gidley.co.uk>
>> To: "Tapestry users" <us...@tapestry.apache.org>
>> Sent: Monday, June 29, 2009 12:59 PM
>> Subject: Re: Tapestry not suitable for this environment?
>>
>>
>>
>>  You can do this with tapestry using a 'layout' component see -
>>     
>>> http://tapestry.apache.org/tapestry5.1/guide/layout.html for a guide.
>>> You simply put your customers HTML in that component. Tapestry will write
>>> additional things into the header (e.g. your CSS and javascript) as
>>> required.
>>>
>>>
>>> Ben Gidley
>>>
>>> www.gidley.co.uk
>>> ben@gidley.co.uk
>>>
>>>
>>> 2009/6/29 Vjeran Marcinko <vj...@email.t-com.hr>
>>>
>>>  Hi,
>>>       
>>>> I think I already know the answer, but I just want to be sure.
>>>> Looking at some non-Tapestry web applications in my company, some of them
>>>> are deployed in environments where customer's header and footer have to
>>>> be
>>>> included in application's web layout. This is not the case where
>>>> customer's
>>>> web portal includes my application inside some "iframe", but they provide
>>>> header as HTML portion that contains starting tags such as
>>>> <html>,<head>,<body> and some content. Likewise, footer contains ending
>>>> tags
>>>> (</html> etc..) and content. And I have to include them at start and end
>>>> of
>>>> my web application.
>>>>
>>>> Since Tapestry controls the whole page during processing, adding all kind
>>>> of stuff in its head or footer, I guess tapestry is not suitable for
>>>> these
>>>> environments?
>>>>
>>>> Regards,
>>>> Vjeran
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>
>>
>>     
>
>   


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


Re: Tapestry not suitable for this environment?

Posted by Ben Gidley <be...@gidley.co.uk>.
You could still do this if the HTML is relatively clean.
In your layout rather than provide a TML you can programatically create the
HTML element by element. So you could fetch their file and then parse it and
load it in bit by bit. That wouldn't break anything.

There is a very basic example of writing content in
http://tapestry.apache.org/tapestry5.1/guide/component-classes.html. You
basically just use the writer class to output everything.

For performance (as remote fetching will be slow) you would probably want to
cache the fetched snippet in memory.


Ben Gidley

www.gidley.co.uk
ben@gidley.co.uk


On Mon, Jun 29, 2009 at 12:16 PM, Vjeran Marcinko <
vjeran.marcinko@email.t-com.hr> wrote:

> Sorry for not explaiining the thing clear enough...
> I need to include dynamicaly this header and footer from remote location.
> Usually this is achieved inside some other framework like this (velocity
> template - layout.vm):
>
> $includeTool.include(http://someheader.url)
> $screen_content
> $includeTool.include(http://somefooter.url)
>
> I guess I could probably make some type of this "IncludeTool" in Tapestry,
> but I guess Tapestry requires HTML portion like <head> to be statically
> present inside template to be able to manipulate with it (like adding
> javascript file references etc...). If this HTML portion is contained at
> remote location, then Tapestry cannot manage it I guess.
>
> Regards,
> Vjeran
>
> ----- Original Message ----- From: "Ben Gidley" <be...@gidley.co.uk>
> To: "Tapestry users" <us...@tapestry.apache.org>
> Sent: Monday, June 29, 2009 12:59 PM
> Subject: Re: Tapestry not suitable for this environment?
>
>
>
>  You can do this with tapestry using a 'layout' component see -
>> http://tapestry.apache.org/tapestry5.1/guide/layout.html for a guide.
>> You simply put your customers HTML in that component. Tapestry will write
>> additional things into the header (e.g. your CSS and javascript) as
>> required.
>>
>>
>> Ben Gidley
>>
>> www.gidley.co.uk
>> ben@gidley.co.uk
>>
>>
>> 2009/6/29 Vjeran Marcinko <vj...@email.t-com.hr>
>>
>>  Hi,
>>>
>>> I think I already know the answer, but I just want to be sure.
>>> Looking at some non-Tapestry web applications in my company, some of them
>>> are deployed in environments where customer's header and footer have to
>>> be
>>> included in application's web layout. This is not the case where
>>> customer's
>>> web portal includes my application inside some "iframe", but they provide
>>> header as HTML portion that contains starting tags such as
>>> <html>,<head>,<body> and some content. Likewise, footer contains ending
>>> tags
>>> (</html> etc..) and content. And I have to include them at start and end
>>> of
>>> my web application.
>>>
>>> Since Tapestry controls the whole page during processing, adding all kind
>>> of stuff in its head or footer, I guess tapestry is not suitable for
>>> these
>>> environments?
>>>
>>> Regards,
>>> Vjeran
>>>
>>> ---------------------------------------------------------------------
>>> 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: Tapestry not suitable for this environment?

Posted by Massimo Lusetti <ml...@gmail.com>.
On Mon, Jun 29, 2009 at 1:16 PM, Vjeran
Marcinko<vj...@email.t-com.hr> wrote:

> Sorry for not explaiining the thing clear enough...


Delegate and blocks could help here.


-- 
Massimo
http://meridio.blogspot.com

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


Re: Tapestry not suitable for this environment?

Posted by Vjeran Marcinko <vj...@email.t-com.hr>.
Sorry for not explaiining the thing clear enough...
I need to include dynamicaly this header and footer from remote location. 
Usually this is achieved inside some other framework like this (velocity 
template - layout.vm):

$includeTool.include(http://someheader.url)
$screen_content
$includeTool.include(http://somefooter.url)

I guess I could probably make some type of this "IncludeTool" in Tapestry, 
but I guess Tapestry requires HTML portion like <head> to be statically 
present inside template to be able to manipulate with it (like adding 
javascript file references etc...). If this HTML portion is contained at 
remote location, then Tapestry cannot manage it I guess.

Regards,
Vjeran

----- Original Message ----- 
From: "Ben Gidley" <be...@gidley.co.uk>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Monday, June 29, 2009 12:59 PM
Subject: Re: Tapestry not suitable for this environment?


> You can do this with tapestry using a 'layout' component see -
> http://tapestry.apache.org/tapestry5.1/guide/layout.html for a guide.
> You simply put your customers HTML in that component. Tapestry will write
> additional things into the header (e.g. your CSS and javascript) as
> required.
>
>
> Ben Gidley
>
> www.gidley.co.uk
> ben@gidley.co.uk
>
>
> 2009/6/29 Vjeran Marcinko <vj...@email.t-com.hr>
>
>> Hi,
>>
>> I think I already know the answer, but I just want to be sure.
>> Looking at some non-Tapestry web applications in my company, some of them
>> are deployed in environments where customer's header and footer have to 
>> be
>> included in application's web layout. This is not the case where 
>> customer's
>> web portal includes my application inside some "iframe", but they provide
>> header as HTML portion that contains starting tags such as
>> <html>,<head>,<body> and some content. Likewise, footer contains ending 
>> tags
>> (</html> etc..) and content. And I have to include them at start and end 
>> of
>> my web application.
>>
>> Since Tapestry controls the whole page during processing, adding all kind
>> of stuff in its head or footer, I guess tapestry is not suitable for 
>> these
>> environments?
>>
>> Regards,
>> Vjeran
>>
>> ---------------------------------------------------------------------
>> 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: Tapestry not suitable for this environment?

Posted by Ben Gidley <be...@gidley.co.uk>.
You can do this with tapestry using a 'layout' component see -
http://tapestry.apache.org/tapestry5.1/guide/layout.html for a guide.
You simply put your customers HTML in that component. Tapestry will write
additional things into the header (e.g. your CSS and javascript) as
required.


Ben Gidley

www.gidley.co.uk
ben@gidley.co.uk


2009/6/29 Vjeran Marcinko <vj...@email.t-com.hr>

> Hi,
>
> I think I already know the answer, but I just want to be sure.
> Looking at some non-Tapestry web applications in my company, some of them
> are deployed in environments where customer's header and footer have to be
> included in application's web layout. This is not the case where customer's
> web portal includes my application inside some "iframe", but they provide
> header as HTML portion that contains starting tags such as
> <html>,<head>,<body> and some content. Likewise, footer contains ending tags
> (</html> etc..) and content. And I have to include them at start and end of
> my web application.
>
> Since Tapestry controls the whole page during processing, adding all kind
> of stuff in its head or footer, I guess tapestry is not suitable for these
> environments?
>
> Regards,
> Vjeran
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>