You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Alastair Maw (JIRA)" <ji...@apache.org> on 2007/05/14 02:46:15 UTC

[jira] Commented: (WICKET-472) AbstractDefaultAjaxBehavior's findIndicatorId() feature request

    [ https://issues.apache.org/jira/browse/WICKET-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495429 ] 

Alastair Maw commented on WICKET-472:
-------------------------------------

I like this idea, and it's not hard to do. Typical component hierarchy depth isn't that deep, and instanceof checks are reasonably fast. Will squeeze this in before the 1.3 feature freeze.

> AbstractDefaultAjaxBehavior's findIndicatorId() feature request 
> ----------------------------------------------------------------
>
>                 Key: WICKET-472
>                 URL: https://issues.apache.org/jira/browse/WICKET-472
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>            Reporter: Alexandru Objelean
>         Assigned To: Alastair Maw
>             Fix For: 1.3
>
>
> In wicket 1.2.5, is not possible (at least I didn't manage to find a way) to add AjaxIndicator image to a page for all Ajax requests made by its child components.
> Currently, the AbstractDefaultAjaxBehavior has a findIndicatorId() method which is responsible to find the component id which should be Ajax indicator.
> [code]
>         private String findIndicatorId() {
>                 if (getComponent() instanceof IAjaxIndicatorAware) {
>                         return ((IAjaxIndicatorAware)getComponent()).getAjaxIndicatorMarkupId();
>                 }
>                 if (this instanceof IAjaxIndicatorAware) {
>                         return ((IAjaxIndicatorAware)this).getAjaxIndicatorMarkupId();
>                 }
>                 return null;
>         }
> [code]
> Wouldn't it be better if instead of checking only if :
> - the getComponent is instance of the IAjaxIndicatorAware interface, the check would be made up in hierarchy to find the first parent which implements the IAjaxIndicatorAware interface?
> Thus, if my page implements the IAjaxIndicatorAware interface, it will indicate any ajax requests of its components... exact what I need right now.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.