Xforms:checkbox

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

Xforms:checkbox

reginald.liggins
I'm new to Xforms and have been trying to create some checkbox items, not as a select list, but just a plain boolean checkbox. Is this possible in Xforms? I've been searching everywhere and cannot find an example of what I'm trying to do. Here is a piece of my code (or at least a copy of my lastest attempt, I've tried numerous things):
 
<xforms:bind id="gr-cpy-addr-fm-pat" nodeset="/appl/grower/gr-cpy-addr-fm-pat" type="xsd:boolean"/>
    <xforms:bind id="gr-is-pat" nodeset="/appl/grower/gr-is-pat" type="xsd:boolean"/>
....
<xforms:input bind="gr-cpy-addr-fm-pat" type="checkbox">
       <xforms:label>Copy Patient Addr?</xforms:label>
</xforms:input>
<xforms:input bind="gr-is-pat" type="checkbox">
       <xforms:label>Grower is Patient?</xforms:label>
</xforms:input>
 
The output I'm looking for on the form is simply:
Copy Patient Addr?  [ ]
Grower is Patient  [X]
 
where checked is true and un-checked is false.
 
Thanks,
Reg
 
Reginald Liggins,
Senior Systems Analyst,
Oregon Department of Human Services
Office of Information Services, Applications Maintenance and Support
[hidden email]
phone: (971) 673-0123  


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

Re: Xforms:checkbox

Erik Bruchez
Administrator
Reg,

This is an easy one:

   <xforms:select appearance="full" ...>

XForms has this concept of "abstract" controls, which is why this is not
directly called a checkbox, but implementations are encouraged to
represent full xforms:select as checkboxes.

-Erik

Reginald LIGGINS wrote:

> I'm new to Xforms and have been trying to create some checkbox items,
> not as a select list, but just a plain boolean checkbox. Is this
> possible in Xforms? I've been searching everywhere and cannot find an
> example of what I'm trying to do. Here is a piece of my code (or at
> least a copy of my lastest attempt, I've tried numerous things):
>  
> <xforms:bind id="gr-cpy-addr-fm-pat"
> nodeset="/appl/grower/gr-cpy-addr-fm-pat" type="xsd:boolean"/>
>     <xforms:bind id="gr-is-pat" nodeset="/appl/grower/gr-is-pat"
> type="xsd:boolean"/>
> ....
> <xforms:input bind="gr-cpy-addr-fm-pat" type="checkbox">
>        <xforms:label>Copy Patient Addr?</xforms:label>
> </xforms:input>
> <xforms:input bind="gr-is-pat" type="checkbox">
>        <xforms:label>Grower is Patient?</xforms:label>
> </xforms:input>
>  
> The output I'm looking for on the form is simply:
> Copy Patient Addr?  [ ]
> Grower is Patient  [X]
>  
> where checked is true and un-checked is false.
>  
> Thanks,
> Reg
>  
> Reginald Liggins,
> Senior Systems Analyst,
> Oregon Department of Human Services
> Office of Information Services, Applications Maintenance and Support
> [hidden email] <mailto:[hidden email]>
> phone: (971) 673-0123  
>

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

Re: Xforms:checkbox

reginald.liggins
Many thanks, Erik. I will try this.
 
Reginald Liggins,
Senior Systems Analyst,
Oregon Department of Human Services
Office of Information Services, Applications Maintenance and Support
[hidden email]
phone: (971) 673-0123  


>>> "Erik Bruchez" <[hidden email]> 10/11/2007 4:28:48 PM >>>
Reg,

This is an easy one:

   <xforms:select appearance="full" ...>

XForms has this concept of "abstract" controls, which is why this is not
directly called a checkbox, but implementations are encouraged to
represent full xforms:select as checkboxes.

-Erik

Reginald LIGGINS wrote:

> I'm new to Xforms and have been trying to create some checkbox items,
> not as a select list, but just a plain boolean checkbox. Is this
> possible in Xforms? I've been searching everywhere and cannot find an
> example of what I'm trying to do. Here is a piece of my code (or at
> least a copy of my lastest attempt, I've tried numerous things):

> <xforms:bind id="gr-cpy-addr-fm-pat"
> nodeset="/appl/grower/gr-cpy-addr-fm-pat" type="xsd:boolean"/>
>     <xforms:bind id="gr-is-pat" nodeset="/appl/grower/gr-is-pat"
> type="xsd:boolean"/>
> ....
> <xforms:input bind="gr-cpy-addr-fm-pat" type="checkbox">
>        <xforms:label>Copy Patient Addr?</xforms:label>
> </xforms:input>
> <xforms:input bind="gr-is-pat" type="checkbox">
>        <xforms:label>Grower is Patient?</xforms:label>
> </xforms:input>

> The output I'm looking for on the form is simply:
> Copy Patient Addr?  [ ]
> Grower is Patient  [X]

