How can I make checkbox checked according to data from database,

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

How can I make checkbox checked according to data from database,

Zhou, Kevin
How can I make checkbox checked according to data from database,

Hi all ops gurus ,
Could you help me to resolve this issues because I am a newer on OPS, I don't know how to make checkbox is checked accoring value from database when I am make a search and get a result.

Thanks ahead .




Kevin Cheng




This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.



--
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: How can I make checkbox checked according to data from database,

Adrian Baker-2
This is a pretty general question - are you having problems getting data from a sql query into an xml instance document? Or are you having problems connecting a checkbox on a form to some data within an xml instance?

Adrian

Zhou, Kevin wrote:
How can I make checkbox checked according to data from database,

Hi all ops gurus ,
Could you help me to resolve this issues because I am a newer on OPS, I don't know how to make checkbox is checked accoring value from database when I am make a search and get a result.

Thanks ahead .




Kevin Cheng





--
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: How can I make checkbox checked according to data from database,

Zhou, Kevin
In reply to this post by Zhou, Kevin
hi Adrian
 
My problem is when I get the data from the database ,for instance there is a column named request_ind, if this value is 0 which I get it from database without problems ,that means the checkbox should be unchecked in my page ,otherwise it should be checked ,So I don't know to make it work well . Currently it always  is unchecked ,That 's problem.
 
thanks very much for your attention ,and could you help me to achieve.
 
cheers
 
kevin


From: Adrian Baker [mailto:[hidden email]]
Sent: 25 July 2006 23:34
To: [hidden email]
Subject: Re: [ops-users] How can I make checkbox checked according to data from database,

This is a pretty general question - are you having problems getting data from a sql query into an xml instance document? Or are you having problems connecting a checkbox on a form to some data within an xml instance?

Adrian

Zhou, Kevin wrote:


Hi all ops gurus ,
Could you help me to resolve this issues because I am a newer on OPS, I don't know how to make checkbox is checked accoring value from database when I am make a search and get a result.

Thanks ahead .




Kevin Cheng





This message has been scanned for viruses by MailControl



This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.



--
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: How can I make checkbox checked according to data from database,

Adrian Baker
In reply to this post by Zhou, Kevin
I still can't quite see the specific problem you're having - maybe it would be best to look at one of the example forms on the OPS site which include a checkbox.
 
Adrian


From: Zhou, Kevin [mailto:[hidden email]]
Sent: Thu 27/07/2006 1:04 a.m.
To: [hidden email]
Subject: RE: [ops-users] How can I make checkbox checked according to data from database,

hi Adrian
 
My problem is when I get the data from the database ,for instance there is a column named request_ind, if this value is 0 which I get it from database without problems ,that means the checkbox should be unchecked in my page ,otherwise it should be checked ,So I don't know to make it work well . Currently it always  is unchecked ,That 's problem.
 
thanks very much for your attention ,and could you help me to achieve.
 
cheers
 
kevin


From: Adrian Baker [mailto:[hidden email]]
Sent: 25 July 2006 23:34
To: [hidden email]
Subject: Re: [ops-users] How can I make checkbox checked according to data from database,

This is a pretty general question - are you having problems getting data from a sql query into an xml instance document? Or are you having problems connecting a checkbox on a form to some data within an xml instance?

Adrian

Zhou, Kevin wrote:


Hi all ops gurus ,
Could you help me to resolve this issues because I am a newer on OPS, I don't know how to make checkbox is checked accoring value from database when I am make a search and get a result.

Thanks ahead .




Kevin Cheng





This message has been scanned for viruses by MailControl



This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.



--
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: How can I make checkbox checked according to data from database,

Alessandro  Vernet
Administrator
In reply to this post by Zhou, Kevin
Hi Kevin,

What value would you like to have in the instance when the user
deselects the checkbox? If you fine if this value becomes empty, then
the attached example will do the trick. You can run that example in
the sandbox. The <xforms:select> in that example looks like:

<xforms:select appearance="full" ref="/instance">
    <xforms:item>
        <xforms:label>True</xforms:label>
        <xforms:value>1</xforms:value>
    </xforms:item>
</xforms:select>

Alex

On 7/26/06, Zhou, Kevin <[hidden email]> wrote:

