Hello Alberto,

I really think we should configure the renderer by using a map with URL/Name elements, as usually on a J2EE server, you can't access the file system.
I see the "reading a folder" only as an optional nice to have feature.

About generating the XML Config file, I see 2 ways to do it :

1) Hack the Kupu _javascript_ to put the configuration as _javascript_ in the page. I didn't look at this, but it shouldn't be too hard.

2) Use the new ResourceLoader to generate the config file as a response. This might be a little harder to do, but it offers the advantage to be running better with ajax. Indeed, with this, you could have an ajax'ed fileupload component on the page, and Kupu would pickup those files without any need to reload the page.
To see how this work, you might look in the sandbox, and I think there is an example in the examples webapp too.

If you choose option 1, beware to implement the _javascript_ in a separate file by overloading the default code, as Kupu code is moving a lot, and this ensures the smoothest transition while upgrading Kupu. BTW, Kupu is at version 1.3.3 now, while MyFaces' Kupu is only at 1.3.

Sylvain.

On Wed, 2006-01-04 at 18:41 +0100, Alberto Molpeceres wrote:
Hi Sylvain and everyone,

I'm again the guy who wanted to develop some image gallery
functionality on inputHTML editor. I've been working offsite for a few
weeks, but now I want to finish it. Today I've been updating my copy
of MyFaces.

Well, if we want to use Kupu's image library (and I wnat to), I have
to create an XML file with the content of the gallery. Here there are
to posibilities: a map with image content, or simply read the content
of a folder given as attribute to inputHTML tag. I like this second
option, altough the first one is appealing too.

Well, the I need to write this file to a temp file or to generate it
on the fly upon request using the resource extension filter. Could you
help me with this?. I mean, could you say me which options makes more
sense to you?. And if using a the extension filter, could you explain
me how it works or how it should work?.

Any Idea or tip?.

  al.

On 11/14/05, Sylvain Vieujot <[EMAIL PROTECTED]> wrote:
>  I don't like this external config file.
>  I think the proper way of doing this is to overload the Kupu method that
> configures the images library box.
>
>  So, we could pass to the inputHtml tag a Map containing images URLs as Key,
> and Images descriptions as held Objects.
>
>  What do you think ?
>
>  Sylvain.
>

Reply via email to