> where checked is true and un-checked is false.

> Thanks,
> Reg

> Reginald Liggins,
> Senior Systems Analyst,
> Oregon Department of Human Services
> Office of Information Services, Applications Maintenance and Support
> [hidden email] <[hidden email]>
> phone: (971) 673-0123 
>


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

Re: Xforms:checkbox

reginald.liggins
In reply to this post by Erik Bruchez
Erik,
That didn't quite work for me. Of course, I'm probably doing something wrong. I was trying to avoid putting them all in one select or select1 control and just have three individual standalone checkboxes. Anyway, I have attached what I have so far.
With this code, all I get on my form is three labels, no checkbox, no textbox, ...nothing.
Any other suggestions?
 
Thanks,
Reg
 
Reginald Liggins,
Senior Systems Analyst,
Oregon Department of Human Services
Office of Information Services, Applications Maintenance and Support
[hidden email]
phone: (971) 673-0123  


>>> "Erik Bruchez" <[hidden email]> 10/11/2007 4:28:48 PM >>>
Reg,

This is an easy one:

   <xforms:select appearance="full" ...>

XForms has this concept of "abstract" controls, which is why this is not
directly called a checkbox, but implementations are encouraged to
represent full xforms:select as checkboxes.

-Erik

Reginald LIGGINS wrote:

> I'm new to Xforms and have been trying to create some checkbox items,
> not as a select list, but just a plain boolean checkbox. Is this
> possible in Xforms? I've been searching everywhere and cannot find an
> example of what I'm trying to do. Here is a piece of my code (or at
> least a copy of my lastest attempt, I've tried numerous things):

> <xforms:bind id="gr-cpy-addr-fm-pat"
> nodeset="/appl/grower/gr-cpy-addr-fm-pat" type="xsd:boolean"/>
>     <xforms:bind id="gr-is-pat" nodeset="/appl/grower/gr-is-pat"
> type="xsd:boolean"/>
> ....
> <xforms:input bind="gr-cpy-addr-fm-pat" type="checkbox">
>        <xforms:label>Copy Patient Addr?</xforms:label>
> </xforms:input>
> <xforms:input bind="gr-is-pat" type="checkbox">
>        <xforms:label>Grower is Patient?</xforms:label>
> </xforms:input>

> The output I'm looking for on the form is simply:
> Copy Patient Addr?  [ ]
> Grower is Patient  [X]

> where checked is true and un-checked is false.

> Thanks,
> Reg

> Reginald Liggins,
> Senior Systems Analyst,
> Oregon Department of Human Services
> Office of Information Services, Applications Maintenance and Support
> [hidden email] <[hidden email]>
> phone: (971) 673-0123 
>


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