>
>
> hi Adrian
>
> My problem is when I get the data from the database ,for instance there is a
> column named request_ind, if this value is 0 which I get it from database
> without problems ,that means the checkbox should be unchecked in my page
> ,otherwise it should be checked ,So I don't know to make it work well .
> Currently it always  is unchecked ,That 's problem.
>
> thanks very much for your attention ,and could you help me to achieve.
>
> cheers
>
> kevin
>
>  ________________________________
>  From: Adrian Baker [mailto:[hidden email]]
> Sent: 25 July 2006 23:34
> To: [hidden email]
> Subject: Re: [ops-users] How can I make checkbox checked according to data
> from database,
>
>
> This is a pretty general question - are you having problems getting data
> from a sql query into an xml instance document? Or are you having problems
> connecting a checkbox on a form to some data within an xml instance?
>
> Adrian
>
> Zhou, Kevin wrote:
>
>
>
>
> Hi all ops gurus ,
> Could you help me to resolve this issues because I am a newer on OPS, I
> don't know how to make checkbox is checked accoring value from database when
> I am make a search and get a result.
>
> Thanks ahead .
>
>
>
>
> Kevin Cheng
>
>
>
>
>
> This message has been scanned for viruses by MailControl
>
>
>
>
> This email and any attached files are confidential and copyright protected.
> If you are not the addressee, any dissemination of this communication is
> strictly prohibited. Unless otherwise expressly agreed in writing, nothing
> stated in this communication shall be legally binding.
>
>
> --
> 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
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/


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

exclusive-checkboxes.xhtml (2K) Download Attachment
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

RE: How can I make checkbox checked according to data from database,

Zhou, Kevin
In reply to this post by Zhou, Kevin
Hi  Alex

Yes, good tips for me, I will try first.
Thank you very much.

Cheers

kevin

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Alessandro Vernet
Sent: 28 July 2006 00:47
To: [hidden email]
Subject: Re: [ops-users] How can I make checkbox checked according to
data from database,

Hi Kevin,

What value would you like to have in the instance when the user
deselects the checkbox? If you fine if this value becomes empty, then
the attached example will do the trick. You can run that example in the
sandbox. The <xforms:select> in that example looks like:

<xforms:select appearance="full" ref="/instance">
    <xforms:item>
        <xforms:label>True</xforms:label>
        <xforms:value>1</xforms:value>
    </xforms:item>
</xforms:select>

Alex

On 7/26/06, Zhou, Kevin <[hidden email]> wrote:
>
>
> hi Adrian
>
> My problem is when I get the data from the database ,for instance
> there is a column named request_ind, if this value is 0 which I get it

> from database without problems ,that means the checkbox should be
> unchecked in my page ,otherwise it should be checked ,So I don't know
to make it work well .

> Currently it always  is unchecked ,That 's problem.
>
> thanks very much for your attention ,and could you help me to achieve.
>
> cheers
>
> kevin
>
>  ________________________________
>  From: Adrian Baker [mailto:[hidden email]]
> Sent: 25 July 2006 23:34
> To: [hidden email]
> Subject: Re: [ops-users] How can I make checkbox checked according to
> data from database,
>
>
> This is a pretty general question - are you having problems getting
> data from a sql query into an xml instance document? Or are you having

> problems connecting a checkbox on a form to some data within an xml
instance?

>
> Adrian
>
> Zhou, Kevin wrote:
>
>
>
>
> Hi all ops gurus ,
> Could you help me to resolve this issues because I am a newer on OPS,
> I don't know how to make checkbox is checked accoring value from
> database when I am make a search and get a result.
>
> Thanks ahead .
>
>
>
>
> Kevin Cheng
>
>
>
>
>
> This message has been scanned for viruses by MailControl
>
>
>
>
> This email and any attached files are confidential and copyright
protected.

> If you are not the addressee, any dissemination of this communication
> is strictly prohibited. Unless otherwise expressly agreed in writing,
> nothing stated in this communication shall be legally binding.
>
>
> --
> 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
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
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: How can I make checkbox checked according to data from database,

Zhou, Kevin
In reply to this post by Zhou, Kevin
 hi Alex

I try it, and now it is working well. Geate thanks to you.
By the way, could you tell me if I could make a checkbox controler
readonly? Thanks ahead.

Cheers

Kevin.

-----Original Message-----
From: Zhou, Kevin [mailto:[hidden email]]
Sent: 28 July 2006 12:16
To: [hidden email]
Subject: RE: [ops-users] How can I make checkbox checked according to
data from database,

Hi  Alex

Yes, good tips for me, I will try first.
Thank you very much.

Cheers

kevin

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Alessandro Vernet
Sent: 28 July 2006 00:47
To: [hidden email]
Subject: Re: [ops-users] How can I make checkbox checked according to
data from database,

Hi Kevin,

What value would you like to have in the instance when the user
deselects the checkbox? If you fine if this value becomes empty, then
the attached example will do the trick. You can run that example in the
sandbox. The <xforms:select> in that example looks like:

<xforms:select appearance="full" ref="/instance">
    <xforms:item>
        <xforms:label>True</xforms:label>
        <xforms:value>1</xforms:value>
    </xforms:item>
</xforms:select>

Alex

On 7/26/06, Zhou, Kevin <[hidden email]> wrote:
>
>
> hi Adrian
>
> My problem is when I get the data from the database ,for instance
> there is a column named request_ind, if this value is 0 which I get it

> from database without problems ,that means the checkbox should be
> unchecked in my page ,otherwise it should be checked ,So I don't know
to make it work well .

