I would like set some value when select1 control changed or selected. like this <xforms:instance id="countries"> <countries> <country> <name /> <district /> </country> </countries> </xforms:instance> <xforms:select1 ref="express-address-county"> <xforms:label>LABEL NAME</xforms:label> <xforms:item> <xforms:label>CHOOSE</xforms:label> <xforms:value /> </xforms:item> <xforms:itemset nodeset="instance('countries')/country"> <xforms:label ref="name" /> <xforms:value ref="name" /> <xforms:setvalue ev:event="xforms-value-changed" ref="instance('purchase-order')/basic-data/express-area" value="./district" /> </xforms:itemset> </xforms:select1> But nothing happen! It seem like xforms-value-changed event don't activate. Does another way to set value when drop-down list selected or changed? Jack -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Jack,
> <xforms:select1 ref="express-address-county"> > <xforms:label>LABEL NAME</xforms:label> > <xforms:item> > <xforms:label>CHOOSE</xforms:label> > <xforms:value /> > </xforms:item> > <xforms:itemset nodeset="instance('countries')/country"> > <xforms:label ref="name" /> > <xforms:value ref="name" /> > <xforms:setvalue ev:event="xforms-value-changed" > ref="instance('purchase-order')/basic-data/express-area" > value="./district" /> > </xforms:itemset> > </xforms:select1> > > But nothing happen! > It seem like xforms-value-changed event don't activate. itemset doesn't change. Does it work if you place the setvalue element under the select1 directly? (just a guess, i didn't test it) HTH florian -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Place the setvalue element under the select1 directly is effective. But I can't figure out which node selected so value attribute is unknown. Do you know how to figure out which one selected? <xforms:setvalue ev:event="xforms-value-changed" ref="instance('purchase-order')/basic-data/express-area"value="?" /> http://publib.boulder.ibm.com/infocenter/forms/v3r0m0/index.jsp?topic=/com.ibm.help.forms.doc/Specification/i_xfdl_g_xforms_events_xforms-select.html thank you for your suggestion, Jack -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Jack,
> Place the setvalue element under the select1 directly is effective. > But I can't figure out which node selected so value attribute is unknown. > Do you know how to figure out which one selected? > > <xforms:setvalue ev:event="xforms-value-changed" ref="instance('purchase-order')/basic-data/express-area" > value="?" /> there may be better ways, but you could use a comparison between the selected country and the country names node-list as follows: value="instance('countries')/country[ name eq instance('???')//express-address-country ]/district" This should select the 'district' child of the country that's identified by the selected name. HTH florian -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
It solve my problem.
thanks for your suggestion. Jack -----Original Message----- From: Florian Schmitt <[hidden email]> Reply-to: [hidden email] To: [hidden email] Subject: [ops-users] Re: Re: Re: Question of set value when select1 control selected Date: Thu, 08 Jan 2009 09:25:20 +0100 Jack, > Place the setvalue element under the select1 directly is effective. > But I can't figure out which node selected so value attribute is unknown. > Do you know how to figure out which one selected? > > <xforms:setvalue ev:event="xforms-value-changed" ref="instance('purchase-order')/basic-data/express-area" > value="?" /> there may be better ways, but you could use a comparison between the selected country and the country names node-list as follows: value="instance('countries')/country[ name eq instance('???')//express-address-country ]/district" This should select the 'district' child of the country that's identified by the selected name. HTH florian plain text document attachment (message-footer.txt) -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |