You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Alexandru Objelean (JIRA)" <ji...@apache.org> on 2009/11/28 07:51:20 UTC

[jira] Created: (WICKET-2590) AjaxLazyLoadPanel callback script rendering

AjaxLazyLoadPanel callback script rendering
-------------------------------------------

                 Key: WICKET-2590
                 URL: https://issues.apache.org/jira/browse/WICKET-2590
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
    Affects Versions: 1.4.3
            Reporter: Alexandru Objelean


I have a use-case when an AjaxLazyLoadPanel needs to be loaded later then on 
document "onready" js event (triggered later by some client-side event, like 
click on some button). The way it is implemented right now, there is no way 
to override AjaxLazyLoadPanel & change callback handling script. It would be 
useful if instead of: 

================================= 
add(new AbstractDefaultAjaxBehavior() { 
  ... 
  @Override 
  public void renderHead(IHeaderResponse response) 
  { 
    super.renderHead(response); 
    response.renderOnDomReadyJavascript(getCallbackScript().toString()); 
  } 
  ... 
} 
================================= 

it would be a protected method which would do the same thing: 

================================= 
add(new AbstractDefaultAjaxBehavior() { 
  ... 
   @Override 
  public void renderHead(final IHeaderResponse response) { 
    super.renderHead(response); 
    handleCallbackScript(response, getCallbackScript().toString()); 
  } 
  ... 
} 

protected void handleCallbackScript(final IHeaderResponse response, final 
String callbackScript) { 
  response.renderOnDomReadyJavascript(callbackScript); 
} 
================================= 

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


[jira] Resolved: (WICKET-2590) AjaxLazyLoadPanel callback script rendering

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juergen Donnerstag resolved WICKET-2590.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5-M1
                   1.4.4
         Assignee: Juergen Donnerstag

forget my previous comment. Fixed it

> AjaxLazyLoadPanel callback script rendering
> -------------------------------------------
>
>                 Key: WICKET-2590
>                 URL: https://issues.apache.org/jira/browse/WICKET-2590
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.3
>            Reporter: Alexandru Objelean
>            Assignee: Juergen Donnerstag
>             Fix For: 1.4.4, 1.5-M1
>
>
> I have a use-case when an AjaxLazyLoadPanel needs to be loaded later then on 
> document "onready" js event (triggered later by some client-side event, like 
> click on some button). The way it is implemented right now, there is no way 
> to override AjaxLazyLoadPanel & change callback handling script. It would be 
> useful if instead of: 
> ================================= 
> add(new AbstractDefaultAjaxBehavior() { 
>   ... 
>   @Override 
>   public void renderHead(IHeaderResponse response) 
>   { 
>     super.renderHead(response); 
>     response.renderOnDomReadyJavascript(getCallbackScript().toString()); 
>   } 
>   ... 
> } 
> ================================= 
> it would be a protected method which would do the same thing: 
> ================================= 
> add(new AbstractDefaultAjaxBehavior() { 
>   ... 
>    @Override 
>   public void renderHead(final IHeaderResponse response) { 
>     super.renderHead(response); 
>     handleCallbackScript(response, getCallbackScript().toString()); 
>   } 
>   ... 
> } 
> protected void handleCallbackScript(final IHeaderResponse response, final 
> String callbackScript) { 
>   response.renderOnDomReadyJavascript(callbackScript); 
> } 
> ================================= 

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


[jira] Commented: (WICKET-2590) AjaxLazyLoadPanel callback script rendering

Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12783224#action_12783224 ] 

Johan Compagner commented on WICKET-2590:
-----------------------------------------

so you want to show something when a user presses a button?
why would you use the ajax lazy load for that? just when the button is pressed show that panel (make it visible or add it to a listview or something like that)

> AjaxLazyLoadPanel callback script rendering
> -------------------------------------------
>
>                 Key: WICKET-2590
>                 URL: https://issues.apache.org/jira/browse/WICKET-2590
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.3
>            Reporter: Alexandru Objelean
>
> I have a use-case when an AjaxLazyLoadPanel needs to be loaded later then on 
> document "onready" js event (triggered later by some client-side event, like 
> click on some button). The way it is implemented right now, there is no way 
> to override AjaxLazyLoadPanel & change callback handling script. It would be 
> useful if instead of: 
> ================================= 
> add(new AbstractDefaultAjaxBehavior() { 
>   ... 
>   @Override 
>   public void renderHead(IHeaderResponse response) 
>   { 
>     super.renderHead(response); 
>     response.renderOnDomReadyJavascript(getCallbackScript().toString()); 
>   } 
>   ... 
> } 
> ================================= 
> it would be a protected method which would do the same thing: 
> ================================= 
> add(new AbstractDefaultAjaxBehavior() { 
>   ... 
>    @Override 
>   public void renderHead(final IHeaderResponse response) { 
>     super.renderHead(response); 
>     handleCallbackScript(response, getCallbackScript().toString()); 
>   } 
>   ... 
> } 
> protected void handleCallbackScript(final IHeaderResponse response, final 
> String callbackScript) { 
>   response.renderOnDomReadyJavascript(callbackScript); 
> } 
> ================================= 

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


[jira] Commented: (WICKET-2590) AjaxLazyLoadPanel callback script rendering

Posted by "Alexandru Objelean (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12783292#action_12783292 ] 

Alexandru Objelean commented on WICKET-2590:
--------------------------------------------

That means that some extra wicket code required to make it work. With this kind of change, I can make it work by handling some javascript & this gives me some flexibility with no price. Also it doesn't affect the component behavior at all & will work as before.

> AjaxLazyLoadPanel callback script rendering
> -------------------------------------------
>
>                 Key: WICKET-2590
>                 URL: https://issues.apache.org/jira/browse/WICKET-2590
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.3
>            Reporter: Alexandru Objelean
>
> I have a use-case when an AjaxLazyLoadPanel needs to be loaded later then on 
> document "onready" js event (triggered later by some client-side event, like 
> click on some button). The way it is implemented right now, there is no way 
> to override AjaxLazyLoadPanel & change callback handling script. It would be 
> useful if instead of: 
> ================================= 
> add(new AbstractDefaultAjaxBehavior() { 
>   ... 
>   @Override 
>   public void renderHead(IHeaderResponse response) 
>   { 
>     super.renderHead(response); 
>     response.renderOnDomReadyJavascript(getCallbackScript().toString()); 
>   } 
>   ... 
> } 
> ================================= 
> it would be a protected method which would do the same thing: 
> ================================= 
> add(new AbstractDefaultAjaxBehavior() { 
>   ... 
>    @Override 
>   public void renderHead(final IHeaderResponse response) { 
>     super.renderHead(response); 
>     handleCallbackScript(response, getCallbackScript().toString()); 
>   } 
>   ... 
> } 
> protected void handleCallbackScript(final IHeaderResponse response, final 
> String callbackScript) { 
>   response.renderOnDomReadyJavascript(callbackScript); 
> } 
> ================================= 

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


[jira] Commented: (WICKET-2590) AjaxLazyLoadPanel callback script rendering

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12783366#action_12783366 ] 

Juergen Donnerstag commented on WICKET-2590:
--------------------------------------------

why can't you just subclass getCallbackScript() ?

> AjaxLazyLoadPanel callback script rendering
> -------------------------------------------
>
>                 Key: WICKET-2590
>                 URL: https://issues.apache.org/jira/browse/WICKET-2590
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.3
>            Reporter: Alexandru Objelean
>
> I have a use-case when an AjaxLazyLoadPanel needs to be loaded later then on 
> document "onready" js event (triggered later by some client-side event, like 
> click on some button). The way it is implemented right now, there is no way 
> to override AjaxLazyLoadPanel & change callback handling script. It would be 
> useful if instead of: 
> ================================= 
> add(new AbstractDefaultAjaxBehavior() { 
>   ... 
>   @Override 
>   public void renderHead(IHeaderResponse response) 
>   { 
>     super.renderHead(response); 
>     response.renderOnDomReadyJavascript(getCallbackScript().toString()); 
>   } 
>   ... 
> } 
> ================================= 
> it would be a protected method which would do the same thing: 
> ================================= 
> add(new AbstractDefaultAjaxBehavior() { 
>   ... 
>    @Override 
>   public void renderHead(final IHeaderResponse response) { 
>     super.renderHead(response); 
>     handleCallbackScript(response, getCallbackScript().toString()); 
>   } 
>   ... 
> } 
> protected void handleCallbackScript(final IHeaderResponse response, final 
> String callbackScript) { 
>   response.renderOnDomReadyJavascript(callbackScript); 
> } 
> ================================= 

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


[jira] Issue Comment Edited: (WICKET-2590) AjaxLazyLoadPanel callback script rendering

Posted by "Alexandru Objelean (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12783292#action_12783292 ] 

Alexandru Objelean edited comment on WICKET-2590 at 11/28/09 9:43 PM:
----------------------------------------------------------------------

That means that some extra wicket code required to make it work. With this kind of change, I can make it work by handling some javascript only (no AjaxButton component is needed, I can trigger execution of the script whenever I want) this gives me some flexibility with no price. Also it doesn't affect the component behavior at all & will work as before.

      was (Author: alexandru.objelean):
    That means that some extra wicket code required to make it work. With this kind of change, I can make it work by handling some javascript & this gives me some flexibility with no price. Also it doesn't affect the component behavior at all & will work as before.
  
> AjaxLazyLoadPanel callback script rendering
> -------------------------------------------
>
>                 Key: WICKET-2590
>                 URL: https://issues.apache.org/jira/browse/WICKET-2590
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.3
>            Reporter: Alexandru Objelean
>
> I have a use-case when an AjaxLazyLoadPanel needs to be loaded later then on 
> document "onready" js event (triggered later by some client-side event, like 
> click on some button). The way it is implemented right now, there is no way 
> to override AjaxLazyLoadPanel & change callback handling script. It would be 
> useful if instead of: 
> ================================= 
> add(new AbstractDefaultAjaxBehavior() { 
>   ... 
>   @Override 
>   public void renderHead(IHeaderResponse response) 
>   { 
>     super.renderHead(response); 
>     response.renderOnDomReadyJavascript(getCallbackScript().toString()); 
>   } 
>   ... 
> } 
> ================================= 
> it would be a protected method which would do the same thing: 
> ================================= 
> add(new AbstractDefaultAjaxBehavior() { 
>   ... 
>    @Override 
>   public void renderHead(final IHeaderResponse response) { 
>     super.renderHead(response); 
>     handleCallbackScript(response, getCallbackScript().toString()); 
>   } 
>   ... 
> } 
> protected void handleCallbackScript(final IHeaderResponse response, final 
> String callbackScript) { 
>   response.renderOnDomReadyJavascript(callbackScript); 
> } 
> ================================= 

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