cancel
Showing results for 
Search instead for 
Did you mean: 

Initialization Context

Former Member
0 Kudos

Hallo together,

on a view i have a context for a table. I must need the value 'when visible' for the view properties 'lifetime'.

My question: How can I initialization the context for my table?

I must do that, otherwise I have the entries with call everyone the view several times in the table.

Thanks for the answers

greetings

Rainer

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

if i understand your question correctly ...basically you want to populate your table with some initial data?

please correct me if i am wrong

Former Member
0 Kudos

Hi Rahul,

when i call the view first time, I load some Data in my Context. At next time i called the view, i want update the data. But I must delete the old data before.

Which method or Function must I need for do that?

Regards

Rainer

Former Member
0 Kudos

Hi Rainer,

To delete the existing binding, use the method node->invalidate( ).

Then do a binding again for your fresh values. Every time you update the data thats bound, just call a bind_elements on your node, that will update automatically. You do not have to invalidate each time.

Regards

Nithya

Former Member
0 Kudos

additionally

bind_table( ) overwrites old elements too

cheers,

sascha

Message was edited by:

Sascha Dingeldey

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi all,

Thanks a lot for explaining everything. It functions now.

Regards

Rainer

Former Member
0 Kudos

Hi Rainer,

do you mean that you have the data in the table duplicated each time someone navigate to this view? So the table content gets larger and larger?

If so, where is the node located (view or component controller) and how do you fill the node?

Cheers,

Sascha

Former Member
0 Kudos

In the wddoinit method of your view, fetch the internal table which you want to bind to your UI table. Then bind it to the context. If this is done in the doinit, it will be called only once, when the view is initialized.

former_member215843
Active Participant
0 Kudos

Hi Rainer,

You could use the method WDDOINIT to initialize the context, or you could use a supply function.

If you want to initialize it only once, although the view is removed and recreated, you should map your context node to a node in the component controller or in a custom controller. They will stay, even when the view is not visible.

Ciao, Regina