sorting in Pop-up Form Control
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 2
- Joined: Thu Sep 19, 2013 1:04 pm
sorting in Pop-up Form Control
The documentation for Pop-up Form Control lists a property for sorting the values in the popup: sortRenderer. No example for the syntax of this property is given. I assumed it would be a pair like "sortRenderer, ascending" or "sortRenderer,descending". I tried this and a few variants but no joy. Any help appreciated.
Thanks
Burkhard
Thanks
Burkhard
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: sorting in Pop-up Form Control
Post by alex_jitianu »
Hi,
There are two sides to the Pop-Up form control: the label that presents the current value(s) and the actual Pop-Up editor that appears when the user clicks on the previous mentioned label. That being said, the rendererSort only applies on the renderer part (the label) and when the editor is used with multiple selection (selectionMode set to multiple). The accepted values are indeed ascending and descending.
To give an example, if the user can select values: A, B, C in the editor and the sorting is set to descending the label will render: C, B, A.
I don't remember why we didn't offer the possibility to sort the values presented by the editor popUp too... I'll add an issue to create a new property editorSort to control this support. I'll also add an issue to update the documentation to better describe the behavior of rendererSort.
Meanwhile, if you can tell me where are the values presented by the editor taken from (Schema or CSS) perhaps I can offer an alternative solution. I can also send you the source code for the form control. It should be simple enough to make the editor sort it's values just like the renderer does. Please let me know if I should send it to you.
Best regards,
Alex
There are two sides to the Pop-Up form control: the label that presents the current value(s) and the actual Pop-Up editor that appears when the user clicks on the previous mentioned label. That being said, the rendererSort only applies on the renderer part (the label) and when the editor is used with multiple selection (selectionMode set to multiple). The accepted values are indeed ascending and descending.
To give an example, if the user can select values: A, B, C in the editor and the sorting is set to descending the label will render: C, B, A.
I don't remember why we didn't offer the possibility to sort the values presented by the editor popUp too... I'll add an issue to create a new property editorSort to control this support. I'll also add an issue to update the documentation to better describe the behavior of rendererSort.
Meanwhile, if you can tell me where are the values presented by the editor taken from (Schema or CSS) perhaps I can offer an alternative solution. I can also send you the source code for the form control. It should be simple enough to make the editor sort it's values just like the renderer does. Please let me know if I should send it to you.
Best regards,
Alex
-
- Posts: 2
- Joined: Thu Sep 19, 2013 1:04 pm
Re: sorting in Pop-up Form Control
Thank you, now I understand. I was, of course, trying to do different, more like an "editorSort" property.
e.g. this css snippet produces a popup list of IDs pulled from a file containing a bibliography
and I was hoping to add a sort property to have the resulting list display in alphabetical order:
I think this might be useful for any list that is a bit longer (with either selectionMode -- multiple or single). Alternative suggestions would be very welcome. I am not much of a programmer but if you think that it would be not too difficult to make the editor sort in the same way as the renderer then, yes, please do send the code.
Thanks again,
Burkhard
e.g. this css snippet produces a popup list of IDs pulled from a file containing a bibliography
and I was hoping to add a sort property to have the resulting list display in alphabetical order:
Code: Select all
msItem>listBibl>bibl>ref[target]:before {
content: oxy_editor(
type, popupSelection,
edit, "@target",
selectionMode,"single",
values, oxy_xpath('string-join(doc("../refsource/bibl.xml")//@xml:id, ",")'),
labels, oxy_xpath('string-join(doc("../refsource/bibl.xml")//@xml:id, ",")')) }
Thanks again,
Burkhard
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: sorting in Pop-up Form Control
Post by alex_jitianu »
Hello,
An easy solution would have been to use the saxon:sort() extension function in the XPath expression. Unfortunately Saxon extensions functions are not currently supported in the oxy_xpath function. That's another improvement for which I'll add an issue on our internal issue tracking tool.
Best regards,
Alex
An easy solution would have been to use the saxon:sort() extension function in the XPath expression. Unfortunately Saxon extensions functions are not currently supported in the oxy_xpath function. That's another improvement for which I'll add an issue on our internal issue tracking tool.
Best regards,
Alex
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service