Check box group question

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

Check box group question

Ozakca, Muzaffer

Hi, I’m trying to achieve the following in my form:

 

Ex. 1:

Checkboxes                 XML

 

_  Choice 1                   <a>

X Choice 2               =>   <b>Choice 2</b>

_  Choice 3                   </a>

 

 

Ex. 2:

_  Choice 1                   <a>

X Choice 2               =>   <b>Choice 2</b>

X Choice 3                      <b>Choice 3</b>

                                    </a>

 

So, each check box with have a separate node in the resulting XML. Similarly, when the form is loaded, checkboxes will be selected if there are nodes corresponding to them. I’m planning to look at event processing to achieve this but I thought maybe somebody already tackled it and there is an easy way to do it. Any help with be appreciated.

 

Thanks,

Muzaffer



--
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: Check box group question

Frank Feng
You just need to set the default value in your model, then the corresponding (e.g. Choice 2 for Ex1, and Choice 2/Choice 3 for Ex 2 will be checked automatically).
 
Frank
 
 

---------------------------------
Dr. Yankui(Frank) Feng
Digital Library Systems Developer
The University of York
Heslington, York, YO10 5DD, UK
Tel: +44 (0) 1904-434507
Email: yf508 at york.ac.uk
---------------------------------

 


From: Ozakca, Muzaffer [mailto:[hidden email]]
Sent: 15 October 2008 22:19
To: [hidden email]
Subject: [ops-users] Check box group question

Hi, I’m trying to achieve the following in my form:

 

Ex. 1:

Checkboxes                 XML

 

_  Choice 1                   <a>

X Choice 2               =>   <b>Choice 2</b>

_  Choice 3                   </a>

 

 

Ex. 2:

_  Choice 1                   <a>

X Choice 2               =>   <b>Choice 2</b>

X Choice 3                      <b>Choice 3</b>

                                    </a>

 

So, each check box with have a separate node in the resulting XML. Similarly, when the form is loaded, checkboxes will be selected if there are nodes corresponding to them. I’m planning to look at event processing to achieve this but I thought maybe somebody already tackled it and there is an easy way to do it. Any help with be appreciated.

 

Thanks,

Muzaffer



--
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: RE: Check box group question

Ozakca, Muzaffer

Hi, thanks for the answer. I am also wondering how to specify that in the form spec so each checkbox will correspond to a new node in the resulting XML. Similar to repeat fields. A simple spec like this:

 

<xforms:select appearance="full" ref="a/b">

            <xforms:label class="field-label">Choices</xforms:label>
           
<xforms:itemset nodeset="instance(‘c’)/choices">
                       
<xforms:label ref="."></xforms:label>
                       
<xforms:value ref="."></xforms:value>
           
</xforms:itemset>
</xforms:select>

Generates XML like this:

 

_  Choice 1                   <a>

X Choice 2               =>   <b>Choice 2 Choice 3</b>

X Choice 3                    </a>

 

Instead of this:

 

_  Choice 1                   <a>

X Choice 2               =>   <b>Choice 2</b>

X Choice 3                      <b>Choice 3</b>

                                    </a>

 

Thanks,

Muzaffer

 

From: yf508 [mailto:[hidden email]]
Sent: Thursday, October 16, 2008 4:40 AM
To: [hidden email]
Subject: [ops-users] RE: Check box group question

 

You just need to set the default value in your model, then the corresponding (e.g. Choice 2 for Ex1, and Choice 2/Choice 3 for Ex 2 will be checked automatically).

 

Frank

 

 

---------------------------------
Dr. Yankui(Frank) Feng
Digital Library Systems Developer
The University of York
Heslington, York, YO10 5DD, UK
Tel: +44 (0) 1904-434507
Email: yf508 at york.ac.uk
---------------------------------

 

 


From: Ozakca, Muzaffer [mailto:[hidden email]]
Sent: 15 October 2008 22:19
To: [hidden email]
Subject: [ops-users] Check box group question

Hi, I’m trying to achieve the following in my form:

 

Ex. 1:

Checkboxes                 XML

 

_  Choice 1                   <a>

X Choice 2               =>   <b>Choice 2</b>

_  Choice 3                   </a>

 

 

Ex. 2:

_  Choice 1                   <a>

X Choice 2               =>   <b>Choice 2</b>

X Choice 3                      <b>Choice 3</b>

                                    </a>

 

So, each check box with have a separate node in the resulting XML. Similarly, when the form is loaded, checkboxes will be selected if there are nodes corresponding to them. I’m planning to look at event processing to achieve this but I thought maybe somebody already tackled it and there is an easy way to do it. Any help with be appreciated.

 

Thanks,

Muzaffer



--
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: RE: RE: Check box group question

Frank Feng
Personally, I don't think you can do this directly in xforms as the xform interface is the reflection of its model (I might be wrong as I'm not Xforms expert. ) . What you want just makes model mismatching with its apperance. Probably you can add some post-processing magic either in server side after submitting or in client side by using functions/events in xpath.
 
