You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Igor Vaynberg <ig...@gmail.com> on 2008/04/02 20:34:59 UTC
Re: including dynamic page
see markup inheritance wiki page
-igor
On undefined, Milan Křápek <He...@seznam.cz> wrote:
> Hi,
> I am newbie to wicket. And I am just discovering all beautifel thing that wicket provides to me.
>
> I am trying to add to my pages some common look. At first i would like to add to my pages some common header and footer. I am able to add to my pages some static page by inserting code.
>
> add(new Include("header","static_source/Header.html"));
>
> But I considered to add some dynamic header which will contain some info from database source. So I need to include some wicket generated dynamic page. What I need is to call something like
>
> add(new Include("header",Header.class));
>
> where Header is standard dynamic page that is generated by wicket.
>
> Is there any way to include body from one dynamic page to another?? Or I must choose some another aproach?
>
> Thanks for your advices.
> Milan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
RE: Setting wicket field component model via JavaScript
Posted by Michael Mehrle <mi...@ask.com>.
Yeah, I tried that before and it didn't work. Anyway, I fixed it: Turns out that the problem was in the HTML. I manually set the name tag (for JS reasons, don't ask) like this: wicket:message="name=someName"
Once I removed that it worked. Thanks for trying to help though.
Michael
-----Original Message-----
From: snooplsm@gmail.com [mailto:snooplsm@gmail.com] On Behalf Of Ryan Gravener
Sent: Wednesday, April 02, 2008 4:27 PM
To: users@wicket.apache.org
Subject: Re: Setting wicket field component model via JavaScript
new PropertyModel(this, "photoId")
On 4/2/08, Michael Mehrle <mi...@ask.com> wrote:
> Okay, here's the code - I changed the hidden field to a textfield, for
> debugging...
>
> private final class SubmitForm extends MyForm {
> String photoId;
>
> public SubmitForm(String id, IModel model) {
> super(id, model);
>
> // This is actually being set by a JavaScript (jQuery based)
> function after a
> // successful file upload inside the modal.
> final TextField hidden;
> add(hidden = new TextField("hiddenPhotoId", new
> Model(photoId)));
> hidden.setOutputMarkupId(true);
>
> add(new AjaxButton("save", SubmitForm.this) {
> @Override
> protected void onSubmit(AjaxRequestTarget target, Form
> form) {
> modalWindow.setWindowClosedCallback(new
> ModalWindow.WindowClosedCallback() {
> public void onClose(AjaxRequestTarget target) {
> LOG.debug("Photo ID: {}",
> hidden.getModelObjectAsString());
> }
> });
> target.addComponent(hidden);
> modalWindow.close(target);
> }
> });
> }
> }
> }
>
> -----Original Message-----
> From: Maurice Marrink [mailto:marrink@gmail.com]
> Sent: Wednesday, April 02, 2008 3:05 PM
> To: users@wicket.apache.org
> Subject: Re: Setting wicket field component model via JavaScript
>
> Could you show us the rest of the relevant code?
>
> Maurice
>
> On Thu, Apr 3, 2008 at 12:02 AM, Michael Mehrle <mi...@ask.com>
> wrote:
> > Right, I did try that but it's always null. I'm pretty sure I have the
> > model set properly:
> >
> > String id;
> >
> > add(new HiddenField("hidden", new Model(id)));
> >
> > then there's the AjaxButton etc.
> >
> > Not sure what's going on there, it seems very simple but something's
> > broken.
> >
> >
> > -----Original Message-----
> > From: Maurice Marrink [mailto:marrink@gmail.com]
> > Sent: Wednesday, April 02, 2008 2:50 PM
> > To: users@wicket.apache.org
> >
> >
> > Subject: Re: Setting wicket field component model via JavaScript
> >
> > I assume you have a form inside your modalwindow and update the value
> > serverside with an AjaxSubmit- Link or Button ?
> >
> > Then you should be able to get the field's value using
> > field.getModelObject().
> >
> > Maurice
> >
> > On Wed, Apr 2, 2008 at 11:22 PM, Michael Mehrle
> <mi...@ask.com>
> > wrote:
> > > Anyone? Could use a pointer...
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Michael Mehrle [mailto:michael.mehrle@ask.com]
> > > Sent: Wednesday, April 02, 2008 11:42 AM
> > > To: users@wicket.apache.org
> > > Subject: Setting wicket field component model via JavaScript
> > >
> > > Simple scenario: I've got a hidden wicket field which I'm setting
> > with
> > > JavaScript to a value like this:
> > >
> > > hiddenField.value = data.msg;
> > >
> > > When I pop up a JS alert it seems the value is set.
> > >
> > > However, back on the Java side I'm trying to log the field's value
> in
> > my
> > > onClose() method as part of a SetWindowClosedCallback, but the
> model
> > of
> > > the wicket component still is null:
> > >
> > > LOG.debug("Value: {}", hiddenField.getRawInput));
> > >
> > > Obviously I'm missing something in terms of the flow here. How can
> I
> > get
> > > the field's component to be updated?
> > >
> > > Any help would be appreciated.
> > >
> > > Thanks,
> > >
> > > Michael
> > >
> > >
> ---------------------------------------------------------------------
> > > 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
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > 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
> >
> >
>
> ---------------------------------------------------------------------
> 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
>
>
--
Ryan Gravener
http://ryangravener.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Setting wicket field component model via JavaScript
Posted by Ryan Gravener <ry...@ryangravener.com>.
new PropertyModel(this, "photoId")
On 4/2/08, Michael Mehrle <mi...@ask.com> wrote:
> Okay, here's the code - I changed the hidden field to a textfield, for
> debugging...
>
> private final class SubmitForm extends MyForm {
> String photoId;
>
> public SubmitForm(String id, IModel model) {
> super(id, model);
>
> // This is actually being set by a JavaScript (jQuery based)
> function after a
> // successful file upload inside the modal.
> final TextField hidden;
> add(hidden = new TextField("hiddenPhotoId", new
> Model(photoId)));
> hidden.setOutputMarkupId(true);
>
> add(new AjaxButton("save", SubmitForm.this) {
> @Override
> protected void onSubmit(AjaxRequestTarget target, Form
> form) {
> modalWindow.setWindowClosedCallback(new
> ModalWindow.WindowClosedCallback() {
> public void onClose(AjaxRequestTarget target) {
> LOG.debug("Photo ID: {}",
> hidden.getModelObjectAsString());
> }
> });
> target.addComponent(hidden);
> modalWindow.close(target);
> }
> });
> }
> }
> }
>
> -----Original Message-----
> From: Maurice Marrink [mailto:marrink@gmail.com]
> Sent: Wednesday, April 02, 2008 3:05 PM
> To: users@wicket.apache.org
> Subject: Re: Setting wicket field component model via JavaScript
>
> Could you show us the rest of the relevant code?
>
> Maurice
>
> On Thu, Apr 3, 2008 at 12:02 AM, Michael Mehrle <mi...@ask.com>
> wrote:
> > Right, I did try that but it's always null. I'm pretty sure I have the
> > model set properly:
> >
> > String id;
> >
> > add(new HiddenField("hidden", new Model(id)));
> >
> > then there's the AjaxButton etc.
> >
> > Not sure what's going on there, it seems very simple but something's
> > broken.
> >
> >
> > -----Original Message-----
> > From: Maurice Marrink [mailto:marrink@gmail.com]
> > Sent: Wednesday, April 02, 2008 2:50 PM
> > To: users@wicket.apache.org
> >
> >
> > Subject: Re: Setting wicket field component model via JavaScript
> >
> > I assume you have a form inside your modalwindow and update the value
> > serverside with an AjaxSubmit- Link or Button ?
> >
> > Then you should be able to get the field's value using
> > field.getModelObject().
> >
> > Maurice
> >
> > On Wed, Apr 2, 2008 at 11:22 PM, Michael Mehrle
> <mi...@ask.com>
> > wrote:
> > > Anyone? Could use a pointer...
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Michael Mehrle [mailto:michael.mehrle@ask.com]
> > > Sent: Wednesday, April 02, 2008 11:42 AM
> > > To: users@wicket.apache.org
> > > Subject: Setting wicket field component model via JavaScript
> > >
> > > Simple scenario: I've got a hidden wicket field which I'm setting
> > with
> > > JavaScript to a value like this:
> > >
> > > hiddenField.value = data.msg;
> > >
> > > When I pop up a JS alert it seems the value is set.
> > >
> > > However, back on the Java side I'm trying to log the field's value
> in
> > my
> > > onClose() method as part of a SetWindowClosedCallback, but the
> model
> > of
> > > the wicket component still is null:
> > >
> > > LOG.debug("Value: {}", hiddenField.getRawInput));
> > >
> > > Obviously I'm missing something in terms of the flow here. How can
> I
> > get
> > > the field's component to be updated?
> > >
> > > Any help would be appreciated.
> > >
> > > Thanks,
> > >
> > > Michael
> > >
> > >
> ---------------------------------------------------------------------
> > > 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
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > 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
> >
> >
>
> ---------------------------------------------------------------------
> 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
>
>
--
Ryan Gravener
http://ryangravener.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
RE: Setting wicket field component model via JavaScript
Posted by Michael Mehrle <mi...@ask.com>.
Okay, here's the code - I changed the hidden field to a textfield, for
debugging...
private final class SubmitForm extends MyForm {
String photoId;
public SubmitForm(String id, IModel model) {
super(id, model);
// This is actually being set by a JavaScript (jQuery based)
function after a
// successful file upload inside the modal.
final TextField hidden;
add(hidden = new TextField("hiddenPhotoId", new
Model(photoId)));
hidden.setOutputMarkupId(true);
add(new AjaxButton("save", SubmitForm.this) {
@Override
protected void onSubmit(AjaxRequestTarget target, Form
form) {
modalWindow.setWindowClosedCallback(new
ModalWindow.WindowClosedCallback() {
public void onClose(AjaxRequestTarget target) {
LOG.debug("Photo ID: {}",
hidden.getModelObjectAsString());
}
});
target.addComponent(hidden);
modalWindow.close(target);
}
});
}
}
}
-----Original Message-----
From: Maurice Marrink [mailto:marrink@gmail.com]
Sent: Wednesday, April 02, 2008 3:05 PM
To: users@wicket.apache.org
Subject: Re: Setting wicket field component model via JavaScript
Could you show us the rest of the relevant code?
Maurice
On Thu, Apr 3, 2008 at 12:02 AM, Michael Mehrle <mi...@ask.com>
wrote:
> Right, I did try that but it's always null. I'm pretty sure I have the
> model set properly:
>
> String id;
>
> add(new HiddenField("hidden", new Model(id)));
>
> then there's the AjaxButton etc.
>
> Not sure what's going on there, it seems very simple but something's
> broken.
>
>
> -----Original Message-----
> From: Maurice Marrink [mailto:marrink@gmail.com]
> Sent: Wednesday, April 02, 2008 2:50 PM
> To: users@wicket.apache.org
>
>
> Subject: Re: Setting wicket field component model via JavaScript
>
> I assume you have a form inside your modalwindow and update the value
> serverside with an AjaxSubmit- Link or Button ?
>
> Then you should be able to get the field's value using
> field.getModelObject().
>
> Maurice
>
> On Wed, Apr 2, 2008 at 11:22 PM, Michael Mehrle
<mi...@ask.com>
> wrote:
> > Anyone? Could use a pointer...
> >
> >
> >
> > -----Original Message-----
> > From: Michael Mehrle [mailto:michael.mehrle@ask.com]
> > Sent: Wednesday, April 02, 2008 11:42 AM
> > To: users@wicket.apache.org
> > Subject: Setting wicket field component model via JavaScript
> >
> > Simple scenario: I've got a hidden wicket field which I'm setting
> with
> > JavaScript to a value like this:
> >
> > hiddenField.value = data.msg;
> >
> > When I pop up a JS alert it seems the value is set.
> >
> > However, back on the Java side I'm trying to log the field's value
in
> my
> > onClose() method as part of a SetWindowClosedCallback, but the
model
> of
> > the wicket component still is null:
> >
> > LOG.debug("Value: {}", hiddenField.getRawInput));
> >
> > Obviously I'm missing something in terms of the flow here. How can
I
> get
> > the field's component to be updated?
> >
> > Any help would be appreciated.
> >
> > Thanks,
> >
> > Michael
> >
> >
---------------------------------------------------------------------
> > 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
> >
> >
>
> ---------------------------------------------------------------------
> 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
>
>
---------------------------------------------------------------------
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
Re: Setting wicket field component model via JavaScript
Posted by Maurice Marrink <ma...@gmail.com>.
Could you show us the rest of the relevant code?
Maurice
On Thu, Apr 3, 2008 at 12:02 AM, Michael Mehrle <mi...@ask.com> wrote:
> Right, I did try that but it's always null. I'm pretty sure I have the
> model set properly:
>
> String id;
>
> add(new HiddenField("hidden", new Model(id)));
>
> then there's the AjaxButton etc.
>
> Not sure what's going on there, it seems very simple but something's
> broken.
>
>
> -----Original Message-----
> From: Maurice Marrink [mailto:marrink@gmail.com]
> Sent: Wednesday, April 02, 2008 2:50 PM
> To: users@wicket.apache.org
>
>
> Subject: Re: Setting wicket field component model via JavaScript
>
> I assume you have a form inside your modalwindow and update the value
> serverside with an AjaxSubmit- Link or Button ?
>
> Then you should be able to get the field's value using
> field.getModelObject().
>
> Maurice
>
> On Wed, Apr 2, 2008 at 11:22 PM, Michael Mehrle <mi...@ask.com>
> wrote:
> > Anyone? Could use a pointer...
> >
> >
> >
> > -----Original Message-----
> > From: Michael Mehrle [mailto:michael.mehrle@ask.com]
> > Sent: Wednesday, April 02, 2008 11:42 AM
> > To: users@wicket.apache.org
> > Subject: Setting wicket field component model via JavaScript
> >
> > Simple scenario: I've got a hidden wicket field which I'm setting
> with
> > JavaScript to a value like this:
> >
> > hiddenField.value = data.msg;
> >
> > When I pop up a JS alert it seems the value is set.
> >
> > However, back on the Java side I'm trying to log the field's value in
> my
> > onClose() method as part of a SetWindowClosedCallback, but the model
> of
> > the wicket component still is null:
> >
> > LOG.debug("Value: {}", hiddenField.getRawInput));
> >
> > Obviously I'm missing something in terms of the flow here. How can I
> get
> > the field's component to be updated?
> >
> > Any help would be appreciated.
> >
> > Thanks,
> >
> > Michael
> >
> > ---------------------------------------------------------------------
> > 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
> >
> >
>
> ---------------------------------------------------------------------
> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
RE: Setting wicket field component model via JavaScript
Posted by Michael Mehrle <mi...@ask.com>.
Right, I did try that but it's always null. I'm pretty sure I have the
model set properly:
String id;
add(new HiddenField("hidden", new Model(id)));
then there's the AjaxButton etc.
Not sure what's going on there, it seems very simple but something's
broken.
-----Original Message-----
From: Maurice Marrink [mailto:marrink@gmail.com]
Sent: Wednesday, April 02, 2008 2:50 PM
To: users@wicket.apache.org
Subject: Re: Setting wicket field component model via JavaScript
I assume you have a form inside your modalwindow and update the value
serverside with an AjaxSubmit- Link or Button ?
Then you should be able to get the field's value using
field.getModelObject().
Maurice
On Wed, Apr 2, 2008 at 11:22 PM, Michael Mehrle <mi...@ask.com>
wrote:
> Anyone? Could use a pointer...
>
>
>
> -----Original Message-----
> From: Michael Mehrle [mailto:michael.mehrle@ask.com]
> Sent: Wednesday, April 02, 2008 11:42 AM
> To: users@wicket.apache.org
> Subject: Setting wicket field component model via JavaScript
>
> Simple scenario: I've got a hidden wicket field which I'm setting
with
> JavaScript to a value like this:
>
> hiddenField.value = data.msg;
>
> When I pop up a JS alert it seems the value is set.
>
> However, back on the Java side I'm trying to log the field's value in
my
> onClose() method as part of a SetWindowClosedCallback, but the model
of
> the wicket component still is null:
>
> LOG.debug("Value: {}", hiddenField.getRawInput));
>
> Obviously I'm missing something in terms of the flow here. How can I
get
> the field's component to be updated?
>
> Any help would be appreciated.
>
> Thanks,
>
> Michael
>
> ---------------------------------------------------------------------
> 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
>
>
---------------------------------------------------------------------
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
Re: Setting wicket field component model via JavaScript
Posted by Maurice Marrink <ma...@gmail.com>.
I assume you have a form inside your modalwindow and update the value
serverside with an AjaxSubmit- Link or Button ?
Then you should be able to get the field's value using field.getModelObject().
Maurice
On Wed, Apr 2, 2008 at 11:22 PM, Michael Mehrle <mi...@ask.com> wrote:
> Anyone? Could use a pointer...
>
>
>
> -----Original Message-----
> From: Michael Mehrle [mailto:michael.mehrle@ask.com]
> Sent: Wednesday, April 02, 2008 11:42 AM
> To: users@wicket.apache.org
> Subject: Setting wicket field component model via JavaScript
>
> Simple scenario: I've got a hidden wicket field which I'm setting with
> JavaScript to a value like this:
>
> hiddenField.value = data.msg;
>
> When I pop up a JS alert it seems the value is set.
>
> However, back on the Java side I'm trying to log the field's value in my
> onClose() method as part of a SetWindowClosedCallback, but the model of
> the wicket component still is null:
>
> LOG.debug("Value: {}", hiddenField.getRawInput));
>
> Obviously I'm missing something in terms of the flow here. How can I get
> the field's component to be updated?
>
> Any help would be appreciated.
>
> Thanks,
>
> Michael
>
> ---------------------------------------------------------------------
> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
How to grab field value in setWindowClosedCallback?
Posted by Michael Mehrle <mi...@ask.com>.
Still fiddling with that same problem. I set my outputmarkup and added
my field as a target. However, when trying to grab the model as a string
it's always empty.
Is there anything special I have to do when grabbing a field's value
inside an AjaxButton's onSubmit (which contains my
windowclosedcallback)?
Thanks,
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
RE: Setting wicket field component model via JavaScript
Posted by Michael Mehrle <mi...@ask.com>.
Anyone? Could use a pointer...
-----Original Message-----
From: Michael Mehrle [mailto:michael.mehrle@ask.com]
Sent: Wednesday, April 02, 2008 11:42 AM
To: users@wicket.apache.org
Subject: Setting wicket field component model via JavaScript
Simple scenario: I've got a hidden wicket field which I'm setting with
JavaScript to a value like this:
hiddenField.value = data.msg;
When I pop up a JS alert it seems the value is set.
However, back on the Java side I'm trying to log the field's value in my
onClose() method as part of a SetWindowClosedCallback, but the model of
the wicket component still is null:
LOG.debug("Value: {}", hiddenField.getRawInput));
Obviously I'm missing something in terms of the flow here. How can I get
the field's component to be updated?
Any help would be appreciated.
Thanks,
Michael
---------------------------------------------------------------------
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
Setting wicket field component model via JavaScript
Posted by Michael Mehrle <mi...@ask.com>.
Simple scenario: I've got a hidden wicket field which I'm setting with
JavaScript to a value like this:
hiddenField.value = data.msg;
When I pop up a JS alert it seems the value is set.
However, back on the Java side I'm trying to log the field's value in my
onClose() method as part of a SetWindowClosedCallback, but the model of
the wicket component still is null:
LOG.debug("Value: {}", hiddenField.getRawInput));
Obviously I'm missing something in terms of the flow here. How can I get
the field's component to be updated?
Any help would be appreciated.
Thanks,
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org