on 06-05-2007 12:02 PM
Dear developers,
What is the general way to refresh a UIElement when one of its "source" binding has changed? Rebind the source ? Is there any "hidden" call somewhere that can be performed?
Regards,
Olivier MATT
Hi,
after each event (F4, button event,...) the bindings get refreshed,
so when you refresh your binding, you should go by wdmodifyview,
after your serverevent it will be changed
grtz
Koen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Let me ask the question differently. How can be a UI element be refreshed when the data inside the context has changed?
Has the WD4A framework a listener on the M of the MVC ?
Second question, how I can recall the supply method of my Table UI Element ?
I just want to modifiy the content of the table and I have no precise idea of what is the best way to achieve it.
Any idea?
Sincerely,
Olivier MATT
Hi Olivier.
1. If you just change the value of an context attribute which is bound to any UI-
Element, the UI-Element gets refreshed automatically if your change triggers a
roundtrip. So If you change the value inside an action for example the UI-ELement
will be updated.
2. The supply method is only called once that is in the moment the context node
changes by adding a new element. But a supply method is not a must. You can
fill the context node with elements or change a certain element in any method
(action, inbound plug) you want to by getting a refernce to the node and bind a
table for example. But as hack you can call the supply method directly which is
not the best design I guess ...
But from your initial post I had the feeling you want to know how to refresh the UI-
Element if the binding of one of its attributes changes to another context
node/attribute, right?
I would guess that if you change the binding by calling:
lr_uielement->bind_*( 'NODE.ATTRIBUTE' )
the change should be visible directly after the roundtrip was triggered.
Cheers,
Sascha
Message was edited by:
Sascha Dingeldey
Hi Olivier,
The UI elements are automatically refreshed, if the values of the bound context node change. So there is no need to do anything.
If you change anything else, you sometimes have to make sure that the context node is updated.
You have different possibilities:
- You change the content of the context node. This makes sense, if you know exactly what must be changed.
- You invalidate the context node. Then the supply function is automatically called again, whenever the node is used. Just call method
invalidate( )
on the context node.
Ciao, Regina
Hi Sascha,
Thank you again for this precise answer
I solved my problem again. So from what you said there is somehow a "listener" from the V to the M. At least it seems so.
What is the hack to call the supply method ? (I will not use it but ... I am curious )
Anyway, have a good day,
Regards,
Olivier MATT
When you have a look at the interface of a supply method you see that it takes
the context node to fill and the parent element.
So you just need to get references to the node and element and you can
call the method:
supply_something(
node = lr_mynode
parent_element = lr_parent_element
).
Cheers,
Sascha
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.