Any takers, this one has me stumped. Is there anything special with how a 
HiddenField gets updated after an Ajax call. The HiddenField is in the same 
panel as a TextField. The TextField gets updated but the HiddenField does not. 
I have checked and the values have changed on the model object for both fields. 
I thought that when you add a component to the target that the component and 
all its children would get updated. I see the HiddenField coming back in the 
Ajax response, it just has the old value.

Thanks,

Warren

-----Original Message-----
From: Warren Bell 
Sent: Wednesday, November 16, 2011 11:04 AM
To: 'users@wicket.apache.org'
Subject: InMethod grid, Hidden Field in column does not get updated

I have an Inmethod grid with a HiddenField in a panel in a column. This 
HiddenField does not get updated after a SubmitCancelColumn is clicked. All the 
other fields get updated correctly except for the HiddenField. There is also a 
TextField in the same panel as the HiddenField, the TextField gets updated 
correctly. Here is the column code, newPriceTextField gets updated correctly 
and oldNewPriceHiddenField does not get updated:

WicketColumnAdapter newPriceColumn = new 
WicketColumnAdapter("newPriceColumnAdapter", new 
org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn<String>(new
 Model<String>("New Price"), "newPrice")) {


 @Override
 public Component newCell(WebMarkupContainer parent, String componentId, IModel 
rowModel)  {
  final PriceChange priceChange = (PriceChange)rowModel.getObject();

  final TextField<Double> newPriceTextField = new TextField<Double>("newPrice", 
new PropertyModel<Double>(priceChange, "newPrice"), Double.class)
  final HiddenField<Double> oldNewPriceHiddenField = new 
HiddenField<Double>("oldNewPrice", new PropertyModel<Double>(priceChange, 
"oldNewPrice"), Double.class);

  CostNewPricePanel panel = new CostNewPricePanel(newPriceTextField, 
oldNewPriceHiddenField);
  return panel;
 }

};



Also, the "oldNewPrice" property of the oldNewPriceHiddenField does change 
after SubmitCancelColumn gets clicked.

What do I need to do to get the HiddenField to update correctly?

Thanks,

Warren Bell



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

Reply via email to