+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / GenericPageSelector and multiple items

GenericPageSelector and multiple items

3 posts, 0 answered
  1. David
    David avatar
    38 posts
    Registered:
    05 Apr 2012
    30 Apr 2014
    Link to this post

    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:

    1. GPSFieldStart.PNG
    2. GPSFieldSelectClicked.PNG
    3. GPSFieldPagesShowingCurrentPage.PNG (opening tree to currently selected page)
    4. GPSFieldPagesAdded.PNG
    5. GPSFieldPagesEdited.PNG 

    In my research, I did find this forum post http://www.sitefinity.com/developer-network/forums/developing-with-sitefinity-/set-selected-items-of-genericpageselector-in-sitefinity-5, and linked from that, http://www.benramey.com/2012/10/25/setting-selected-items-on-sitefinity-5-1-pagesselector-in-javascript/ 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

  2. David
    David avatar
    38 posts
    Registered:
    05 Apr 2012
    30 Apr 2014
    Link to this post

    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 

  3. Veronica
    Veronica avatar
    125 posts
    Registered:
    30 Jan 2015
    01 May 2014
    Link to this post
    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
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
3 posts, 0 answered