You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Håkon Sagehaug <ha...@uni.no> on 2011/09/30 13:14:05 UTC

Embedding a url without using iframe in jsf

Hi all,

This is maybe a more general jsf question, but I´ll take my chances. Is it
possible to include a html page, given as a url, without using iframe? The
use case, is that we use something called Zoho as a viewer for our users
tabular data. How it works is that we send the tsv/cvs/xsl file to Zoho and
get back a url, we can embed. It works using iframe, but if the user
navigates through our portal and wants to view the file again the iframe
starts a new session and the before generated url is no longer valid. So
wondering if there was something similar to iframe at least in what it does,
that allows us to view the file using the  url many times?

cheers, Håkon

Re: Embedding a url without using iframe in jsf

Posted by Anton Gavazuk <an...@gmail.com>.
Or you even can go more JSF way and make your own custom JSF component which
will take care of getting a content by an URL and embedding the content in
final page. In that case you will be able to reuse that component with
single line of code in any page and at the same time have access in runtime
to any JSF standard service.

2011/10/2 Jim May <ji...@gmail.com>

> You could use a javascript library like JQuery to make the process easier.
> That way you don't have to worry about coding the xmlhttp object correctly
> for different browsers. JQuery will give you the ability for ajax request
> and then you can update an element on the page to contain the response.
>
> On Sun, Oct 2, 2011 at 2:13 PM, Werner Punz <we...@gmail.com> wrote:
>
> > Am 9/30/11 1:14 PM, schrieb Håkon Sagehaug:
> >
> >> Hi all,
> >>
> >> This is maybe a more general jsf question, but I´ll take my chances. Is
> it
> >> possible to include a html page, given as a url, without using iframe?
> The
> >> use case, is that we use something called Zoho as a viewer for our users
> >> tabular data. How it works is that we send the tsv/cvs/xsl file to Zoho
> >> and
> >> get back a url, we can embed. It works using iframe, but if the user
> >> navigates through our portal and wants to view the file again the iframe
> >> starts a new session and the before generated url is no longer valid. So
> >> wondering if there was something similar to iframe at least in what it
> >> does,
> >> that allows us to view the file using the  url many times?
> >>
> >>  You can use xmlhttp request and strip out the content you need and use
> > innerHTML.
> > Should work if you dont have styles integrated.
> >
> > Werner
> >
> >
> >
> >
>
>
> --
> James May
> Software Engineer / Architect
> http://www.jamesmay.me
>

Re: Embedding a url without using iframe in jsf

Posted by Jim May <ji...@gmail.com>.
You could use a javascript library like JQuery to make the process easier.
That way you don't have to worry about coding the xmlhttp object correctly
for different browsers. JQuery will give you the ability for ajax request
and then you can update an element on the page to contain the response.

On Sun, Oct 2, 2011 at 2:13 PM, Werner Punz <we...@gmail.com> wrote:

> Am 9/30/11 1:14 PM, schrieb Håkon Sagehaug:
>
>> Hi all,
>>
>> This is maybe a more general jsf question, but I´ll take my chances. Is it
>> possible to include a html page, given as a url, without using iframe? The
>> use case, is that we use something called Zoho as a viewer for our users
>> tabular data. How it works is that we send the tsv/cvs/xsl file to Zoho
>> and
>> get back a url, we can embed. It works using iframe, but if the user
>> navigates through our portal and wants to view the file again the iframe
>> starts a new session and the before generated url is no longer valid. So
>> wondering if there was something similar to iframe at least in what it
>> does,
>> that allows us to view the file using the  url many times?
>>
>>  You can use xmlhttp request and strip out the content you need and use
> innerHTML.
> Should work if you dont have styles integrated.
>
> Werner
>
>
>
>


-- 
James May
Software Engineer / Architect
http://www.jamesmay.me

Re: Embedding a url without using iframe in jsf

Posted by Werner Punz <we...@gmail.com>.
Am 9/30/11 1:14 PM, schrieb Håkon Sagehaug:
> Hi all,
>
> This is maybe a more general jsf question, but I´ll take my chances. Is it
> possible to include a html page, given as a url, without using iframe? The
> use case, is that we use something called Zoho as a viewer for our users
> tabular data. How it works is that we send the tsv/cvs/xsl file to Zoho and
> get back a url, we can embed. It works using iframe, but if the user
> navigates through our portal and wants to view the file again the iframe
> starts a new session and the before generated url is no longer valid. So
> wondering if there was something similar to iframe at least in what it does,
> that allows us to view the file using the  url many times?
>
You can use xmlhttp request and strip out the content you need and use 
innerHTML.
Should work if you dont have styles integrated.

Werner