Started using Wicket and found a problem ;-)

To reproduce a bug:
1. Make a simple page with a form containing AutoCompleteTextField and
2. In a page-class create a Form, add IndicatingAjaxSubmitButton and then
That's all, your AutoCompleteTextField is not working :-)
BUT, if you change the order of adding components to form so that you first
add AutoCompleteTextField and then IndicatingAjaxSubmitButton all is going
to be ok.

I've created a minimal sample 
This sample reflects my real life situation: parent page with part of the
form + child page with some controls added.

Sneaking through sources I've found a problem here:


        public final void renderHead(final Response response)
                Set contributors = (Set)headContribHolder.get();

                // were any contributors set?
                if (contributors == null)
                        contributors = new HashSet(1);

                // get the id of the implementation; we need this trick to be
                // able to support multiple implementations
                String implementationId = getImplementationId();

                // was a contribution for this specific implementation done yet?
                if (!contributors.contains(implementationId))


<----- is called just once, so if AutoCompleteTextField is first in a list
of page children, then it adds common ajax js's and autocomplete required
js, and if IndicatingAjaxSubmitButton is first in a list of page children,
then it adds just common ajax js's to header.

Can you suggest a patch to this problem ?
View this message in context:
Sent from the Wicket - User forum at

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
Wicket-user mailing list

Reply via email to