Sylvain,

Just saw this posted elsewhere.

Maybe it'll be useful.

Performing a JSF GET
http://jroller.com/page/why?entry=how_to_do_a_jsf

It doesn't quite look like what you want, though.

On 9/26/05, Sylvain Vieujot <[EMAIL PROTECTED]> wrote:
>  Yes, you're right, but I was looking for a way to use the same code with a
> get request instead of a post request.
>  So, I think this will work.
>
>  I'll post this soon so that you can check it.
>
>  Thanks,
>
>  Sylvain.
>
>
>  On Mon, 2005-09-26 at 23:24 +0200, Martin Marinschek wrote:
>  The snippet you posted is just about remembering the state of the
> application client side - it doesn't have to do anything with dynamic
> loading of images...
>
> Or do I get you completely wrong?
>
> regards,
>
> Martin
>
> On 9/26/05, Sylvain Vieujot <[EMAIL PROTECTED]> wrote:
> > You're right, Ajax isn't the perfect term for this, as the result won't be
> > XML.
> >
> > But maybe it can work using something similar to that :
> > " callback: function(element,entry) {return
> >
> entry+'&jsf_tree_64='+encodeURIComponent(document.getElementById('jsf_tree_64').value)+'&jsf_state_64='+encodeURIComponent(document.getElementById('jsf_state_64').value)+'&jsf_viewid='+encodeURIComponent(document.getElementById('jsf_viewid').value)}"
> > +
> >
> > (extracted from the inputSuggestAjax code).
> >
> > Thanks for the clue.
> >
> > Sylvain.
> >
> >
> > On Mon, 2005-09-26 at 16:27 -0400, Matt Blum wrote:
> >
> > The XMLHttpRequest object (or the equivalent ActiveX control)'s open
> method
> > takes as its first argument the request method you want to use. So you
> > could make a get request simply by saying:
> >
> > xHR.open("GET", url[, asyncflag][, username][, password]);
> >
> > I believe that answers your question, but I'm not sure I understand how
> > that helps you. I mean, AJAX will return a text string, and possibly a
> > document object if the response is valid XML. It won't return an image.
> > The only way to load an image is, as you say, using the src property of
> the
> > image object, and that will always do a GET. I don't see how you get AJAX
> > to work into this scenario, unless you plan to use it to generate the URL
> > for the image object to load.
> >
> > Or am I just missing something in your original message?
> >
> > -Matt
> >
> >
> > On 9/26/05, Sylvain Vieujot <[EMAIL PROTECTED]> wrote:
> >
> > Hello,
> >
> > I'm trying to make a new component that would display an image, but
> without
> > the need to have a dedicated servlet.
> > It would make applications that use images from a lot of different sources
> > (i.e. servlets) much simpler.
> > Basically, it would be a component like :
> > <x:graphicImageAjax getBytesMethod="#{myBean.imageBytes}"/>
> >
> > As the only way I found to load an image in javascript is image.src="...",
> > I can't use a post request.
> >
> > Does someone know a way either to load an image in javascript with the
> > result of a post request, or a way to use ajax like in inputSuggestAjax,
> but
> > with a get url ?
> >
> > Thanks,
> >
> > Sylvain.
> >
> >
>
>
> --
>
> http://www.irian.at
> Your JSF powerhouse -
> JSF Trainings in English and German
>
>

Reply via email to