xbl

Dynamically evaluate XPath stored in a variable

风格不统一 提交于 2020-01-16 18:00:24
问题 I have a variable: <xf:var name="xpath" value="/my/xpath/expression"/> and I want to use /my/xpath/expression in the ref attribute of <xf:input> : <xf:input ref="/my/xpath/expression"/> Here I use a hardcoded XPath expression, but I want instead to use the XPath expression stored in the $xpath variable instead, something like this : <xf:input ref="$xpath"/> How can this be achieved? 回答1: What you probably mean is that the value of $xpath is a string, literal or not, which you then want to

Do moz-behaviors work in Firefox 10?

吃可爱长大的小学妹 提交于 2019-12-24 04:31:45
问题 I downloaded an example of moz-behaviors usage but it doesn't work in Firefox 10. Do I need to change something to make it work? 回答1: No, web pages can no longer use XBL as of Firefox 4 (the support was removed along with the support for remote XUL). It is possible to enable both remote XUL and XBL for specific web sites but you cannot expect users to do that - so essentially moz-behaviors no longer works. 来源: https://stackoverflow.com/questions/9679527/do-moz-behaviors-work-in-firefox-10

How to create Orbeon custom control XBL with predefined visibility, control name, default value?

血红的双手。 提交于 2019-12-23 01:47:08
问题 I have created a custom control (hidden text box with some predefined value), where I want to set visibility=false() , controlName="Mycustom" , default value="This is my custom control" in XBL file. So that whenever we use that custom control from Orbeon Form Builder, it will come with all default values with no need to set anything. XBL: <xbl:xbl xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ev="http://www

getElementById a XBL bound XUL element

♀尐吖头ヾ 提交于 2019-12-21 23:56:52
问题 I'm trying to access a XUL element which was XBL bound. I want to controll it from the javascript. This is the binding. <binding id="imip-throbber"> <resources> <stylesheet src="chrome://lightning/skin/lightning-widgets.css"/> </resources> <content pack="center" align="center"> <xul:image anonid="loading-throbber" src="chrome://global/skin/icons/loading_16.png" hidden="false"/> </content> </binding> This is the CSS binding imip-throbber { -moz-binding: url(chrome://lightning/content/lightning

Calling a method from XBL

↘锁芯ラ 提交于 2019-12-20 05:39:08
问题 From a XBL method, when I need to call another method, I do like: <method name="myMethod_1"> <body> <![CDATA[ // do staff ]]> </body> </method> <method name="myMethod_2"> <body> <![CDATA[ document.getElementById("thisElementID").myMethod_1(); ]]> </body> </method> I would like to know if is there a way to call the local method without need the element id? I've tried this.myMethod_1() but it says the method don't exist. 回答1: can you show us code calling myMethod_2? If you call it like:

XBL Orbeon custom control to show different success message on form save

会有一股神秘感。 提交于 2019-12-18 09:49:47
问题 I am using yForm (Orbeon Form Builder) to generate form run time, where we have a requirement to set different custom success message for each form (eg: "Your contact form save successfully", "Your address form…"). I would like to configure this success message from Form Builder, so that whenever an end user saves that form, it can see the corresponding custom message. 回答1: I'll assume that by "success message", you are referring to the message shown next to the buttons that are at the bottom

Dynamic way to unbind dynamically binded XBL

若如初见. 提交于 2019-12-18 09:35:10
问题 I am applying a binding like this in a restartless add-on: var css = '.findbar-container { -moz-binding:url("' + self.path.chrome + 'findbar.xml#matchword") }'; var cssEnc = encodeURIComponent(css); var newURIParam = { aURL: 'data:text/css,' + cssEnc, aOriginCharset: null, aBaseURI: null } cssUri = Services.io.newURI(newURIParam.aURL, newURIParam.aOriginCharset, newURIParam.aBaseURI); myServices.sss.loadAndRegisterSheet(cssUri, myServices.sss.USER_SHEET); findbar.xml contents are: <?xml

Catching save event in Form Builder

人盡茶涼 提交于 2019-12-13 06:53:20
问题 I would like to send submission after form has been saved in Form Builder, I was trying something like this at first (in my XBL file): <xf:action ev:event="fr-data-save-done" ev:observer="fr-form-model"> <xf:message event="#all" level="modal">Saved</xf:message> <xf:send submission="my-submission" ev:event="#all"/> </xf:action> The code above is placed in XBL file between xbl:template, outside xbl:model (though I tried to put it inside xbl:model with no luck). Unfortunately it's not working,

Event xforms-model-construct-done behaviour

↘锁芯ラ 提交于 2019-12-11 16:14:50
问题 In my form I would like to call web service after to form is loaded after publishing. I've created custom XBL control for it, where I have : <xf:group id="component-group"> <xf:action ev:event="xforms-enabled" ev:target="component-group"> <xf:send ev:event="xforms-enabled" submission="my-submission"/> </xf:action> </xf:group> But it doesn't work as expected : my submission is sent everytime when I add new element in FormBuilder or change a name of some other controls. Generally speaking

How to create Orbeon custom control XBL with predefined visibility, control name, default value?

不问归期 提交于 2019-12-07 01:43:31
I have created a custom control (hidden text box with some predefined value), where I want to set visibility=false() , controlName="Mycustom" , default value="This is my custom control" in XBL file. So that whenever we use that custom control from Orbeon Form Builder, it will come with all default values with no need to set anything. XBL: <xbl:xbl xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xxi="http://orbeon.org/oxf/xml