Bugs item #1474136, was opened at 2006-04-21 12:55
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1474136&group_id=119783

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: 1.2
Status: Open
Resolution: None
Priority: 5
Submitted By: David-S (david-s)
Assigned to: Nobody/Anonymous (nobody)
Summary: Setter for ListMultipleChoice with PropertyModel not called

Initial Comment:
Problem: When a form is submitted that contains a
ListMultipleChoice-component, the PropertyModel's
setter is not called, instead, the object retrieved by
the getter is modified to reflect the choices made by
the user. The current behaviour is introduced somewhere
after snapshot 20060302 (in 20060302 snapshot, the
setter was called).

The same goes for the CheckGroup-component

<Abstracts from wicket-user list:>

<quote name="Dave Schoorl" type="wicket-user">
More on a philosophic note though, for all components I
have used sofar, when there is a Property-model backing
those components, there are getters and setters called
to set or retrieve values into the model. This even was
the case for a ListMultipleChoice in snapshot 20060302
(okay, I will stop now ;)). No seriously, the
ListMultipleChoice is now the only exception to the
rule (that I know of), and when it comes to
programming, I don't like Exceptions. Do you?

Maybe it is possible to set the updated Collection
through a setter back into the PropertyModel  using the
setter that accepts a Collection of the same type that
was retrieved by the getter? You may argue that this
is unnecessary work, but (1) you get uniform behaviour
between the components that use PropertyModels and (2)
as in my use-case, the property is a derived property
and my getter and setter perform a conversion.
</quote>

<quote name="Johan Compagner" type="wicket-developer">
ahh now i rember what the problem was.
ModelChanging/ModelChanged is called 2 times then

this we do now:

            modelChanging();
            selectedValues.clear();
            selectedValues.addAll
((Collection)getConvertedInput());
            modelChanged();

i can't call setModelObject(selectedValues); after that
or in between that. Because that will also call 
ModelChanging()/Changed() I guess i have to copy what
setModelObject() does then and remove the checks.
</quote>

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=684975&aid=1474136&group_id=119783


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to