problem with select1

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

problem with select1

Alexander Žaťko
I am using classic XForms engine with OPS 3b2

Is adding  xhtml:name="selector" attribute into select1 element as
shown below illegal?

                     <xforms:select appearance="full" ref="@selected"
xhtml:name="selector">
                         <xforms:choices>
                             <xforms:item>
                                 <xforms:label/>
                                 <xforms:value>1</xforms:value>
                             </xforms:item>
                         </xforms:choices>
                     </xforms:select>


...because if I have it there, the XForms engine always returns 0 as a
value regardless of if I check or uncheck the checkbox. When I remove
the  xhtml:name="selector" attribute the value "1" is passed ok when
the checkbox is checked.

A.




--
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
Reply | Threaded
Open this post in threaded view
|

Re: problem with select1

Erik Bruchez
Administrator
Alexander Zatko wrote:

> I am using classic XForms engine with OPS 3b2
>
> Is adding  xhtml:name="selector" attribute into select1 element as shown
> below illegal?
>
>                     <xforms:select appearance="full" ref="@selected"
> xhtml:name="selector">
>                         <xforms:choices>
>                             <xforms:item>
>                                 <xforms:label/>
>                                 <xforms:value>1</xforms:value>
>                             </xforms:item>
>                         </xforms:choices>
>                     </xforms:select>
>
>
> ...because if I have it there, the XForms engine always returns 0 as a
> value regardless of if I check or uncheck the checkbox. When I remove
> the  xhtml:name="selector" attribute the value "1" is passed ok when the
> checkbox is checked.
This is explained because OPS already sets a name on the resulting HTML
element. If you set your own name, OPS cannot identify the resulting
control anymore, so the value is lost. The bottom line is that you
should not try to set an xhtml:name on XForms elements. If you need a
name, try to use the name generated by OPS.

-Erik



--
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