Hi!

I have a situation where I have multiple propertymodels whose
model-object changes as a result of an update. I need to propagate
this change to all the property models.

Is there an existing functionality to accomplish this? I came up with
a workaround, but I would like to know if there was a "proper" way to
deal with the situation. Here is my workaround, which smells a bit
like a hack:

public class WrappedPropertyModel extends PropertyModel {
  /**
   * @param model The model whose modelObject can be changed and the
change will be represented by all WrappedPropetyModels sharing the
same model
   * @param property The property of the modelObject that is wanted
   */
  public WrappedPropertyModel(IModel model, String property) {
    // Strictly speaking, the IModel here could be any wrapper object
    super(model, "object." + property);
  }
}

**
Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to