开发者

How to use Dojo imageStore getValue?

开发者 https://www.devze.com 2023-03-18 17:48 出处:网络
First off, Im a total Dojo newb.I just burned half a day trying to get a value from an imageStore for a thumbnailpicker.I have failed miserably at google.If anyone could help me, Id be greatly appreci

First off, Im a total Dojo newb. I just burned half a day trying to get a value from an imageStore for a thumbnailpicker. I have failed miserably at google. If anyone could help me, Id be greatly appreciative.

Heres what I have that doesnt work.

dijit.byId('thumbpicker').开发者_如何学编程imageStore.getValue( 'dimensions');

There is a key called dimensions in my itemfilewritestore for the thumbnailpicker. I can see it in firebug. I just have no clue how to obtain it with dojo. I cannot wait to get back to jQuery :)

Thanks in advance.


I've never used the ThumbnailPicker, but I think the problem is that the store's getValue method requires two arguments: the item and the name of the value you want. When you say: imageStore.getValue("dimensions"), the dimensions for which item in the store is it that you want? Assuming you have the item in a variable target, you actually have to do:

dijit.byId('thumbpicker').imageStore.getValue(target, 'dimensions');

Actually, the right way to get a property from a widget is to use the get method, so

dijit.byId('thumbpicker').get("imageStore").getValue(target, 'dimensions');
0

精彩评论

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