Looks like this last message I sent didn't reach the mailing list. Sending again... :P

---------- Forwarded message ----------
From: Bruno Borges < [EMAIL PROTECTED]>
Date: May 12, 2006 11:34 AM
Subject: Re: [Wicket-user] Re: Problem loading DatePicker inside Panel through AjaxLink
To: wicket-user@lists.sourceforge.net

I just had an idea: how about require the programmer to inform the current page instance to "register" all Ajax components he pretends to use, _before_ using them? This way the Ajax component could return to the page everything it's going to need and then the page can load .js, .css, whatever in the <head> section.

Like this:

    class SomePage extends WebPage() {
        <constructor> {
             registerComponentHead(((Component) new DatePicker()).getContributedHead());

             AjaxLink a = new AjaxLink() {
                 <event> {
                     Panel p = new SomePanelWithDatePicker();
                     .... // replace and add panel 'p'
                 }
        }
     }

And at Component class, we could encapsulate Head in another class, and make that method getContributedHead returning Head[].

A Head instance must have information about _javascript_s and other resources/meta info, that can only be useful at <head> section.

I know this sounds a little strange, because the possibility of adding panels through reflection (coming from the database maybe?) but the programmer must be careful anyway. But I think that this is the mostly clean way. :)

What you guys think?


On 5/9/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
well, my concern is to make this automatic.

for example:

when a component contributes <script>func whatever() { }</script> through <wicket:head> that contribution needs to magically merge.

or when a component contributes <style>a { color:red; }</style> that also has to magically get merged

but from what i have seen there is no way to do that, you first have to transform these kinds of outputs into a more dynamic version that can then be merged using _javascript_, etc...which is a huge pain.

im not sure how to proceed at all.

-Igor



On 5/9/06, Rüdiger Schulz <[EMAIL PROTECTED]> wrote:
Hello Igor

not sure how iframes behave here, but it is possible to call
_javascript_ functions in one frame, which is defined in another frame,
which then again can do anything with the calling frame. Done this a
couple of years ago (when frames where still en vogue ;), but as it
turned out, nothing like that will be necessary to solve our problem
here :-)

--
greetings from Berlin,

Rüdiger Schulz


Igor Vaynberg wrote on 04.05.2006 at 19:28:

> i guess there can be a hidden iframe, but then the loaded js will
> not be part of the page because frames are isolated, no?

> -Igor


> On 5/4/06, Rüdiger Schulz <[EMAIL PROTECTED]> wrote:
>> in that case i dont see how you can ever make this work in xhtml
>> unless you refresh the entire page.

> A twisted "solution" using an invisible frame loading only JS comes to
> mind ;-)

> - Rüdiger



> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmdlnk kid0709 bid 3057 dat1642
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user









-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnk&kid0709&bid&3057&dat1642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




--
Bruno Borges
Summa Technologies


--
Bruno Borges
Summa Technologies

Reply via email to