Hi All,
This seems like it should be really simple to do, but does anyone know how I can make a trigger to set multiple values at once? For example, in a table where each row has a boolean element(represented as a checkbox), and I'd like to make a trigger to check all of the checkboxes at once (i.e. setting all boolean values to '1'). Say I had a list of Invoice elements each with a Mailed boolean element, <Invoice><Mailed>0</Mailed></Invoice> <Invoice><Mailed>0</Mailed></Invoice> <Invoice><Mailed>0</Mailed></Invoice> <Invoice><Mailed>0</Mailed></Invoice> ... and I want to set all the Mailed elements to 1, is that possible? I tried <xforms:setvalue ref="Invoice/Mailed" value="'1'"/> It only set the first Mailed element, and not the rest of them. Thanks in advance for any suggestions. Larry T. Chen Sr. Software Engineer Intelenet Communications, Inc. -- 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 |
Larry,
You need to create a looping actions using xforms:dispatch to go through each position of the <Invoice> and change them one by one. There is a @while in xforms:action that can be used to do this, but its from the 1.1 spec and not currently supported by Orbeon Ryan Ryan Puddephatt Software Engineer Teleflex Group - IT UK 1 Michaelson Square Livingston West Lothian Scotland EH54 7DP e> [hidden email] t> +44(0)1506 407 110 f> +44(0)1506 407 108 >-----Original Message----- >From: Larry T. Chen [mailto:[hidden email]] >Sent: 13 January 2007 01:27 >To: [hidden email] >Subject: [ops-users] Trigger to set multiple values at once > >Hi All, > >This seems like it should be really simple to do, but does >anyone know how I can make a trigger to set multiple values at once? >For example, in a table where each row has a boolean >element(represented as a checkbox), and I'd like to make a >trigger to check all of the checkboxes at once (i.e. setting >all boolean values to '1'). > >Say I had a list of Invoice elements each with a Mailed >boolean element, > ><Invoice><Mailed>0</Mailed></Invoice> ><Invoice><Mailed>0</Mailed></Invoice> ><Invoice><Mailed>0</Mailed></Invoice> ><Invoice><Mailed>0</Mailed></Invoice> >... > >and I want to set all the Mailed elements to 1, is that possible? > >I tried <xforms:setvalue ref="Invoice/Mailed" value="'1'"/> >It only set the first Mailed element, and not the rest of them. > >Thanks in advance for any suggestions. > >Larry T. Chen >Sr. Software Engineer >Intelenet Communications, Inc. > > > > -- 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
|
Larry, Ryan:
>> This seems like it should be really simple to do, but does >> anyone know how I can make a trigger to set multiple values at once? >> For example, in a table where each row has a boolean >> element(represented as a checkbox), and I'd like to make a >> trigger to check all of the checkboxes at once (i.e. setting >> all boolean values to '1'). >> >> Say I had a list of Invoice elements each with a Mailed >> boolean element, >> >> <Invoice><Mailed>0</Mailed></Invoice> >> <Invoice><Mailed>0</Mailed></Invoice> >> <Invoice><Mailed>0</Mailed></Invoice> >> <Invoice><Mailed>0</Mailed></Invoice> >> ... >> >> and I want to set all the Mailed elements to 1, is that possible? >> >> I tried <xforms:setvalue ref="Invoice/Mailed" value="'1'"/> >> It only set the first Mailed element, and not the rest of them. >> >> Thanks in advance for any suggestions. > You need to create a looping actions using xforms:dispatch to go > through each position of the <Invoice> and change them one by one. > > There is a @while in xforms:action that can be used to do this, but > its from the 1.1 spec and not currently supported by Orbeon I hate to contradict you, but it is supported ;-) You could write something like: <xforms:setvalue while="Invoice/Mailed[. = 0]" ref="Invoice/Mailed[. = 0]" value="1"/> -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 |