cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
998
Views
0
Helpful
1
Replies

template view reload

banik.michal.sk
Level 1
Level 1

Hello everybody,

looks like this will be first question here .

I'd like to know how to update generated view in nx.ui.Component object after some event occured.

There is the component with button in attached .js file, when the button is clicked I want to add new item into ul list.

I tried do that same way like in tutorial with click counter, but it doesn't work like I supposed. Is there any handler, event which should be fired or anything else how to insert another item into generated list when the model (in this case myItems) is changed?

Thank you so much.

1 Accepted Solution

Accepted Solutions

banik.michal.sk
Level 1
Level 1

Finally I found the solution.

I used the ObservableCollection as a data model for Component. When this object is used for component's model and the model is changed, the view of component is also updated.

So I can add items to list dynamically by pushing the button.

View solution in original post

1 Reply 1

banik.michal.sk
Level 1
Level 1

Finally I found the solution.

I used the ObservableCollection as a data model for Component. When this object is used for component's model and the model is changed, the view of component is also updated.

So I can add items to list dynamically by pushing the button.