Hi All,
Anybody know how to render a single checkbox bound to a xs:boolean attribute/element? I just want the checkbox to directly control the true/false value of the xs:boolean attribute/element. I've looked through all the examples and can't find any example that does this. I was expecting to do something like <xforms:input ref='@my_boolean_field'/> where @my_boolean_field is bound to an xs:boolean type. I was expecting that it would render a checkbox, but instead it rendered just a plain text field. For xs:date the OPS engine automatically creates a calendar control for it, so I was expecting similar behavior. Larry T. Chen 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 |
Try using a xforms:select with a single unlabelled option together with
a bind that calculates the field to be false() if it's empty. A bit of
a hack but it works.
Rendering a single checkbox for boolean input isn't always desireable (some people want two radio buttons labelled Yes/No, some people want to be able to represent an optional boolean which can be left blank, which you can't do with a single checkbox). But perhaps OPS could have some sensible defaults which can be controlled with the @appearance attribute. Adrian Larry T. Chen wrote: Hi All, -- 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 |
Thanks for that tip Adrian. A <xforms:select> with a single
<xforms:item> worked.
Larry T. Chen Software Engineer Intelenet Communications, Inc. Adrian Baker wrote: Try using a xforms:select with a single unlabelled option together with a bind that calculates the field to be false() if it's empty. A bit of a hack but it works. -- 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 |