Frank
 
 


From: Ozakca, Muzaffer [mailto:[hidden email]]
Sent: 16 October 2008 15:22
To: [hidden email]
Subject: [ops-users] RE: RE: Check box group question

Hi, thanks for the answer. I am also wondering how to specify that in the form spec so each checkbox will correspond to a new node in the resulting XML. Similar to repeat fields. A simple spec like this:

 

<xforms:select appearance="full" ref="a/b">

            <xforms:label class="field-label">Choices</xforms:label>
           
<xforms:itemset nodeset="instance(‘c’)/choices">
                       
<xforms:label ref="."></xforms:label>
                       
<xforms:value ref="."></xforms:value>
           
</xforms:itemset>
</xforms:select>

Generates XML like this:

 

_  Choice 1                   <a>

X Choice 2               =>   <b>Choice 2 Choice 3</b>

X Choice 3                    </a>

 

Instead of this:

 

_  Choice 1                   <a>

X Choice 2               =>   <b>Choice 2</b>

X Choice 3                      <b>Choice 3</b>

                                    </a>

 

Thanks,

Muzaffer

 

From: yf508 [mailto:[hidden email]]
Sent: Thursday, October 16, 2008 4:40 AM
To: [hidden email]
Subject: [ops-users] RE: Check box group question

 

You just need to set the default value in your model, then the corresponding (e.g. Choice 2 for Ex1, and Choice 2/Choice 3 for Ex 2 will be checked automatically).

 

Frank

 

 

---------------------------------
Dr. Yankui(Frank) Feng
Digital Library Systems Developer
The University of York
Heslington, York, YO10 5DD, UK
Tel: +44 (0) 1904-434507
Email: yf508 at york.ac.uk
---------------------------------

 

 


From: Ozakca, Muzaffer [mailto:[hidden email]]
Sent: 15 October 2008 22:19
To: [hidden email]
Subject: [ops-users] Check box group question

Hi, I’m trying to achieve the following in my form:

 

Ex. 1:

Checkboxes                 XML

 

_  Choice 1                   <a>

X Choice 2               =>   <b>Choice 2</b>

_  Choice 3                   </a>

 

 

Ex. 2:

_  Choice 1                   <a>

X Choice 2               =>   <b>Choice 2</b>

X Choice 3                      <b>Choice 3</b>

                                    </a>

 

So, each check box with have a separate node in the resulting XML. Similarly, when the form is loaded, checkboxes will be selected if there are nodes corresponding to them. I’m planning to look at event processing to achieve this but I thought maybe somebody already tackled it and there is an easy way to do it. Any help with be appreciated.

 

Thanks,

Muzaffer



--
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: RE: RE: RE: Check box group question

Ozakca, Muzaffer

Thanks, there is one method I found in Xforms Essentials (described under Complex lists) but I couldn’t get it to work. I’m getting this error message:

 

xforms:itemset element must contain one xforms:value or one xforms:copy element.

 

There is only one xforms:copy in the select element so I’m not sure what the real issue is. I will also try a event based approach. Any ideas will be appreciated. I’m using nightly from 10/15.

 

Thanks,

Muzaffer

 

From: yf508 [mailto:[hidden email]]
Sent: Thursday, October 16, 2008 10:37 AM
To: [hidden email]
Subject: [ops-users] RE: RE: RE: Check box group question

 

Personally, I don't think you can do this directly in xforms as the xform interface is the reflection of its model (I might be wrong as I'm not Xforms expert. ) . What you want just makes model mismatching with its apperance. Probably you can add some post-processing magic either in server side after submitting or in client side by using functions/events in xpath.

 

Frank

 

 

 


From: Ozakca, Muzaffer [mailto:[hidden email]]
Sent: 16 October 2008 15:22
To: [hidden email]
Subject: [ops-users] RE: RE: Check box group question

Hi, thanks for the answer. I am also wondering how to specify that in the form spec so each checkbox will correspond to a new node in the resulting XML. Similar to repeat fields. A simple spec like this:

 

<xforms:select appearance="full" ref="a/b">

            <xforms:label class="field-label">Choices</xforms:label>
           
<xforms:itemset nodeset="instance(‘c’)/choices">
                       
<xforms:label ref="."></xforms:label>
                       
<xforms:value ref="."></xforms:value>
           
</xforms:itemset>
</xforms:select>

Generates XML like this:

 

_  Choice 1                   <a>

X Choice 2               =>   <b>Choice 2 Choice 3</b>

X Choice 3                    </a>

 

Instead of this:

 

_  Choice 1                   <a>

X Choice 2               =>   <b>Choice 2</b>

X Choice 3                      <b>Choice 3</b>

                                    </a>

 

Thanks,

Muzaffer

 

From: yf508 [mailto:[hidden email]]
Sent: Thursday, October 16, 2008 4:40 AM
To: [hidden email]
Subject: [ops-users] RE: Check box group question

 

