GenericPageSelector and multiple items
Hi
I have a custom module built with module builder, and one of the fields is using a custom field control to populate. This uses the GenericPageSelector from Sitefinity to select 1 or more pages.
A request has come in to make the page selector remember already selected pages. By that, what currently happens is if the user opens the page selector and selects a single page, any existing pages are effectively removed.
These are outlined in the attached screenshots in this order:
In my research, I did find this forum post www.sitefinity.com/.../set-selected-items-of-genericpageselector-in-sitefinity-5, and linked from that, www.benramey.com/.../ which talks about what appears to be a bug, and how to get around it. We have been trying to make the same sort of fix in our field control, but not having any luck.
Does anyone know if this apparent bug is fixed in Sitefinity 7?
Has anyone had any experience with using the GenericPageSelector in a field, and getting it to show previously selected pages?
Thanks,
David
Hi
While composing the previous post, my colleague made some progress, but then hit a problem.
The selected pages can be preselected, only if they are open/visible at that moment. So, if you open the selector and one of the pages is in a node that is currently closed, it will not be selected.
Maybe related, but if you have a node open, and pages selected under it, you close it and reopen it, the nodes get refreshed and the page is no longer selected.
Thanks,
David
Hello,
Thank you for contacting us.
I am sending you the code for our FolderSelector. It's a wrapper of the GenericPageSelector and demonstartes how you can get the selected items. You can see the control in action by drag and drop the Image Gallery widget on a page. Click to edit and choose "From selected image library..." radio button. The opened dialog contains the FolderSelector.
See the attached files and let me know if you have more questions.
Regards,
Veronica
Telerik