a minimal tree or passing the valuebindings through the url won´t work
if someone uses it in a uidata component with a row dependent value.

Writing the binary stream into a tempfile during the render phase will
not work in clustered environments but we could make it an option for
the user. It would be easy to implement since an url param points to
the created file.


2005/9/29, Mike Kienenberger <[EMAIL PROTECTED]>:
> Of the names presented, I also like graphicImageDynamic the best (and had
> already named my facelets tag handler graphicImageDynamicTagHandler)
>
>  I've been thinking more about the minimal tree construction, and it occurs
> to me that we don't really care what tree exists -- we just want the method
> binding strings for getBytesMethod and getContentTypeMethod.
>
>  I'd almost like to suggest that we simply stick those strings into the URL
> instead of the jsf state.    The only downsides are that there are now
> security concerns since a client could craft any EL expression that they
> want.
>
>  I also agree that storing the data in the session is undesirable.   I'm
> trying to write session-scope-less applications currently so I don't have to
> deal with back button problems (beyond underlying resource changes -- like
> databases).
>
> However, I don't see that initializationParameters is much better.   It does
> keep the parameters request-scoped, but it pushes the caching and
> identification management back into the application code.
>
>  Other than security concerns, sticking the method binding attributes
> directly into the url seems best :)
>
>  Maybe we can cryptologically sign the URL somehow -- hash the strings
> against the jsf state tree or something and also pass that as an argument :)
>
>
>
>
> On 9/29/05, Sylvain Vieujot <[EMAIL PROTECTED]> wrote:
> > I just would like to settle on this, as the earlier we do the rename, the
> easiest it'll be.
> >
> > Any opinion on those graphicImageBytes & downloadBytes names ?
> > Any better proposal ?
> >
> > Thanks,
> >
> > Sylvain.
> >
> >
> > On Wed, 2005-09-28 at 13:09 -0400, Sylvain Vieujot wrote:
> >
> > I like the fact that it starts like the standard graphicImage component,
> but the Dynamic part is good to.
> > What about graphicImageDynamic?
> > A bite long though
> >
> > Or maybe graphicImageBytes, which would be consistent with a downloadBytes
> tag ?
> >
> > On Wed, 2005-09-28 at 08:49 -0400, Sean Schofield wrote:
> > How about something like dynaImage?
> >
> > sean
> >
> > On 9/28/05, Mathias Brökelmann <
> > [EMAIL PROTECTED]> wrote:
> > > Great! We definitely need a component to render dynamic images.
> > >
> > > I took a view into the code and saw that the state is appended to the
> >
> > > image url. IMO it will not work in every case since the state could be
> > > very large and as far as I know there is a limitation around 1024
> >
> > > chars in a request url.
> > >
> > > The other thing is the phase listener which will not work if the
> >
> > > component is used in a uidata component. Try using a custom faces
> > > event which is queued through UIComponent.queueEvent(...).
> > >
> >
> > >
> > > 2005/9/28, Sylvain Vieujot <[EMAIL PROTECTED]>:
> >
> > > > I just committed a first working version of a graphicImage component
> that
> > > > displays the images from bytes, and that doesn't need an additional
> servlet.
> >
> > > >
> > > > It works, but there is still work to be done (See the TODOs in the
> > > > component's java file).
> > > >
> >
> > > > The most important things are :
> > > > 1) Find a good name for this component. Right now, it says Ajax
> whereas
> >
> > > > it's not really Ajax.
> > > > 2) Extend it to make download links (uses an <a> instead of an <img>
> > > >
> >
> > > > Thanks for your ideas,
> > > >
> > > > Sylvain.
> > > >
> > > > On Tue, 2005-09-27 at 12:35 -0400, Mike Kienenberger wrote:
> >
> > > > Sylvain,
> > > >
> > > > I'm definitely interested in a component that can display an image
> >
> > > > from bytes as well, if you want any assistance.
> > > >
> > > > "-- need a dynamic image servlet" is the next item on my todo list :)
> >
> > > >
> > > > 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
> > > > >
> > > > >
> > > >
> > > >
> >
> > >
> > >
> > > --
> > > Mathias
> > >
> >
> >
>
>


--
Mathias

Reply via email to