1
votes

I want to know if there is a "right way" to enable/ disable controls; especially triggers. In this wiki-book the authors suggests to delete the control, but I need to be visible but not working (and a style looking like disabled):

<xf:trigger ref="self::node()[count(../name) &gt; 1]">
   <xf:label>Delete Classifier</xf:label>
   <xf:delete ev:event="DOMActivate" nodeset="instance('save-data')/name" at="index('name-repeat')"/>            
</xf:trigger>

I was looking everywhere but I coudn't find anything. Any idea? Thanks in advance,

1
Looking at the XSLTForms code, the only way to make a trigger look disabled is binding it to a non existent node. It could get really hard to use this feature to get your objective. You could better try asking for this feature in the xsltforms mailing list - Bill Velasquez
And if the control is just non relevant, this is not working with xsltForms ? - Eric S

1 Answers

0
votes

I can't guarantee this is working for every xforms implementation, but the way we implemented that in our xforms developments is : 1- Bind the trigger to an element in an instance. 2- Define binding for this element with relevant property.

When the binding is non relevant, the trigger is not displayed.

This is working with Orbeon 6.2.