« Return to Thread: Tapestry not suitable for this environment?

Re: Tapestry not suitable for this environment?

by Andy Pahne-6 :: Rate this Message:

Reply to Author | View in Thread


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@...
>
>
> On Mon, Jun 29, 2009 at 12:16 PM, Vjeran Marcinko <
> vjeran.marcinko@...> 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" <ben@...>
>> To: "Tapestry users" <users@...>
>> 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@...
>>>
>>>
>>> 2009/6/29 Vjeran Marcinko <vjeran.marcinko@...>
>>>
>>>  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@...
>>>> For additional commands, e-mail: users-help@...
>>>>
>>>>
>>>>
>>>>        
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@...
>> For additional commands, e-mail: users-help@...
>>
>>
>>    
>
>  


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

 « Return to Thread: Tapestry not suitable for this environment?