> Currently it always  is unchecked ,That 's problem.
>
> thanks very much for your attention ,and could you help me to achieve.
>
> cheers
>
> kevin
>
>  ________________________________
>  From: Adrian Baker [mailto:[hidden email]]
> Sent: 25 July 2006 23:34
> To: [hidden email]
> Subject: Re: [ops-users] How can I make checkbox checked according to
> data from database,
>
>
> This is a pretty general question - are you having problems getting
> data from a sql query into an xml instance document? Or are you having

> problems connecting a checkbox on a form to some data within an xml
instance?

>
> Adrian
>
> Zhou, Kevin wrote:
>
>
>
>
> Hi all ops gurus ,
> Could you help me to resolve this issues because I am a newer on OPS,
> I don't know how to make checkbox is checked accoring value from
> database when I am make a search and get a result.
>
> Thanks ahead .
>
>
>
>
> Kevin Cheng
>
>
>
>
>
> This message has been scanned for viruses by MailControl
>
>
>
>
> This email and any attached files are confidential and copyright
protected.

> If you are not the addressee, any dissemination of this communication
> is strictly prohibited. Unless otherwise expressly agreed in writing,
> nothing stated in this communication shall be legally binding.
>
>
> --
> 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
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/




--
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: RE: How can I make checkbox checked according to data from database,

Alessandro  Vernet
Administrator
Hi Kevin,

You can do this by adding in <xforms:model>:

<xforms:bind nodeset="/instance" readonly="true()"/>

'nodeset' is the same XPath expression that you have in the 'ref' of
your <xforms:select>, and it points to the node in the instance that
contains the value for that checkbox.

Alex

On 7/28/06, Zhou, Kevin <[hidden email]> wrote:

>  hi Alex
>
> I try it, and now it is working well. Geate thanks to you.
> By the way, could you tell me if I could make a checkbox controler
> readonly? Thanks ahead.
>
> Cheers
>
> Kevin.
>
> -----Original Message-----
> From: Zhou, Kevin [mailto:[hidden email]]
> Sent: 28 July 2006 12:16
> To: [hidden email]
> Subject: RE: [ops-users] How can I make checkbox checked according to
> data from database,
>
> Hi  Alex
>
> Yes, good tips for me, I will try first.
> Thank you very much.
>
> Cheers
>
> kevin
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of
> Alessandro Vernet
> Sent: 28 July 2006 00:47
> To: [hidden email]
> Subject: Re: [ops-users] How can I make checkbox checked according to
> data from database,
>
> Hi Kevin,
>
> What value would you like to have in the instance when the user
> deselects the checkbox? If you fine if this value becomes empty, then
> the attached example will do the trick. You can run that example in the
> sandbox. The <xforms:select> in that example looks like:
>
> <xforms:select appearance="full" ref="/instance">
>     <xforms:item>
>         <xforms:label>True</xforms:label>
>         <xforms:value>1</xforms:value>
>     </xforms:item>
> </xforms:select>
>
> Alex
>
> On 7/26/06, Zhou, Kevin <[hidden email]> wrote:
> >
> >
> > hi Adrian
> >
> > My problem is when I get the data from the database ,for instance
> > there is a column named request_ind, if this value is 0 which I get it
>
> > from database without problems ,that means the checkbox should be
> > unchecked in my page ,otherwise it should be checked ,So I don't know
> to make it work well .
> > Currently it always  is unchecked ,That 's problem.
> >
> > thanks very much for your attention ,and could you help me to achieve.
> >
> > cheers
> >
> > kevin
> >
> >  ________________________________
> >  From: Adrian Baker [mailto:[hidden email]]
> > Sent: 25 July 2006 23:34
> > To: [hidden email]
> > Subject: Re: [ops-users] How can I make checkbox checked according to
> > data from database,
> >
> >
> > This is a pretty general question - are you having problems getting
> > data from a sql query into an xml instance document? Or are you having
>
> > problems connecting a checkbox on a form to some data within an xml
> instance?
> >
> > Adrian
> >
> > Zhou, Kevin wrote:
> >
> >
> >
> >
> > Hi all ops gurus ,
> > Could you help me to resolve this issues because I am a newer on OPS,
> > I don't know how to make checkbox is checked accoring value from
> > database when I am make a search and get a result.
> >
> > Thanks ahead .
> >
> >
> >
> >
> > Kevin Cheng
> >
> >
> >
> >
> >
> > This message has been scanned for viruses by MailControl
> >
> >
> >
> >
> > This email and any attached files are confidential and copyright
> protected.
> > If you are not the addressee, any dissemination of this communication
> > is strictly prohibited. Unless otherwise expressly agreed in writing,
> > nothing stated in this communication shall be legally binding.
> >
> >
> > --
> > 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
> >
> >
> >
>
>
> --
> Blog (XML, Web apps, Open Source):
> http://www.orbeon.com/blog/
>
>
>
>
>
> --
> 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
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet