Combobox form component in CSS
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 24
- Joined: Tue Jun 05, 2012 10:34 am
Combobox form component in CSS
Hi, i have a question about a form component that i have configured in my css to render/edit an attribute indicating the document classification.
My attribute is an integer and i would like to show a combobox to allow the user to select the classification in a label list.
For exemple, here is the mapping :
01 : NOT PROTECTED
02 : RESTRICTED
03 : CONFIDENTIAL DEFENSE
04 : SECRET DEFENSE/RESTRICTED
Here is my config :
I have to duplicate the css element for each value because the combobox does not display the labels, only the values.
Is there any bug or config problem? it seems the labels values are not used.
My attribute is an integer and i would like to show a combobox to allow the user to select the classification in a label list.
For exemple, here is the mapping :
01 : NOT PROTECTED
02 : RESTRICTED
03 : CONFIDENTIAL DEFENSE
04 : SECRET DEFENSE/RESTRICTED
Here is my config :
Code: Select all
security[securityClassification="01"] {
content: "Security level : "
oxy_editor(
type, combo,
edit, "@securityClassification",
editable, true,
values, "01, 02, 03, 04",
labels, "NOT PROTECTED, RESTRICTED, CONFIDENTIAL DEFENSE, SECRET DEFENSE/RESTRICTED")
" NOT PROTECTED";
}
security[securityClassification="02"] {
content: "Security level : "
oxy_editor(
type, combo,
edit, "@securityClassification",
editable, true,
values, "01, 02, 03, 04",
labels, "NOT PROTECTED, RESTRICTED, CONFIDENTIAL DEFENSE, SECRET DEFENSE/RESTRICTED")
" RESTRICTED";
}
security[securityClassification="03"] {
content: "Security level : "
oxy_editor(
type, combo,
edit, "@securityClassification",
editable, true,
values, "01, 02, 03, 04",
labels, "NOT PROTECTED, RESTRICTED, CONFIDENTIAL DEFENSE, SECRET DEFENSE/RESTRICTED")
" CONFIDENTIAL DEFENSE";
}
security[securityClassification="04"] {
content: "Security level : "
oxy_editor(
type, combo,
edit, "@securityClassification",
editable, true,
values, "01, 02, 03, 04",
labels, "NOT PROTECTED, RESTRICTED, CONFIDENTIAL DEFENSE, SECRET DEFENSE/RESTRICTED")
" SECRET DEFENSE/RESTRICTED";
}
Is there any bug or config problem? it seems the labels values are not used.
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Combobox form component in CSS
Post by alex_jitianu »
Hi,
You get this behavior because you have an editable combo box. The problem is that once the user can manually edit the value it must see the real value, not just a label. Is the user supposed to provide custom values? Because if it isn't, just mark the combo as read-only (using the editable property) and the labels will automatically be used:
Apparently we forgot to mention this behavior into our documentation so I've added an issue to correct that.
Best regards,
Alex
You get this behavior because you have an editable combo box. The problem is that once the user can manually edit the value it must see the real value, not just a label. Is the user supposed to provide custom values? Because if it isn't, just mark the combo as read-only (using the editable property) and the labels will automatically be used:
Code: Select all
security {
content: "Security level : "
oxy_editor(
type, combo,
edit, "@securityClassification",
editable, false,
values, "01, 02, 03, 04",
labels, "NOT PROTECTED, RESTRICTED, CONFIDENTIAL DEFENSE, SECRET DEFENSE/RESTRICTED")
" NOT PROTECTED";
}
Best regards,
Alex
-
- Posts: 24
- Joined: Tue Jun 05, 2012 10:34 am
Re: Combobox form component in CSS
Thanks for the reply.
The fact is that in the schema, the classification could be from 01 to 99, but i have only 4 predefined labels.
I will find a workaround to match this specific case.
Thanks again,
Benoit.
The fact is that in the schema, the classification could be from 01 to 99, but i have only 4 predefined labels.
I will find a workaround to match this specific case.
Thanks again,
Benoit.
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Combobox form component in CSS
Post by alex_jitianu »
Hi,
It may help to use the tooltips property to provide those labels as tooltips:
So the user will see the actual values but their description will be presented when the mouse hovers them or when they are selected in the pop-up.
Best regards,
Alex
It may help to use the tooltips property to provide those labels as tooltips:
Code: Select all
security {
content: "Security level : "
oxy_editor(
type, combo,
edit, "@securityClassification",
editable, true,
values, "01, 02, 03, 04",
tooltips, "NOT PROTECTED, RESTRICTED, CONFIDENTIAL DEFENSE, SECRET DEFENSE/RESTRICTED");
}
Best regards,
Alex
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ 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