开发者

Capturing onclick events on a dynamically populated (using ItemReadStore) dojox.mobil.EdgeToEdgeDataList

开发者 https://www.devze.com 2023-03-13 15:13 出处:网络
I am a dojo newbie so please forgive my ignorance.I have a dojox.mobile.EdgeToEdgeDataList which is dyanmically populated using ItemFileReadStore

I am a dojo newbie so please forgive my ignorance.

I have a dojox.mobile.EdgeToEdgeDataList which is dyanmically populated using ItemFileReadStore

var jobStore = new dojo.data.ItemFileReadStore({url: "items", clearOnClose: true});;
...
<ul dojoType="dojox.mobile.EdgeToEdgeDataList" id="execlist" sto开发者_高级运维re="jobStore" query="  {state: 'active'}"></ul>

On clicking any of these dynamically generated rows I want to display detailed information about the item referenced in the row. In order to do that I need to know which row was clicked and extract the label from that row

I tried the following:

dojo.query("#execList li").connect("onclick", function(){...});

but that works only for the case where the rows already exist at the dojo.ready time.

Any idea how I could do this?

Thanks in advance!

NJ


I was able to get solve my problem by updating the contents returned by ItemFileReadStore to include a onclick(mymethod(rowid)) element in each row. This inserted the onclick event on each list item within the EdgeToEdgeDataList allowing me to identify which row was clicked. Thanks NJ

0

精彩评论

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