How to reference the oxy_combobox list by button
Oxygen general issues.
-
- Posts: 12
- Joined: Tue Sep 17, 2019 1:22 am
How to reference the oxy_combobox list by button
Hi all,
I want to change the combobox values based on a button.
Button A should trigger a different xslt query for the combobox and button B should trigger another query.
The comboboxes are at the text level and not for an attribute.
For eg:-
Oxy combobox:- It has to be by default
Code for button 1:-
Code for button 2:-
Now if anyone clicks on Button E it has to update the combobox xpath
whereas if Button S is clicked , it has to update the xpath fetching S values
Please highlight how to achieve it .
Many thanks in advance for the solution..
Warm regards,
Sia
I want to change the combobox values based on a button.
Button A should trigger a different xslt query for the combobox and button B should trigger another query.
The comboboxes are at the text level and not for an attribute.
For eg:-
Oxy combobox:- It has to be by default
Code: Select all
book:{
content: oxy_combobox(edit, '#text', values, oxy_xpath('string-join(doc("abc.xml")//meta:v[not(matches(.,\'E$\'))],",")'),columns, 30) ;
}
Code for button 1:-
Code: Select all
book:after(101){
content:
oxy_button(
color, #AAAAAA,
action,
oxy_action(
name, 'E',
description, 'E',
operation, 'ro.sync.ecss.extensions.commons.operations.ChangeAttributeOperation',
arg-elementLocation,'//book',
arg-values, 'string-join(doc("def.xml")//meta:v[not(matches(.,\'E$\'))],",")',
arg-removeIfEmpty, false
),
transparent, true,
actionContext, element,
showIcon, true
);
}
Code: Select all
book:after(102){
content:
oxy_button(
color, #AAAAAA,
action,
oxy_action(
name, 'S',
description, 'S',
operation, 'ro.sync.ecss.extensions.commons.operations.ChangeAttributeOperation',
arg-elementLocation,'//book',
arg-values, 'string-join(doc("abc.xml")//meta:v[not(matches(.,\'S$\'))],",")',
arg-removeIfEmpty, false
),
transparent, true,
actionContext, element,
showIcon, true
);
}
whereas if Button S is clicked , it has to update the xpath fetching S values
Please highlight how to achieve it .
Many thanks in advance for the solution..
Warm regards,
Sia
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: How to reference the oxy_combobox list by button
Post by alex_jitianu »
Hello,
If we have just two buttons involved, then we can do it with a pseudo class:
Best regards,
Alex
If we have just two buttons involved, then we can do it with a pseudo class:
Code: Select all
book:after{
content: oxy_combobox(edit, '#text', values, oxy_xpath('string-join(doc("abc.xml")//*:v[not(matches(.,\'E$\'))],",")'),columns, 30) ;
}
book:-e-mode:after{
content: oxy_combobox(edit, '#text', values, oxy_xpath('string-join(doc("abc.xml")//*:v[not(matches(.,\'S$\'))],",")'),columns, 30) ;
}
book:after(101){
content:
oxy_button(
color, #AAAAAA,
action,
oxy_action(
name, 'E',
operation, 'SetPseudoClassOperation',
arg-name, '-e-mode'
),
transparent, true
);
}
book:after(102){
content:
oxy_button(
color, #AAAAAA,
action,
oxy_action(
name, 'S',
operation, 'RemovePseudoClassOperation',
arg-name, '-e-mode'
),
transparent, true
);
}
book:-e-mode:after(101) {
border: 1px solid red;
}
book:not(:-e-mode):after(102) {
border: 1px solid red;
}
* {
display:block;
}
Alex
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: How to reference the oxy_combobox list by button
Post by alex_jitianu »
Hello,
You can chain 2 actions, one of which will delete the text content of the element:
Best regards,
Alex
You can chain 2 actions, one of which will delete the text content of the element:
Code: Select all
book:after(101){
content:
oxy_button(
color, #AAAAAA,
action,
oxy_compound_action(
name, 'E',
description, 'Insert an "element" and then rename it to "rename"',
oxy_action(
name, 'E',
operation, 'SetPseudoClassOperation',
arg-name, '-e-mode'
),
oxy_action(
name, 'Remove',
description, 'Renames the current element',
operation, 'XQueryUpdateOperation',
arg-script, 'replace value of node . with ""'
)
),
transparent, true
);
}
Alex
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