Hi,

> I suppose, that core of the problem is, that ListItemModel does not
> implement IChainingModel, so it cannot be passed to another model...

CompoundPropertyModel does not care of the actual model implementation, it should work fine with any target model.

Actually Wicket provides PropertyListView, which exactly wraps a ListItemModel in a CompoundPropertyModel.

Please create a quickstart so we can see the cause of your problem.

Have fun
Sven



On 28.11.2015 21:10, Štefan Šimík wrote:
PROBLEM:
When ListItemModel is wrapped into CompoundPropertyModel (that is used as
default model of Form),
then Form model-object is never updated -> so old data are saved, without
any changes.


EXAMPLE OF PROBLEM:
Example of problem: (data in form object are NOT updated after from
submission)

     ListItemModel listItemModel = ...coming from ListView
     CompoundPropertyModel<Category> compoundModel = new
CompoundPropertyModel<Category>(listItemModel);


HOW PROBLEM WAS FIXED:
Fix was to extract model-object from ListItemModel and rewrap it into
CompoundPropertyModel.

     ListItemModel listItemModel = ...coming from ListView
     CompoundPropertyModel<Category> compoundModel = new
CompoundPropertyModel<Category>(listItemModel.getObject());


QUESTION
I suppose, that core of the problem is, that ListItemModel does not
implement IChainingModel, so it cannot be passed to another model... but I
am not sure, if I understand that correctly and identified the real core
problem.

Could you please confirm this, or provide some alternative explanation, why
I cannot ListItemModel to the CompoundPropertyModel (into its constructor) ?


Thank you for your help and explanation.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to