on 2007 Jan 10 12:55 PM
Hi,
I'm trying to change the dataSource of a table dynamically by using the method SET_DATA_SOURCE of the class CL_WD_TABLE.
A strange thing is that the parameter for this method is type ref to object... so what is this method expecting?
I always receive the same error:
"The following error text was processed in the system: Attribut NODE konnte nicht gefunden werden"
Even when I try the following, I receive that error:
lv_node_table = lr_table->get_data_source( ).
lr_table->set_data_source( value = lv_node_table ).
It seems pretty irrational to me that the result of the getter method seems to be the wrong parameter for the setter method...
I hope someone of you can figure out what went wrong here
Kind regards,
Maximilian.
Request clarification before answering.
Hi,
to ask a more specific question:
Has anyone ever successfully used the method "table->set_data_source( value = ... )."
If so, please post code examples!
Kind regards,
Maximilian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Maximilian,
In order to change the binding path of the dataSource, please use method BIND_DATA_SOURCE. In case you would like to change the data, please use the bind_*() methods of the context node to which the dataSource binds to. Try to work with the model instead of with ui element. It's alot easier too, because the context is available everywhere while ui elements can only be accessed inside of wdDoModifyView without using back-channel methods.
Best regards,
Thomas
Hi Maximilian,
That's intended. A developer is not enforced to bind all properties of aggregated view elements of a table to context attributes that reside below the dataSource. Some might be constant for all rows (like enabled, readOnly, etc) and hence are bound to other context attributes. Furthermore, the runtime is not able to determine which TableCellEditor should bind to which context attribute of the new dataSource. My advise it get the columns and to adjust the binding path of the table cell editors manually in your coding.
Best regards,
Thomas
Thanks a lot : )
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
30 | |
10 | |
8 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.