Why so complicated?

@Override
public void renderHead(IHeaderResponse response) {
    response.renderOnDomReadyJavascript(init_slider_js());
} 


Peter Ross-6 wrote:
> 
> On Wed, Nov 11, 2009 at 3:48 PM, Jeremy Thomerson
> <jer...@wickettraining.com> wrote:
>> On Tue, Nov 10, 2009 at 10:38 PM, Peter Ross
>> <p...@missioncriticalit.com>wrote:
>>
>>> Hi,
>>>
>>> I'm implementing a control which consists of an integer field and a
>>> slider where the slider comes from jquery UI.
>>>
>>> My question is that whenever the component is refreshed via ajax, you
>>> need to call the js initialization function.
>>>
>>> I've done this by adding a behaviour which determines the request
>>> target, if it's an AjaxRequestTarget it adds the init js to the target
>>> otherwise it outputs it in the header.
>>>
>>> Is this the correct way to do it?  Is there a simpler way?
>>>
>> Yes - this looks fine.  There are multiple ways of accomplishing it, but
>> this one is fine.
>>
> Could you elaborate on what some of the other ways are?
> 
> Just enough key words so that I can do the google search would be fine :)
> 
> Peter
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/correct-way-to-call-necessary-javascript-initialization-when-a--component-is-added-via-ajax-tp26295973p26297483.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to