checkbox.txt (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Xforms:checkbox

Erik Bruchez
Administrator
Reg,

There were several issues with your file:

* Unclosed xforms:model element
* XPath expressions not pointing to the right nodes
* Missing xforms:item for xforms:select elements

This said, I suggested using xforms:select, but since you want just
boolean values, you can also use xforms:input, which also takes the
appearance of a checkbox when bound to a boolean node.

I attach a version that should work better, showing the two
possibilities. Note that when using xforms:select and a single checkbox,
you will go between blank and "true", instead of "false" and "true", so
I think that the solution with xforms:input is better.

-Erik

Reginald LIGGINS wrote:

> Erik,
> That didn't quite work for me. Of course, I'm probably doing something
> wrong. I was trying to avoid putting them all in one select or select1
> control and just have three individual standalone checkboxes. Anyway, I
> have attached what I have so far.
> With this code, all I get on my form is three labels, no checkbox, no
> textbox, ...nothing.
> Any other suggestions?
>  
> Thanks,
> Reg
>  
> Reginald Liggins,
> Senior Systems Analyst,
> Oregon Department of Human Services
> Office of Information Services, Applications Maintenance and Support
> [hidden email] <mailto:[hidden email]>
> phone: (971) 673-0123  
>
>
>  >>> "Erik Bruchez" <[hidden email]> 10/11/2007 4:28:48 PM >>>
> Reg,
>
> This is an easy one:
>
>    <xforms:select appearance="full" ...>
>
> XForms has this concept of "abstract" controls, which is why this is not
> directly called a checkbox, but implementations are encouraged to
> represent full xforms:select as checkboxes.
>
> -Erik
>
> Reginald LIGGINS wrote:
>  > I'm new to Xforms and have been trying to create some checkbox items,
>  > not as a select list, but just a plain boolean checkbox. Is this
>  > possible in Xforms? I've been searching everywhere and cannot find an
>  > example of what I'm trying to do. Here is a piece of my code (or at
>  > least a copy of my lastest attempt, I've tried numerous things):
>  >
>  > <xforms:bind id="gr-cpy-addr-fm-pat"
>  > nodeset="/appl/grower/gr-cpy-addr-fm-pat" type="xsd:boolean"/>
>  >     <xforms:bind id="gr-is-pat" nodeset="/appl/grower/gr-is-pat"
>  > type="xsd:boolean"/>
>  > ....
>  > <xforms:input bind="gr-cpy-addr-fm-pat" type="checkbox">
>  >        <xforms:label>Copy Patient Addr?</xforms:label>
>  > </xforms:input>
>  > <xforms:input bind="gr-is-pat" type="checkbox">
>  >        <xforms:label>Grower is Patient?</xforms:label>
>  > </xforms:input>
>  >
>  > The output I'm looking for on the form is simply:
>  > Copy Patient Addr?  [ ]
>  > Grower is Patient  [X]
>  >
>  > where checked is true and un-checked is false.
>  >
>  > Thanks,
>  > Reg
>  >
>  > Reginald Liggins,
>  > Senior Systems Analyst,
>  > Oregon Department of Human Services
>  > Office of Information Services, Applications Maintenance and Support
>  > [hidden email] <mailto:[hidden email]>
>  > phone: (971) 673-0123
>  >
>
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> http://www.orbeon.com/
>

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

checkboxes.xhtml (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Xforms:checkbox

reginald.liggins
Erik, thank you. I've been gone for two weeks and am just getting back, will try to incorporate your changes here in a bit. Thanks again.
 
Reg
 
Reginald Liggins,
Senior Systems Analyst,
Oregon Department of Human Services
Office of Information Services, Applications Maintenance and Support
[hidden email]
phone: (971) 673-0123  


>>> "Erik Bruchez" <[hidden email]> 10/16/2007 11:13 AM >>>
Reg,

There were several issues with your file:

* Unclosed xforms:model element
* XPath expressions not pointing to the right nodes
* Missing xforms:item for xforms:select elements

This said, I suggested using xforms:select, but since you want just
boolean values, you can also use xforms:input, which also takes the
appearance of a checkbox when bound to a boolean node.

I attach a version that should work better, showing the two
possibilities. Note that when using xforms:select and a single checkbox,
you will go between blank and "true", instead of "false" and "true", so
I think that the solution with xforms:input is better.

-Erik

Reginald LIGGINS wrote:

> Erik,
> That didn't quite work for me. Of course, I'm probably doing something
> wrong. I was trying to avoid putting them all in one select or select1
> control and just have three individual standalone checkboxes. Anyway, I
> have attached what I have so far.
> With this code, all I get on my form is three labels, no checkbox, no
> textbox, ...nothing.
> Any other suggestions?

> Thanks,
> Reg

> Reginald Liggins,
> Senior Systems Analyst,
> Oregon Department of Human Services
> Office of Information Services, Applications Maintenance and Support
> [hidden email] <[hidden email]>
> phone: (971) 673-0123 
>
>
>  >>> "Erik Bruchez" <[hidden email]> 10/11/2007 4:28:48 PM >>>
> Reg,
>
> This is an easy one:
>
>    <xforms:select appearance="full" ...>
>
> XForms has this concept of "abstract" controls, which is why this is not
> directly called a checkbox, but implementations are encouraged to
> represent full xforms:select as checkboxes.
>
> -Erik
>
> Reginald LIGGINS wrote:
>  > I'm new to Xforms and have been trying to create some checkbox items,
>  > not as a select list, but just a plain boolean checkbox. Is this
>  > possible in Xforms? I've been searching everywhere and cannot find an
>  > example of what I'm trying to do. Here is a piece of my code (or at
>  > least a copy of my lastest attempt, I've tried numerous things):
>  >
>  > <xforms:bind id="gr-cpy-addr-fm-pat"
>  > nodeset="/appl/grower/gr-cpy-addr-fm-pat" type="xsd:boolean"/>
>  >     <xforms:bind id="gr-is-pat" nodeset="/appl/grower/gr-is-pat"
>  > type="xsd:boolean"/>
>  > ....
>  > <xforms:input bind="gr-cpy-addr-fm-pat" type="checkbox">
>  >        <xforms:label>Copy Patient Addr?</xforms:label>
>  > </xforms:input>
>  > <xforms:input bind="gr-is-pat" type="checkbox">
>  >        <xforms:label>Grower is Patient?</xforms:label>
>  > </xforms:input>
>  >
>  > The output I'm looking for on the form is simply:
>  > Copy Patient Addr?  [ ]
>  > Grower is Patient  [X]
>  >
>  > where checked is true and un-checked is false.
>  >
>  > Thanks,
>  > Reg
>  >
>  > Reginald Liggins,
>  > Senior Systems Analyst,
>  > Oregon Department of Human Services
>  > Office of Information Services, Applications Maintenance and Support
>  > [hidden email] <[hidden email]>
>  > phone: (971) 673-0123
>  >
>
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> http://www.orbeon.com/
>


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