|
From: Lieven D. (JIRA) <no...@sp...> - 2008-10-09 19:33:19
|
[ http://jira.springframework.org/browse/RCP-551?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lieven Doclo updated RCP-551:
-----------------------------
Fix Version/s: 1.x
> Adding a way to clear dirty flag
> --------------------------------
>
> Key: RCP-551
> URL: http://jira.springframework.org/browse/RCP-551
> Project: Spring Framework Rich Client Project
> Issue Type: Improvement
> Components: Binding System
> Affects Versions: 1.0.0
> Reporter: Benoit Xhenseval
> Fix For: 1.x
>
> Attachments: AbstractFormModel.java.patch, FormModel.java.patch
>
>
> Hi,
> We are facing the an issue and have designed a workaround which we hope can be acceptable to Spring Rich Client. We are of course open to alternative/suggestions to achieve the following:
> We need to be able to 'clear the dirty' flag in a model. As a result of some user interaction, the model is changed but those changes should not be displayed as "dirty" in the GUI (via the interceptor) for several reasons:
> 1/ it is not wished for display reasons
> 2/ the user should not be be able to revert some of the those changes
> We cannot commit the model (it may not be committable at that time anyway).
> We have found a way by letting the developer clearDirtyFlag on an AbstractFormModel, the new method is transparent and does not impact anything if not called:
> /**
> * This method can be called to remove dirty flag even if the model has changed,
> * this is sometimes required for display purpose when some changes are made but should
> * not be have the icon on the form.
> */
> public void clearDirtyFlag() {
> dirtyValueAndFormModels.clear();
> dirtyUpdated();
> }
> ideally this method could be added to the FormModel interface also but we could live without it if it is deemed to be an issue for people who create new model classes simply implementing FormModel.
> As I said, if there is a better way to achieve this, I am all ears...
> I will therefore attach 2 patches and we would be very grateful if they could be committed, or at least the AbstractFormModel one.
> Many thanks
> Benoit.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|