When writing an autocomplete textfield on a form that is first visible,
and after an ajax call rendered invisible, the autocomplete textfields
on this form get rendered anyway in the ajax response.
The method "renderAutocompleteHead" in AbstractAutocompleteBehavior gets
executed,
even if the AutoComplete component to which it is attached is not visible
within the
component hierarchy.
Below the snippet of code that solved it for us ...
In the class AbstractAutoCompleteBehavior, a test on the visibility was
added.
public void renderHead(IHeaderResponse response) {
if(this.getComponent().isVisibleInHierarchy()) {
super.renderHead(response);
renderAutocompleteHead(response);
}
}
The error becomes visible in the debug window on the webpage.
There is already a bug report filed within jira, and a demo application is
included to simulate the problem.
https://issues.apache.org/jira/browse/WICKET-2497
Met vriendelijke groeten,
ANN BAERT
ICT-DEPARTMENT
Internet technologie: Software Engineer
Tel.: +32 56 43 42 11
Fax: +32 56 43 44 88
E-mail: [email protected]
Contactsheet: ANN BAERT TVH FORKLIFT PARTS nv-sa - BRABANTSTRAAT 15 -
B-8790 WAREGEM
Neem even pauze om onze website te bekijken en vertel ons hoe we u kunnen
helpen: www.tvh.com/nl Vooraleer ik print, denk ik aan het milieu.
**** DISCLAIMER ****
<A HREF="http://www.tvh.be/newen/pages/emaildisclaimer.html">
http://www.tvh.be/newen/pages/emaildisclaimer.html </A>
"This message is delivered to all addressees subject to the conditions
set forth in the attached disclaimer, which is an integral part of this
message."