PDA

View Full Version : Get Handle of documents selected by checkbox



R.J
3 Dec 2009, 9:11 PM
In a lotus web application, I have used checkbox in the UIview, I am able to get the handle of the documents selected if I select documents pressing ctl+click using ExtndApp.ui.uiView.grid.getSelectionModel().getSelections(); .

Now I have created checkbox in first column of the view using code "<input name='ChkDocid' type='checkbox' id='"+@Text(@DocumentUniqueID)+"'>". I am able to view the checkbox on web also I am able to select the checkbox but I am unable to get the handle of the document selected using checkbox.

Can anyone provide me the code to get the handle of the documents selected using checkbox ?.

Thanks In Advance.

Zakaroonikov
6 Dec 2009, 1:37 PM
In a lotus web application, I have used checkbox in the UIview, I am able to get the handle of the documents selected if I select documents pressing ctl+click using ExtndApp.ui.uiView.grid.getSelectionModel().getSelections(); .

Now I have created checkbox in first column of the view using code "<input name='ChkDocid' type='checkbox' id='"+@Text(@DocumentUniqueID)+"'>". I am able to view the checkbox on web also I am able to select the checkbox but I am unable to get the handle of the document selected using checkbox.

Can anyone provide me the code to get the handle of the documents selected using checkbox ?.

Thanks In Advance.

I believe extnd already has a way to select by check box but it will appear as the first column similar to how lotus notes works. Just add:



selModelConfig: {type: 'checkbox'},


To your uiView config to get:

R.J
6 Dec 2009, 9:43 PM
Thanks Zakaroonikov for the help.

Is this functionality(i.e selModelConfig: {type: 'checkbox'}) available on ext.nd 2x ?. I have downloaded extnd 3x and the checkboxes are displayed on the left most column automatically.

How to get the handle of the selected checkboxes ? Please find the screenshot for your reference.

Any Hints ?

Thanks In Advance.

jratcliff
7 Dec 2009, 10:08 AM
Thanks Zakaroonikov for the help.

Is this functionality(i.e selModelConfig: {type: 'checkbox'}) available on ext.nd 2x ?. I have downloaded extnd 3x and the checkboxes are displayed on the left most column automatically.

How to get the handle of the selected checkboxes ? Please find the screenshot for your reference.

Any Hints ?

Thanks In Advance.

The checkboxes are added automatically if the view is setup in Domino Designer that way. Otherwise, you can do what Zakaroonikov says and pass in type: 'checkbox' to the 'selModelConfig' property.

Then, to get the selected documents from an action button you can do this:



this.getUIView().getDocuments();


Then you can loop through this collection to get the unid of each doc.

R.J
7 Dec 2009, 11:12 PM
Hey that has solved my problem.!!

Thanks a lot jratcliff & Zakaroonikov. Takecare.... ;)