Hi Guys,
Can someone tell me how I can make my bind calculations conditional depending on whether or not I'm in readonly mode? (I have an instance that says readonly true/false) I tried using the "relevant" tag on the bind, but this just hid the field entirely if readonly was set to true. Many thanks, -- Colin Seaman Senior Developer Tradocs Ltd, Tower Point, 44 North Road, Brighton, BN1 1YR email: [hidden email] skype: colin,seaman telephone: 0870-1417031 website: http://www.tradocs.net This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please contact Tradocs. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. This content of this email is without prejudice. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Would the if() function do the trick for you? A. On Feb 2, 2007, at 10:09 AM, Colin Seaman wrote:
-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
In reply to this post by Colin Seaman
Colin,
What about something like: calculate="if (instance('my-instance')/is-readonly = 'true') then . else 1+2+3" -Erik Colin Seaman wrote: > Hi Guys, > > Can someone tell me how I can make my bind calculations conditional > depending on whether or not I'm in readonly mode? (I have an instance > that says readonly true/false) > > I tried using the "relevant" tag on the bind, but this just hid the > field entirely if readonly was set to true. > > Many thanks, > -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
thanks.
Is it possible to hide/show buttons using a similar method based upon the same rule? Colin Seaman Senior Developer Tradocs Ltd, Tower Point, 44 North Road, Brighton, BN1 1YR email: [hidden email] skype: colin,seaman telephone: 0870-1417031 website: http://www.tradocs.net This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please contact Tradocs. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. This content of this email is without prejudice. Erik Bruchez wrote: Colin, -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
On 2/2/07, Colin Seaman <[hidden email]> wrote:
> Is it possible to hide/show buttons using a similar method based upon the > same rule? Hi Colin, You can hide/show triggers by binding them to a node and have a <xforms:bind> for that node. If you have relevant="..." which evaluates to false, then the button will not show. If you have a readonly="..." which evaluate to true, then the button will be grayed out. In most cases, there are no existing nodes which you can conveniently bind your triggers to, but you can easily create an instance just for this: <xforms:instance id="ui"> <ui> <save-trigger/> <cancel-trigger/> </ui> </xforms:instance> <xforms:trigger ref="instance('ui')/save-trigger"> ... </xforms:trigger> Alex -- Orbeon Forms - Web Forms for the Enterprise, Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Alessandro Vernet wrote:
> On 2/2/07, Colin Seaman <[hidden email]> wrote: >> Is it possible to hide/show buttons using a similar method based upon >> the >> same rule? > > Hi Colin, > > You can hide/show triggers by binding them to a node and have a > <xforms:bind> for that node. If you have relevant="..." which > evaluates to false, then the button will not show. If you have a > readonly="..." which evaluate to true, then the button will be grayed > out. > > In most cases, there are no existing nodes which you can conveniently > bind your triggers to, but you can easily create an instance just for > this: > > <xforms:instance id="ui"> > <ui> > <save-trigger/> > <cancel-trigger/> > </ui> > </xforms:instance> > > <xforms:trigger ref="instance('ui')/save-trigger"> > ... > </xforms:trigger> somthing like: <xforms:trigger ref=".[condition]"> ... Where "condition" evaluates to boolean true() or false(). If true(). the control will be relevant, if false(), it will be non-relevant and therefore hidden. -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |