Hello OF developers,
I'm testing xf:select1 with OPS 3.5 M1, and I find a non-consistent behavior between the differents appearance values, specifically with appearance="minimal". Check it with the following example: <?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:my="http://www.example.com/my"> <head> <xf:model> <xf:instance id="first"> <my:root><my:data>some text</my:data></my:root> </xf:instance> <xf:submission id="submit" action="http://xformstest.org/cgi-bin/echo.sh" method="post"/> </xf:model> </head> <body> Form: <xf:group ref="instance('first')"> <p>root/data="<xf:output value="my:data"/>"</p> <xf:input ref="my:data"/> <xf:select1 id="sel1" ref="my:data" appearance="minimal"> <xf:item> <xf:label>A</xf:label> <xf:value>A</xf:value> </xf:item> <xf:item> <xf:label>B</xf:label> <xf:value>B</xf:value> </xf:item> <xf:item> <xf:label>C</xf:label> <xf:value>C</xf:value> </xf:item> </xf:select1> <xf:select1 id="sel2" ref="my:data" appearance="compact"> <xf:item> <xf:label>O</xf:label> <xf:value>O</xf:value> </xf:item> <xf:item> <xf:label>P</xf:label> <xf:value>P</xf:value> </xf:item> <xf:item> <xf:label>Q</xf:label> <xf:value>Q</xf:value> </xf:item> </xf:select1> <xf:select1 id="sel3" ref="my:data" appearance="full"> <xf:item> <xf:label>X</xf:label> <xf:value>X</xf:value> </xf:item> <xf:item> <xf:label>Y</xf:label> <xf:value>Y</xf:value> </xf:item> <xf:item> <xf:label>Z</xf:label> <xf:value>Z</xf:value> </xf:item> </xf:select1> </xf:group> </body> </html> You can see the problem with the first select1 control: the value "A" appears selected! and the other two are ok. The select1 with appearance="minimal" should appear visually empty. (Take this same example and run it with Mozilla XForms 0.7 in Firefox, If you don't understand my explanation) Test it again putting some other value of the other two select1 controls: the first select1 would not have to show a selected value! Edgard. -- 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
|
Hi Edgard,
Yes, there is definitely an issue there, and we are aware of it. The problem is that the HTML drop down doesn't have by default a choice for "other" or "empty". The Mozilla implementation adds this empty value to the drop down, and then removes it from the drop down as soon as you select something else. I am not sure I like this either: it means that if you select something, you have no way of coming back to what you had before (which was "nothing", because that choice is not there anymore in the drop down). Until we find a better solution, when you have an select1 appearance="minimal" which can be empty, add a first item with: <xf:item> <xf:label>--Make a selection--</xf:label> <xf:value/> </xf:item> Alex On 1/15/07, Edgard Pineda <[hidden email]> wrote: > Hello OF developers, > > I'm testing xf:select1 with OPS 3.5 M1, and I find a non-consistent > behavior between the differents appearance values, specifically with > appearance="minimal". Check it with the following example: > > <?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:my="http://www.example.com/my"> > <head> > <xf:model> > <xf:instance id="first"> > <my:root><my:data>some text</my:data></my:root> > </xf:instance> > <xf:submission id="submit" > action="http://xformstest.org/cgi-bin/echo.sh" method="post"/> > </xf:model> > </head> > <body> > Form: > <xf:group ref="instance('first')"> > <p>root/data="<xf:output value="my:data"/>"</p> > <xf:input ref="my:data"/> > <xf:select1 id="sel1" ref="my:data" appearance="minimal"> > <xf:item> > <xf:label>A</xf:label> > <xf:value>A</xf:value> > </xf:item> > <xf:item> > <xf:label>B</xf:label> > <xf:value>B</xf:value> > </xf:item> > <xf:item> > <xf:label>C</xf:label> > <xf:value>C</xf:value> > </xf:item> > </xf:select1> > <xf:select1 id="sel2" ref="my:data" appearance="compact"> > <xf:item> > <xf:label>O</xf:label> > <xf:value>O</xf:value> > </xf:item> > <xf:item> > <xf:label>P</xf:label> > <xf:value>P</xf:value> > </xf:item> > <xf:item> > <xf:label>Q</xf:label> > <xf:value>Q</xf:value> > </xf:item> > </xf:select1> > <xf:select1 id="sel3" ref="my:data" appearance="full"> > <xf:item> > <xf:label>X</xf:label> > <xf:value>X</xf:value> > </xf:item> > <xf:item> > <xf:label>Y</xf:label> > <xf:value>Y</xf:value> > </xf:item> > <xf:item> > <xf:label>Z</xf:label> > <xf:value>Z</xf:value> > </xf:item> > </xf:select1> > </xf:group> > </body> > </html> > > You can see the problem with the first select1 control: the value "A" > appears selected! and the other two are ok. The select1 with > appearance="minimal" should appear visually empty. > (Take this same example and run it with Mozilla XForms 0.7 in Firefox, > If you don't understand my explanation) > Test it again putting some other value of the other two select1 > controls: the first select1 would not have to show a selected value! > > Edgard. > > > > > -- > 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 > > > -- 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 |