Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Stephen Davidson 216 posts 392 karma points
    Apr 09, 2013 @ 12:36
    Stephen Davidson
    0

    Add a "Please select" to Ultimate Picker

    I have setup an Ulitmate Picker (drop down list) to read from a "Settings" folder which allows my user to manage its contents, but i would like to do the following:

    1. Irrespective of how my user enters content into the settings folder, display the drop down list content alphabetically.
    2. Add a "Please Select" to the drop down list rather than being empty
    Is this possible?
    S

  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    Apr 09, 2013 @ 12:45
    Hendy Racher
    1

    Hi Stephen,

    Could you swap over to using the XPath DropDownList datatype ? (configuring it to store the NodeId should keep compatibilty with any exiting data)

    HTH,

    Hendy

  • Stephen Davidson 216 posts 392 karma points
    Apr 09, 2013 @ 12:52
    Stephen Davidson
    0

    I guess so...i see its looking for an xpath expression? not sure what that would be...

  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    Apr 09, 2013 @ 13:03
    Hendy Racher
    100

    Hi Stephen,

    An XPath expression allows a more granular configuration as to which nodes should be used as drop down list options - to get all immediate children of a given node id (as per the ultimate picker) then you can use:

    //[@id=123]/child::*

    HTH,

    Hendy

  • Stephen Davidson 216 posts 392 karma points
    Apr 09, 2013 @ 13:11
    Stephen Davidson
    0

    Thanks Hendy...

  • Stephen Davidson 216 posts 392 karma points
    Apr 09, 2013 @ 13:15
    Stephen Davidson
    0

    although I keep getting a Syntax error in XPath expression on that?

  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    Apr 09, 2013 @ 13:30
    Hendy Racher
    1

    Hi Stephen,

    Sorry my mistake, I forgot the first *, should be:

    //*[@id=123]/child::*

     

  • Stephen Davidson 216 posts 392 karma points
    Apr 09, 2013 @ 13:34
    Stephen Davidson
    1

    Thanks for that Hendy, managed to sort it out and I also only wanted the Grandchildren of the parent ID so i ended up with

    //*[@id=1739]/Club/* [@isDoc]

    Are we able to do a sort by in this xpath?

    S

  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    Apr 09, 2013 @ 13:42
    Hendy Racher
    1

    Hi Stephen,

    Unfortunatly can't specify a sort within the XPath expression - they will be rendered in the order found in the content tree - so could you do the sort there ?

    I wonder if a configuration option to sort on a given field would be a useful feature ?

    Hendy

  • Stephen Davidson 216 posts 392 karma points
    Apr 09, 2013 @ 13:44
    Stephen Davidson
    0

    Yeah defo...i dont think user can be trusted to have them sorted in the tree, some might not even know how to do it! is it going to be part of http://ucomponents.org/data-types/xml-dropdownlist/ or is it easy enoiugh to add?

    Thanks for all the comments.

    S

Please Sign in or register to post replies

Write your reply to:

Draft