You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Mike Perham (JIRA)" <ji...@apache.org> on 2007/06/01 15:23:16 UTC

[jira] Commented: (WICKET-462) The Palette component does not update its (Property-)Model after the underlying list was changed by another part of the program

    [ https://issues.apache.org/jira/browse/WICKET-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12500705 ] 

Mike Perham commented on WICKET-462:
------------------------------------

Igor, for those of us who need to patch our 1.2.x source by hand, could you please note a revision or file so we can find the patch?

> The Palette component does not update its (Property-)Model after the underlying list was changed by another part of the program
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-462
>                 URL: https://issues.apache.org/jira/browse/WICKET-462
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.2.5
>         Environment: tomcat 5.5, java 1.5
>            Reporter: Ivana Cace
>            Assignee: Igor Vaynberg
>             Fix For: trunk
>
>
> The Palette component does not update its (Property-)Model after the underlying list was changed by another part of the program.
> I use a Palette to add individuals to a list of 'members'. For this Palette gets two models, the model for 'selected' is a PropertyModel  of  a field in a regular Java object. 
> In some cases it is not allowed to remove individuals from this field. After submit another part of the software compares the new object to the old one, and returns the removed individuals. 
> To notify the Palette that its model has changed (or should be changed) i call modelChanged(). 
> Regardless, the Palette does not show these changes on screen. 
> Note that i update other field after submit too, and the components that use PropertyModels of these fields do reflect the changes! For example i use a Label to show a String.
> code in the form:
> 	opsModel = new Model(allUsers);
> 	membersModel = new PropertyModel(project,"members");
> 	IChoiceRenderer renderer = new ChoiceRenderer("displayName", "uid");
> 	chooseMembers = new Palette("people", membersModel, opsModel, renderer, 12, false);
> 	add(chooseMembers);
>  
> public void onSubmit() {
> 	super.onSubmit();
> 	doSomeLogic(project);
> 	chooseMembers.modelChanged(); 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.