[
https://issues.apache.org/jira/browse/WICKET-2497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ann Baert updated WICKET-2497:
------------------------------
Attachment: AutoCompleteVisibilityBug.zip
Demo webapplication
> AutoComplete textfield ignores "visible" property within hierarchy.
> -------------------------------------------------------------------
>
> Key: WICKET-2497
> URL: https://issues.apache.org/jira/browse/WICKET-2497
> Project: Wicket
> Issue Type: Bug
> Components: wicket-extensions
> Affects Versions: 1.4.2
> Reporter: Ann Baert
> Attachments: AutoCompleteVisibilityBug.zip
>
>
> 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.