You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by zoran <je...@gmail.com> on 2010/08/10 03:55:04 UTC
ModalWIndow and update of jQuery component
Hi,
I'm using a ModalWindow with Panel content inside containing a form that
should edit a data for existing objects. From the parent page I'm accessing
the Modal window content to send an Java instance object containing values
that will set the initial values in the form, then I call a show() method to
show a modal window. The problem is that in the form I'm using two jQuery UI
components (slider and datepicker), and I can't find appropriate way to set
its' values.
Normally it should be changed with this javascript:
$('#slider').slider('option','value',5);
$('#datepicker').datepicker('setDate','08/31/2010');
I've tried to add this code in Panel class, and call it before or after
show() method call.
add(new AbstractBehavior(){
private static final long serialVersionUID = 1L;
public void renderHead(IHeaderResponse response){
String
js="$('#slider').slider('option','value',"+sliderExpectedLevel+");";
response.renderJavascript(js, "updateSlider");
};
});
However, this doesn't give results.
The similar panel I'm using on the other page (but this one is not in
ModalWindow) and here this is updated in appropriate way.
Do you know what is the problem here and how can I solve this?
Thanks.
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/ModalWIndow-and-update-of-jQuery-component-tp2319239p2319239.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
RE: ModalWIndow and update of jQuery component
Posted by zoran <je...@gmail.com>.
Thanks.
I solved this. The problem was in that I was trying to set this from the
Panel instead from the parent page.
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/RE-ModalWIndow-and-update-of-jQuery-component-tp2319279p2319288.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
RE: ModalWIndow and update of jQuery component
Posted by Jeffrey Schneller <je...@envisa.com>.
Try using AppendJavascript on the target of the wicket ajax link/button
that shows the ModalWindow.
-----Original Message-----
From: zoran [mailto:jeremycod@gmail.com]
Sent: Monday, August 09, 2010 9:55 PM
To: users@wicket.apache.org
Subject: ModalWIndow and update of jQuery component
Hi,
I'm using a ModalWindow with Panel content inside containing a form that
should edit a data for existing objects. From the parent page I'm
accessing
the Modal window content to send an Java instance object containing
values
that will set the initial values in the form, then I call a show()
method to
show a modal window. The problem is that in the form I'm using two
jQuery UI
components (slider and datepicker), and I can't find appropriate way to
set
its' values.
Normally it should be changed with this javascript:
$('#slider').slider('option','value',5);
$('#datepicker').datepicker('setDate','08/31/2010');
I've tried to add this code in Panel class, and call it before or after
show() method call.
add(new AbstractBehavior(){
private static final long serialVersionUID = 1L;
public void renderHead(IHeaderResponse
response){
String
js="$('#slider').slider('option','value',"+sliderExpectedLevel+");";
response.renderJavascript(js,
"updateSlider");
};
});
However, this doesn't give results.
The similar panel I'm using on the other page (but this one is not in
ModalWindow) and here this is updated in appropriate way.
Do you know what is the problem here and how can I solve this?
Thanks.
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/ModalWIndow-and-update-of-jQu
ery-component-tp2319239p2319239.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org