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 <[EMAIL PROTECTED]> wrote: > Anyone? Could use a pointer... > > > > -----Original Message----- > From: Michael Mehrle [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 02, 2008 11:42 AM > To: [email protected] > 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
