开发者

Dynamically updating Dojox ListItem

开发者 https://www.devze.com 2023-03-29 10:51 出处:网络
I have been working to update the contents of a particular list item via another pane. I am able to successfully change the contents of the list item. The change is apparent when doing a console.lo开

I have been working to update the contents of a particular list item via another pane.

I am able to successfully change the contents of the list item. The change is apparent when doing a console.lo开发者_StackOverflow社区g(), however, I cannot get the list item to update its' contents in the UI of the app.

var LI = dijit.byId("widgetID");

LI.params.tagToChange = "a new value";

console.log(LI) // can confirm that the item has indeed been changed

However, in the UI, the list item has not been updated. I cannot seem to find a refresh or re-render function that works. Calling buildRendering() throws an error. Does anyone know of a way to force refresh a list item or of some way to dynamically update the contents of a list item and have the UI update to reflect the change?


Try using widget.set('attr', value) instead of setting properties directly

0

精彩评论

暂无评论...
验证码 换一张
取 消