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:
Irrespective of how my user enters content into the settings folder, display the drop down list content alphabetically.
Add a "Please Select" to the drop down list rather than being empty
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:
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 ?
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?
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:
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
I guess so...i see its looking for an xpath expression? not sure what that would be...
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
Thanks Hendy...
although I keep getting a Syntax error in XPath expression on that?
Hi Stephen,
Sorry my mistake, I forgot the first *, should be:
//*[@id=123]/child::*
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
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
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
is working on a reply...