You just need to set the default value in your model, then the corresponding (e.g. Choice 2 for Ex1, and Choice 2/Choice 3 for Ex 2 will be checked automatically).

 

Frank

 

 

---------------------------------
Dr. Yankui(Frank) Feng
Digital Library Systems Developer
The University of York
Heslington, York, YO10 5DD, UK
Tel: +44 (0) 1904-434507
Email: yf508 at york.ac.uk
---------------------------------

 

 


From: Ozakca, Muzaffer [mailto:[hidden email]]
Sent: 15 October 2008 22:19
To: [hidden email]
Subject: [ops-users] Check box group question

Hi, I’m trying to achieve the following in my form:

 

Ex. 1:

Checkboxes                 XML

 

_  Choice 1                   <a>

X Choice 2               =>   <b>Choice 2</b>

_  Choice 3                   </a>

 

 

Ex. 2:

_  Choice 1                   <a>

X Choice 2               =>   <b>Choice 2</b>

X Choice 3                      <b>Choice 3</b>

                                    </a>

 

So, each check box with have a separate node in the resulting XML. Similarly, when the form is loaded, checkboxes will be selected if there are nodes corresponding to them. I’m planning to look at event processing to achieve this but I thought maybe somebody already tackled it and there is an easy way to do it. Any help with be appreciated.

 

Thanks,

Muzaffer



--
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: RE: RE: RE: RE: Check box group question

Alessandro Vernet
Administrator
In reply to this post by Ozakca, Muzaffer
On Thu, Oct 16, 2008 at 8:56 AM, Ozakca, Muzaffer  
<[hidden email]> wrote:
> Thanks, there is one method I found in Xforms Essentials (described  
> under
> There is only one xforms:copy in the select element so I'm not sure  
> what the
> real issue is. I will also try a event based approach. Any ideas  
> will be
> appreciated. I'm using nightly from 10/15.

I think the issue you are hitting here is that <xforms:copy> is not  
supported at this point. A workaround would be to:

1) Bind the <xforms:select> to
<a>

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


--
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: Re: RE: RE: RE: RE: Check box group question

Ozakca, Muzaffer
Alex, it looks like your e-mail has somehow be truncated. The Nabble archives are not updated yet so I don't know if that's only me but would you care to forward your last e-mail to the list again?

Thanks,
Muzaffer

> -----Original Message-----
> From: Alessandro Vernet [mailto:[hidden email]]
> Sent: Thursday, October 16, 2008 2:38 PM
> To: [hidden email]
> Subject: [ops-users] Re: RE: RE: RE: RE: Check box group question
>
> On Thu, Oct 16, 2008 at 8:56 AM, Ozakca, Muzaffer <[hidden email]>
> wrote:
> > Thanks, there is one method I found in Xforms Essentials (described
> > under There is only one xforms:copy in the select element so I'm not
> > sure what the real issue is. I will also try a event based approach.
> > Any ideas will be appreciated. I'm using nightly from 10/15.
>
> I think the issue you are hitting here is that <xforms:copy> is not
> supported at this point. A workaround would be to:
>
> 1) Bind the <xforms:select> to
> <a>
>
> Alex
> --
> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's Blog:
> http://www.orbeon.com/blog/ Personal Blog: http://avernet.blogspot.com/
> Twitter - http://twitter.com/avernet


--
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: RE: RE: RE: RE: Check box group question

Alessandro Vernet
Administrator
In reply to this post by Ozakca, Muzaffer
On Thu, Oct 16, 2008 at 8:56 AM, Ozakca, Muzaffer <[hidden email]>
wrote:
> Thanks, there is one method I found in Xforms Essentials (described under
> There is only one xforms:copy in the select element so I'm not sure what the
> real issue is. I will also try a event based approach. Any ideas will be
> appreciated. I'm using nightly from 10/15.

I think the issue you are hitting here is that <xforms:copy> is not
supported yet. A workaround would be to:

1) Bind the <xforms:select> to some element somewhere that would contain
<c>Choice-2 Choice-3</c>. Note that dashes, to make sure that we don't
have spaces in the values.
2) On xforms-value-changed on the control, you remove the content of
your <a> where you want to have the multiple <b>, iterate of
itemize(/path/to/c, ' '), and insert <b> with the current value.

Yes, I know, this would be much simpler with <xforms:copy>, but on the
bright side this gives you a chance to get familiar with more
sophisticated actions and iterations :).

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


--
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: RE: Re: RE: RE: RE: RE: Check box group question

Alessandro Vernet
Administrator
In reply to this post by Ozakca, Muzaffer
On Thu, Oct 16, 2008 at 12:17 PM, Ozakca, Muzaffer <[hidden email]>
wrote:
> Alex, it looks like your e-mail has somehow be truncated. The Nabble archives are not updated yet so I don't know if that's only me but would you care to forward your last e-mail to the list again?

Sorry about that. I just sent it back again. Let me know if it doesn't
get through.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


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