Hi, all
I'm developing some forms that have a number of instances where the selections available in one dropdown list (xforms:select1) are dependant on the selection in a previous dropdown. I'm attaching a simple example where the first select1 is a list of car makes and the second select1 is a list of models dependant on the make selected. I have a simple main instance that holds the VehicleMake and VehicleModel fields. There is an instance that holds the VehicleMake enumerated values, and two instances of VehicleModel enumerations (I've made two attempts at this - both shown - but neither works as I hoped). In the first example, the desired value(s) is displayed in the 2nd dropdown; it appears, however, that no "onChange" event fires, because the xforms:output control that references the VehicleModel field of the main instance remains blank until I select something other than the first entry in the list. If I want to choose the first model, I must select the 2nd or higher model, then return to the first model. In the case where the vehicle make is "BMW" (which only has one model), it is impossible to get the onChange event to fire. As a "quick and dirty" fix, I tried adding a neutral model choice to the top of the section for each make. The value would be blank, and the text displayed to the user would be "Choose from list", prompting them to move off this neutral entry to an appropriate one, thus firing the event. This should work even for BMW. The real issue is, I'm actually creating numerous vehicle make/model entries, and the new problem is, once I've chosen the 2nd, 3rd, 1st ... entry in the model list for one make, when I select a different make, the model list is already pointing to that index, rather than index one which says "Choose from list". You can see this by selecting the 2nd Audi model, than changing the make to Chevrolet, or choose the 3rd Chevy model, then change the make to Audi. Or choose the first Audi model, then change the make to BMW (apparently, if you choose the 2nd or higher Audi or Chevy, then choose BMW, you *do* get the "Choose from list" (1st) entry because the previous index exceeds the number of BMW entries). I'd appreciate any suggestions; it seems multi-tiered dropdowns would be a common issue. I'd really like to find a solution that doesn't require interleaving dummy entries with the real data, especially since the real enumerations I'm working with have hundreds and even thousands of entries. Thanks in advance, Mark MacKinnon -- 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 |
Mark,
I added code to your file that captures the change made in the drop- down selection1 and sets the default value for selection2. That results in the 1st model of the selected make to be displayed by the output. Not sure if this completely solves your problem (...too lazy to read the complete description :-) ) Also note that I added <widget:xforms-instance-inspector xmlns:widget="http://orbeon.org/oxf/xml/widget"/> to the end of the page - this allows you to check what values any of the instances contain. A. <?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:widget="http://orbeon.org/oxf/xml/widget" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"> <head> <title>Two Tier test</title> <xf:model> <xf:instance id="Main"> <Test xmlns=""> <VehicleMakeOne/> <VehicleModelOne/> <VehicleMakeTwo/> <VehicleModelTwo/> </Test> </xf:instance> <xf:instance id="VehicleMakes"> <VehicleMakeCodes xmlns=""> <Entry code="" name=""/> <Entry code="AUDI" name="Audi"/> <Entry code="BMW" name="BMW"/> <Entry code="CHEV" name="Chevrolet"/> </VehicleMakeCodes> </xf:instance> <xf:instance id="VehicleModelsSimple"> <VehicleModelCodes xmlns=""> <Entry make="" code="" model=""/> <Entry make="AUDI" code="1st Audi Model" model="1st Audi Model"/> <Entry make="AUDI" code="2nd Audi Model" model="2nd Audi Model"/> <Entry make="AUDI" code="3rd Audi Model" model="3rd Audi Model"/> <Entry make="BMW" code="1st and Only BMW Model" model="1st and Only BMW Model"/> <Entry make="CHEV" code="1st Chevy Model" model="1st Chevy Model"/> <Entry make="CHEV" code="2nd Chevy Model" model="2nd Chevy Model"/> <Entry make="CHEV" code="3rd Chevy Model" model="3rd Chevy Model"/> <Entry make="CHEV" code="4th Chevy Model" model="4th Chevy Model"/> </VehicleModelCodes> </xf:instance> <xf:instance id="VehicleModelsExpanded"> <VehicleModelCodes xmlns=""> <Entry make="" code="" model=""/> <Entry make="AUDI" code="" model="Choose from list"/> <Entry make="AUDI" code="1st Audi Model" model="1st Audi Model"/> <Entry make="AUDI" code="2nd Audi Model" model="2nd Audi Model"/> <Entry make="AUDI" code="3rd Audi Model" model="3rd Audi Model"/> <Entry make="BMW" code="" model="Choose from list"/> <Entry make="BMW" code="1st and Only BMW Model" model="1st and Only BMW Model"/> <Entry make="CHEV" code="" model="Choose from list"/> <Entry make="CHEV" code="1st Chevy Model" model="1st Chevy Model"/> <Entry make="CHEV" code="2nd Chevy Model" model="2nd Chevy Model"/> <Entry make="CHEV" code="3rd Chevy Model" model="3rd Chevy Model"/> <Entry make="CHEV" code="4th Chevy Model" model="4th Chevy Model"/> </VehicleModelCodes> </xf:instance> <xf:submission id="submit-test" method="post" ref="/Test" action="http://www.xformstest.org/cgi-bin/echo.sh" /> </xf:model> </head> <body> <fieldset> <legend>Problem One</legend> <xf:select1 ref="VehicleMakeOne"> <xf:label>Make: </xf:label> <xf:itemset nodeset="instance('VehicleMakes')/Entry"> <xf:label ref="@name"/> <xf:value ref="@code"/> </xf:itemset> <xf:action ev:event="xforms-value-changed"> <xf:setvalue ref="../VehicleModelOne" value="instance('VehicleModelsSimple')/Entry[@make=instance('Main')/ VehicleMakeOne]/@model"/> </xf:action> </xf:select1> <xf:select1 ref="VehicleModelOne"> <xf:label>Model: </xf:label> <xf:itemset nodeset="instance('VehicleModelsSimple')/ Entry[@make = instance('Main')/VehicleMakeOne]"> <xf:label ref="@model"/> <xf:value ref="@code"/> </xf:itemset> </xf:select1> <xf:output ref="VehicleModelOne"> <xf:label>What gets stored in instance: </xf:label> </xf:output> </fieldset> <fieldset> <legend>Problem Two</legend> <xf:select1 ref="VehicleMakeTwo"> <xf:label>Make: </xf:label> <xf:itemset nodeset="instance('VehicleMakes')/Entry"> <xf:label ref="@name"/> <xf:value ref="@code"/> </xf:itemset> </xf:select1> <xf:select1 ref="VehicleModelTwo"> <xf:label>Model: </xf:label> <xf:itemset nodeset="instance ('VehicleModelsExpanded')/Entry[@make = instance('Main')/VehicleMakeTwo]"> <xf:label ref="@model"/> <xf:value ref="@code"/> </xf:itemset> </xf:select1> <xf:output ref="VehicleModelTwo"> <xf:label>What gets stored in instance: </xf:label> </xf:output> </fieldset> <P> <xf:submit submission="submit-test"> <xf:label>Submit the Form</xf:label> </xf:submit> </P> <widget:xforms-instance-inspector xmlns:widget="http:// orbeon.org/oxf/xml/widget"/> </body> </html> On Oct 2, 2007, at 12:47 AM, Mark MacKinnon wrote: > Hi, all > > I'm developing some forms that have a number of instances where the > selections > available in one dropdown list (xforms:select1) are dependant on > the selection > in a previous dropdown. I'm attaching a simple example where the > first select1 > is a list of car makes and the second select1 is a list of models > dependant on > the make selected. > > I have a simple main instance that holds the VehicleMake and > VehicleModel > fields. There is an instance that holds the VehicleMake enumerated > values, and > two instances of VehicleModel enumerations (I've made two attempts > at this - > both shown - but neither works as I hoped). > > In the first example, the desired value(s) is displayed in the 2nd > dropdown; it > appears, however, that no "onChange" event fires, because the > xforms:output > control that references the VehicleModel field of the main instance > remains > blank until I select something other than the first entry in the > list. If I > want to choose the first model, I must select the 2nd or higher > model, then > return to the first model. In the case where the vehicle make is > "BMW" (which > only has one model), it is impossible to get the onChange event to > fire. > > As a "quick and dirty" fix, I tried adding a neutral model choice > to the top of > the section for each make. The value would be blank, and the text > displayed to > the user would be "Choose from list", prompting them to move off > this neutral > entry to an appropriate one, thus firing the event. This should > work even for > BMW. > > The real issue is, I'm actually creating numerous vehicle make/ > model entries, > and the new problem is, once I've chosen the 2nd, 3rd, 1st ... > entry in the > model list for one make, when I select a different make, the model > list is > already pointing to that index, rather than index one which says > "Choose from > list". You can see this by selecting the 2nd Audi model, than > changing the > make to Chevrolet, or choose the 3rd Chevy model, then change the > make to Audi. > Or choose the first Audi model, then change the make to BMW > (apparently, if > you choose the 2nd or higher Audi or Chevy, then choose BMW, you > *do* get the > "Choose from list" (1st) entry because the previous index exceeds > the number of > BMW entries). > > I'd appreciate any suggestions; it seems multi-tiered dropdowns > would be a > common issue. I'd really like to find a solution that doesn't require > interleaving dummy entries with the real data, especially since the > real > enumerations I'm working with have hundreds and even thousands of > entries. > > Thanks in advance, > Mark MacKinnon > > -- > 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 |
Hi, Alexander
Yes, that solves my problem exactly, not only on the simple example but the much more complex instances. I thought there must be a way to force an event that would cause an update to occur, and I had tried several ways without results. I think my error was trying to fire the event from the second select1 itself, instead of firing it from the first select1 referencing the 2nd select1. Thanks once again, Mark ________________________________ From: [hidden email] on behalf of Alexander Zatko Sent: Tue 10/2/2007 1:57 AM To: [hidden email] Subject: Re: [ops-users] Problem getting two-tier select1 to work as desired Mark, I added code to your file that captures the change made in the drop- down selection1 and sets the default value for selection2. That results in the 1st model of the selected make to be displayed by the output. Not sure if this completely solves your problem (...too lazy to read the complete description :-) ) Also note that I added <widget:xforms-instance-inspector xmlns:widget="http://orbeon.org/oxf/xml/widget"/> to the end of the page - this allows you to check what values any of the instances contain. A. <?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:widget="http://orbeon.org/oxf/xml/widget" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"> <head> <title>Two Tier test</title> <xf:model> <xf:instance id="Main"> <Test xmlns=""> <VehicleMakeOne/> <VehicleModelOne/> <VehicleMakeTwo/> <VehicleModelTwo/> </Test> </xf:instance> <xf:instance id="VehicleMakes"> <VehicleMakeCodes xmlns=""> <Entry code="" name=""/> <Entry code="AUDI" name="Audi"/> <Entry code="BMW" name="BMW"/> <Entry code="CHEV" name="Chevrolet"/> </VehicleMakeCodes> </xf:instance> <xf:instance id="VehicleModelsSimple"> <VehicleModelCodes xmlns=""> <Entry make="" code="" model=""/> <Entry make="AUDI" code="1st Audi Model" model="1st Audi Model"/> <Entry make="AUDI" code="2nd Audi Model" model="2nd Audi Model"/> <Entry make="AUDI" code="3rd Audi Model" model="3rd Audi Model"/> <Entry make="BMW" code="1st and Only BMW Model" model="1st and Only BMW Model"/> <Entry make="CHEV" code="1st Chevy Model" model="1st Chevy Model"/> <Entry make="CHEV" code="2nd Chevy Model" model="2nd Chevy Model"/> <Entry make="CHEV" code="3rd Chevy Model" model="3rd Chevy Model"/> <Entry make="CHEV" code="4th Chevy Model" model="4th Chevy Model"/> </VehicleModelCodes> </xf:instance> <xf:instance id="VehicleModelsExpanded"> <VehicleModelCodes xmlns=""> <Entry make="" code="" model=""/> <Entry make="AUDI" code="" model="Choose from list"/> <Entry make="AUDI" code="1st Audi Model" model="1st Audi Model"/> <Entry make="AUDI" code="2nd Audi Model" model="2nd Audi Model"/> <Entry make="AUDI" code="3rd Audi Model" model="3rd Audi Model"/> <Entry make="BMW" code="" model="Choose from list"/> <Entry make="BMW" code="1st and Only BMW Model" model="1st and Only BMW Model"/> <Entry make="CHEV" code="" model="Choose from list"/> <Entry make="CHEV" code="1st Chevy Model" model="1st Chevy Model"/> <Entry make="CHEV" code="2nd Chevy Model" model="2nd Chevy Model"/> <Entry make="CHEV" code="3rd Chevy Model" model="3rd Chevy Model"/> <Entry make="CHEV" code="4th Chevy Model" model="4th Chevy Model"/> </VehicleModelCodes> </xf:instance> <xf:submission id="submit-test" method="post" ref="/Test" action="http://www.xformstest.org/cgi-bin/echo.sh" /> </xf:model> </head> <body> <fieldset> <legend>Problem One</legend> <xf:select1 ref="VehicleMakeOne"> <xf:label>Make: </xf:label> <xf:itemset nodeset="instance('VehicleMakes')/Entry"> <xf:label ref="@name"/> <xf:value ref="@code"/> </xf:itemset> <xf:action ev:event="xforms-value-changed"> <xf:setvalue ref="../VehicleModelOne" value="instance('VehicleModelsSimple')/Entry[@make=instance('Main')/ VehicleMakeOne]/@model"/> </xf:action> </xf:select1> <xf:select1 ref="VehicleModelOne"> <xf:label>Model: </xf:label> <xf:itemset nodeset="instance('VehicleModelsSimple')/ Entry[@make = instance('Main')/VehicleMakeOne]"> <xf:label ref="@model"/> <xf:value ref="@code"/> </xf:itemset> </xf:select1> <xf:output ref="VehicleModelOne"> <xf:label>What gets stored in instance: </xf:label> </xf:output> </fieldset> <fieldset> <legend>Problem Two</legend> <xf:select1 ref="VehicleMakeTwo"> <xf:label>Make: </xf:label> <xf:itemset nodeset="instance('VehicleMakes')/Entry"> <xf:label ref="@name"/> <xf:value ref="@code"/> </xf:itemset> </xf:select1> <xf:select1 ref="VehicleModelTwo"> <xf:label>Model: </xf:label> <xf:itemset nodeset="instance ('VehicleModelsExpanded')/Entry[@make = instance('Main')/VehicleMakeTwo]"> <xf:label ref="@model"/> <xf:value ref="@code"/> </xf:itemset> </xf:select1> <xf:output ref="VehicleModelTwo"> <xf:label>What gets stored in instance: </xf:label> </xf:output> </fieldset> <P> <xf:submit submission="submit-test"> <xf:label>Submit the Form</xf:label> </xf:submit> </P> <widget:xforms-instance-inspector xmlns:widget="http:// <http:///> orbeon.org/oxf/xml/widget"/> </body> </html> On Oct 2, 2007, at 12:47 AM, Mark MacKinnon wrote: > Hi, all > > I'm developing some forms that have a number of instances where the > selections > available in one dropdown list (xforms:select1) are dependant on > the selection > in a previous dropdown. I'm attaching a simple example where the > first select1 > is a list of car makes and the second select1 is a list of models > dependant on > the make selected. > > I have a simple main instance that holds the VehicleMake and > VehicleModel > fields. There is an instance that holds the VehicleMake enumerated > values, and > two instances of VehicleModel enumerations (I've made two attempts > at this - > both shown - but neither works as I hoped). > > In the first example, the desired value(s) is displayed in the 2nd > dropdown; it > appears, however, that no "onChange" event fires, because the > xforms:output > control that references the VehicleModel field of the main instance > remains > blank until I select something other than the first entry in the > list. If I > want to choose the first model, I must select the 2nd or higher > model, then > return to the first model. In the case where the vehicle make is > "BMW" (which > only has one model), it is impossible to get the onChange event to > fire. > > As a "quick and dirty" fix, I tried adding a neutral model choice > to the top of > the section for each make. The value would be blank, and the text > displayed to > the user would be "Choose from list", prompting them to move off > this neutral > entry to an appropriate one, thus firing the event. This should > work even for > BMW. > > The real issue is, I'm actually creating numerous vehicle make/ > model entries, > and the new problem is, once I've chosen the 2nd, 3rd, 1st ... > entry in the > model list for one make, when I select a different make, the model > list is > already pointing to that index, rather than index one which says > "Choose from > list". You can see this by selecting the 2nd Audi model, than > changing the > make to Chevrolet, or choose the 3rd Chevy model, then change the > make to Audi. > Or choose the first Audi model, then change the make to BMW > (apparently, if > you choose the 2nd or higher Audi or Chevy, then choose BMW, you > *do* get the > "Choose from list" (1st) entry because the previous index exceeds > the number of > BMW entries). > > I'd appreciate any suggestions; it seems multi-tiered dropdowns > would be a > common issue. I'd really like to find a solution that doesn't require > interleaving dummy entries with the real data, especially since the > real > enumerations I'm working with have hundreds and even thousands of > entries. > > Thanks in advance, > Mark MacKinnon > > -- > 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 winmail.dat (29K) Download Attachment |
In reply to this post by Alexander Žaťko
I think Djalma Saraiva may be seeking a response to a problem such as Alex solved for me here? Hope this helps.
Mark MacKinnon ________________________________ From: [hidden email] on behalf of Alexander Zatko Sent: Tue 10/2/2007 1:57 AM To: [hidden email] Subject: Re: [ops-users] Problem getting two-tier select1 to work as desired Mark, I added code to your file that captures the change made in the drop- down selection1 and sets the default value for selection2. That results in the 1st model of the selected make to be displayed by the output. Not sure if this completely solves your problem (...too lazy to read the complete description :-) ) Also note that I added <widget:xforms-instance-inspector xmlns:widget="http://orbeon.org/oxf/xml/widget"/> to the end of the page - this allows you to check what values any of the instances contain. A. <?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:widget="http://orbeon.org/oxf/xml/widget" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"> <head> <title>Two Tier test</title> <xf:model> <xf:instance id="Main"> <Test xmlns=""> <VehicleMakeOne/> <VehicleModelOne/> <VehicleMakeTwo/> <VehicleModelTwo/> </Test> </xf:instance> <xf:instance id="VehicleMakes"> <VehicleMakeCodes xmlns=""> <Entry code="" name=""/> <Entry code="AUDI" name="Audi"/> <Entry code="BMW" name="BMW"/> <Entry code="CHEV" name="Chevrolet"/> </VehicleMakeCodes> </xf:instance> <xf:instance id="VehicleModelsSimple"> <VehicleModelCodes xmlns=""> <Entry make="" code="" model=""/> <Entry make="AUDI" code="1st Audi Model" model="1st Audi Model"/> <Entry make="AUDI" code="2nd Audi Model" model="2nd Audi Model"/> <Entry make="AUDI" code="3rd Audi Model" model="3rd Audi Model"/> <Entry make="BMW" code="1st and Only BMW Model" model="1st and Only BMW Model"/> <Entry make="CHEV" code="1st Chevy Model" model="1st Chevy Model"/> <Entry make="CHEV" code="2nd Chevy Model" model="2nd Chevy Model"/> <Entry make="CHEV" code="3rd Chevy Model" model="3rd Chevy Model"/> <Entry make="CHEV" code="4th Chevy Model" model="4th Chevy Model"/> </VehicleModelCodes> </xf:instance> <xf:instance id="VehicleModelsExpanded"> <VehicleModelCodes xmlns=""> <Entry make="" code="" model=""/> <Entry make="AUDI" code="" model="Choose from list"/> <Entry make="AUDI" code="1st Audi Model" model="1st Audi Model"/> <Entry make="AUDI" code="2nd Audi Model" model="2nd Audi Model"/> <Entry make="AUDI" code="3rd Audi Model" model="3rd Audi Model"/> <Entry make="BMW" code="" model="Choose from list"/> <Entry make="BMW" code="1st and Only BMW Model" model="1st and Only BMW Model"/> <Entry make="CHEV" code="" model="Choose from list"/> <Entry make="CHEV" code="1st Chevy Model" model="1st Chevy Model"/> <Entry make="CHEV" code="2nd Chevy Model" model="2nd Chevy Model"/> <Entry make="CHEV" code="3rd Chevy Model" model="3rd Chevy Model"/> <Entry make="CHEV" code="4th Chevy Model" model="4th Chevy Model"/> </VehicleModelCodes> </xf:instance> <xf:submission id="submit-test" method="post" ref="/Test" action="http://www.xformstest.org/cgi-bin/echo.sh" /> </xf:model> </head> <body> <fieldset> <legend>Problem One</legend> <xf:select1 ref="VehicleMakeOne"> <xf:label>Make: </xf:label> <xf:itemset nodeset="instance('VehicleMakes')/Entry"> <xf:label ref="@name"/> <xf:value ref="@code"/> </xf:itemset> <xf:action ev:event="xforms-value-changed"> <xf:setvalue ref="../VehicleModelOne" value="instance('VehicleModelsSimple')/Entry[@make=instance('Main')/ VehicleMakeOne]/@model"/> </xf:action> </xf:select1> <xf:select1 ref="VehicleModelOne"> <xf:label>Model: </xf:label> <xf:itemset nodeset="instance('VehicleModelsSimple')/ Entry[@make = instance('Main')/VehicleMakeOne]"> <xf:label ref="@model"/> <xf:value ref="@code"/> </xf:itemset> </xf:select1> <xf:output ref="VehicleModelOne"> <xf:label>What gets stored in instance: </xf:label> </xf:output> </fieldset> <fieldset> <legend>Problem Two</legend> <xf:select1 ref="VehicleMakeTwo"> <xf:label>Make: </xf:label> <xf:itemset nodeset="instance('VehicleMakes')/Entry"> <xf:label ref="@name"/> <xf:value ref="@code"/> </xf:itemset> </xf:select1> <xf:select1 ref="VehicleModelTwo"> <xf:label>Model: </xf:label> <xf:itemset nodeset="instance ('VehicleModelsExpanded')/Entry[@make = instance('Main')/VehicleMakeTwo]"> <xf:label ref="@model"/> <xf:value ref="@code"/> </xf:itemset> </xf:select1> <xf:output ref="VehicleModelTwo"> <xf:label>What gets stored in instance: </xf:label> </xf:output> </fieldset> <P> <xf:submit submission="submit-test"> <xf:label>Submit the Form</xf:label> </xf:submit> </P> <widget:xforms-instance-inspector xmlns:widget="http:// <http:///> orbeon.org/oxf/xml/widget"/> </body> </html> On Oct 2, 2007, at 12:47 AM, Mark MacKinnon wrote: > Hi, all > > I'm developing some forms that have a number of instances where the > selections > available in one dropdown list (xforms:select1) are dependant on > the selection > in a previous dropdown. I'm attaching a simple example where the > first select1 > is a list of car makes and the second select1 is a list of models > dependant on > the make selected. > > I have a simple main instance that holds the VehicleMake and > VehicleModel > fields. There is an instance that holds the VehicleMake enumerated > values, and > two instances of VehicleModel enumerations (I've made two attempts > at this - > both shown - but neither works as I hoped). > > In the first example, the desired value(s) is displayed in the 2nd > dropdown; it > appears, however, that no "onChange" event fires, because the > xforms:output > control that references the VehicleModel field of the main instance > remains > blank until I select something other than the first entry in the > list. If I > want to choose the first model, I must select the 2nd or higher > model, then > return to the first model. In the case where the vehicle make is > "BMW" (which > only has one model), it is impossible to get the onChange event to > fire. > > As a "quick and dirty" fix, I tried adding a neutral model choice > to the top of > the section for each make. The value would be blank, and the text > displayed to > the user would be "Choose from list", prompting them to move off > this neutral > entry to an appropriate one, thus firing the event. This should > work even for > BMW. > > The real issue is, I'm actually creating numerous vehicle make/ > model entries, > and the new problem is, once I've chosen the 2nd, 3rd, 1st ... > entry in the > model list for one make, when I select a different make, the model > list is > already pointing to that index, rather than index one which says > "Choose from > list". You can see this by selecting the 2nd Audi model, than > changing the > make to Chevrolet, or choose the 3rd Chevy model, then change the > make to Audi. > Or choose the first Audi model, then change the make to BMW > (apparently, if > you choose the 2nd or higher Audi or Chevy, then choose BMW, you > *do* get the > "Choose from list" (1st) entry because the previous index exceeds > the number of > BMW entries). > > I'd appreciate any suggestions; it seems multi-tiered dropdowns > would be a > common issue. I'd really like to find a solution that doesn't require > interleaving dummy entries with the real data, especially since the > real > enumerations I'm working with have hundreds and even thousands of > entries. > > Thanks in advance, > Mark MacKinnon > > -- > 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 winmail.dat (28K) Download Attachment |
<BASE
href="file://C:\Program Files\Common Files\Microsoft Shared\Stationery\">
I forgot to attach .. Please find attached the code.
Note: I need the value of second combo box(combo2).
Thanks!
-- 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 combobox.txt (14K) Download Attachment |
In reply to this post by Mackinnon, Mark A.
Interestingly, I worked on triple combo dynamic drop downs last month and I have the code with me. Perhaps you might find it interesting.
|
In reply to this post by Mackinnon, Mark A.
We don't see the attached sample. Perhaps you forgot?
|
In reply to this post by djalma.saraiva
I think some of your attached code was removed by the system. Could you attach it some other way?
|
In reply to this post by Mackinnon, Mark A.
Hi Mark
I tried to download the file "winmail.dat" but could not read its contents. Could you attach it as an .xform file or a .xhtml file?
|
In reply to this post by djalma.saraiva
here you are! attached...there was a problem in your model! you were using same attribute instance('items-instance2')/@value to identify the production line for the cliente and the client identifier, i have split it, your old @value is named now @linha an you have a new attribute @value with a string unique for each client.
you have missed too right reference on client select1, you need ref="instance('instance-cliente')" instead of ref="item". hope this helps... -- 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 view.xhtml (10K) Download Attachment |
Hi Alex,
I just complete the project. It is working well, as they must, it concat the name and shows the logo of the company. Thank you for contributions! Mainly, you and Steph! Thank you! Djalma Saraiva [hidden email] Tel +55 51 2117 1872 | +55 11 3717 5271 www.projeler.com.br ----- Original Message ----- From: "Richard C. Hidalgo Lorite" <[hidden email]> To: <[hidden email]> Cc: <[hidden email]> Sent: Friday, January 18, 2008 8:56 AM Subject: Re: [ops-users] Get the value of dynamic combobox > here you are! attached...there was a problem in your model! you were using > same attribute instance('items-instance2')/@value to identify the > production line for the cliente and the client identifier, i have split > it, your old @value is named now @linha an you have a new attribute @value > with a string unique for each client. > > you have missed too right reference on client select1, you need > ref="instance('instance-cliente')" instead of ref="item". > > hope this helps... -------------------------------------------------------------------------------- > > -- > 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 |
Administrator
|
Djalma,
On Jan 18, 2008 5:10 AM, Djalma Saraiva - PROJELER <[hidden email]> wrote: > I just complete the project. It is working well, as they must, it concat the > name and shows the logo of the company. > Thank you for contributions! Mainly, you and Steph! Glad to see that you completed this. And also thank you Richard for your help on this. Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
In reply to this post by djalma.saraiva
On Fri, 18 Jan 2008 11:10:26 -0200
"Djalma Saraiva - PROJELER" <[hidden email]> wrote: > Hi Alex, I'm not Alex but Rich, no sou o Alex, sou o rich até logo rich -- 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 |
Desculpe Rich pela confusão.
Obrigado pela ajuda, amigo. Até logo. Djalma Saraiva [hidden email] Tel +55 51 2117 1872 | +55 11 3717 5271 www.projeler.com.br ----- Original Message ----- From: "Richard C. Hidalgo Lorite" <[hidden email]> To: <[hidden email]> Cc: <[hidden email]> Sent: Friday, January 18, 2008 4:54 PM Subject: Re: [ops-users] Get the value of dynamic combobox On Fri, 18 Jan 2008 11:10:26 -0200 "Djalma Saraiva - PROJELER" <[hidden email]> wrote: > Hi Alex, I'm not Alex but Rich, no sou o Alex, sou o rich até logo rich -------------------------------------------------------------------------------- > > -- > 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 |
Pleas unsubscribe me from this mailinglist.! BR EK Djalma Saraiva - PROJELER schrieb: Desculpe Rich pela confusão. -- 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 |
Administrator
|
You can unsubscribe yourself by sending an email to this address:
[hidden email] -Erik On Jan 19, 2008, at 2:52 PM, E.Kononov wrote: > Dear Community, > Pleas unsubscribe me from this mailinglist.! > > BR > EK > > > Djalma Saraiva - PROJELER schrieb: >> >> Desculpe Rich pela confusão. >> Obrigado pela ajuda, amigo. >> >> Até logo. >> >> Djalma Saraiva >> [hidden email] >> Tel +55 51 2117 1872 | +55 11 3717 5271 >> >> www.projeler.com.br >> >> >> ----- Original Message ----- From: "Richard C. Hidalgo Lorite" <[hidden email] >> > >> To: <[hidden email]> >> Cc: <[hidden email]> >> Sent: Friday, January 18, 2008 4:54 PM >> Subject: Re: [ops-users] Get the value of dynamic combobox >> >> >> On Fri, 18 Jan 2008 11:10:26 -0200 >> "Djalma Saraiva - PROJELER" <[hidden email]> wrote: >> >>> Hi Alex, >> >> I'm not Alex but Rich, no sou o Alex, sou o rich >> >> até logo >> >> rich >> >> >> >> -------------------------------------------------------------------------------- >> >> >>> >>> -- >>> 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 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |