SuperSloMo
16 Dec 2010, 1:25 PM
I am working on an application that is very similar to the ImageChooser/AdvancedListView demo. I would like to associate checkboxes with each of the images so that if a user clicks on an image itself, the image's metadata is displayed in a pane, and if the user checks the boxes of one or more images and clicks on a "Download" button, the checked images are downloaded to the user's computer.
In the source code for the ListView and AdvancedListView demos, a Javascript native function called getTemplate is used to indicate how the image and its name should be displayed in the ListView. In the source code for the CheckBoxListView demo, there is no getTemplate function, and the images are not displayed in the ListView. Is there a way to use both the CheckBoxListView and the getTemplate function to display images with checkboxes, or is there no way to access the checkboxes that are generated by CheckboxListView in the getTemplate function's Javascript code in the way that {name} and {path} are accessed?
If CheckBoxListView and the getTemplate technique can not be used together, what would be the right way to use getTemplate to display an image, its name and a checkbox in ListView and be able to detect which images' checkboxes are checked when the user clicks on the Download button? Thanks.
In the source code for the ListView and AdvancedListView demos, a Javascript native function called getTemplate is used to indicate how the image and its name should be displayed in the ListView. In the source code for the CheckBoxListView demo, there is no getTemplate function, and the images are not displayed in the ListView. Is there a way to use both the CheckBoxListView and the getTemplate function to display images with checkboxes, or is there no way to access the checkboxes that are generated by CheckboxListView in the getTemplate function's Javascript code in the way that {name} and {path} are accessed?
If CheckBoxListView and the getTemplate technique can not be used together, what would be the right way to use getTemplate to display an image, its name and a checkbox in ListView and be able to detect which images' checkboxes are checked when the user clicks on the Download button? Thanks.