Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[riena-dev] Unbind the modelBinding and rebind to an other attribute

Hi riena-team,
 
i have a question to a very special binding case:
 
Redview can be run in different modes. One of them is a designer mode, which offers a very dynamically behavior on manipulating the ui. With a designer editor the ui elements like controls, layouts and layoutdatas can be designed. The editor offers a direct update. This means, that changes to the model are directly reflected to the ui. This works quite well..
 
Now i am implementing the modelBindings. With the great riena binding api it is also easy to accieve this. But i am not sure how to process binding changes in the designer editor best. If a ridget is already bound to the model and the bindingAttribute changes, i have to unbind the modelBinding and create a new one. I am not sure how to do this riena like. There is no api like ridget.unbindFromModel(). So i have to destroy the controller completely an create it again. It works well, but maybe there is a better way.
 
For example:
TextRidget is bound to the attribute "lastName" of the Adress bean. The designer shows "Pirchner".
Now the designer decides to bind an other attribute like Address.firstName. After the rebinding, the designer should show "Flo".
So i have to unbind the TextRidget<->Adress.lastName binding and create a new one: TextRidget<->Adress.firstName
 
Thanks in advance for your answer
Flo

 


Back to the top