on 01-26-2005 10:05 AM
Hi.
Can someone please point me in the right direction. I am having troubles refreshing a view and updating view elements with new data.
There are two groups within a single view. first contains a table, second some input fields. I have a copy button in the table toolbar and I want to copy fields from the selected row into the inputfields below.
I am doing this with something like this in the onActionCopyLine():
wdContext.currentContextElement().setField(wdContext.currentXxxElement().getField());
...but the input fields are not refreshed with the new values.
I reckon I need to refresh the view (with wdDoModifyView?), but am not sure how to do so.
Many thanks in advance! ( <b>Points promised for helpful answers!</b> )
faB
PS. Would it be better pratice to put the 2nd group in a new view and call the navigation plug in the onActionCopyLine()?
Message was edited by: faB
Use data binding instead of copying.
Bind the "value"-property of the InputField to the same context attribute as the table column editor and it automatically gets the value in the selected row.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Armin,
Good idea, but I don't think your suggestion is possible in my case, because some of the input fields have extended input help and it's not possible bind the inputfields to a model context attribute. I have to have a separate field and do a copy at runtime.
(or so was determinded in this thread: )
faB
Hi faB
I tried this out and worked perfectly fine for me. I used code similar to what you have tried out. I can only assume that you have some code in your wdDoModifyView that is prohibhting this from happening. Comment everything else out and try only this.
wdContext.currentContextElement().setField(wdContext.currentXxxElement().getField());
Regards
Pran
ok, half way there.
upon initial loading the the view, the values are copied (from the (default) 1st line of the table)
but I have implemented a "Copy Line" button that should copy the selected line to the input fields. the view is not being refreshed with the new values for the input field. any ideas?
faB
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.