Hello,
> Regarding the form controller - I'm now trying to set it up to work as I
> expect. I have a tree controller in which I linked the "selection[0]"
> property to the form controller's model. So far so good. Now if I update the
> form, the tree gets updated as well. I set selfUpdate to true, so that I
> have more control about when the tree gets updated (it should only after
> validation and server update). There I have no problem as well. 
Sounds good. :)

> My newest question is - is there a way to reset the form to the selection of
> the tree again in case I want to undo the changes? I tried
> formController.setModel(treeController.getSelection()[0].getModel()), but it
> didn't update the form. I also tried to fire a changeSelection on the tree
> (and on the treeController) by using tree.setSelection(tree.getSelection()),
> but this also doesn't work.
> Lastly I also tried simply form.reset(), but this deletes the data in the
> form completely. Is there an elegant way of achieving this? Perhaps it can be 
> worth while to
> add a method to the form controller which undoes the changes (similar to the
> one that updates the model), perhaps a one that simply re-reads the
> unchanged model?

You can have that with the form.reset but you need to set the reset point to 
the point in time when you set model. Otherwise, you will reset to the initial 
values which are empty. For that purpose, the form has a method called 
redefineResetter. Call that as soon as the model is set to the form controller. 
(Listen to the changeModel event of the controller e.g.).

Regards,
Martin
------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to