You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Darren McEntee <da...@amt-sybex.com> on 2007/08/07 16:25:03 UTC

[Trinidad] selectOneChoice - changing other component properties

Hi, I am using a trinidad tr:selectOneChoice component on one of my
pages, and I also have other input components below this on the same
page. The selectOneChoice contains two values.

 

What I want to do is when I select either one of the selectOneChoice
drop down values, it would then enable/disable the other components on
the page.

 

Is this possible, as I'm not sure how to go about it.

Thanks,

Darren.
 
P Please consider the environment before printing this email
_________________________________________________________ 
 
1. The information contained in this E-mail, including any files transmitted with it, is confidential and may be legally privileged. This E-mail is intended only for the personal attention of the stated addressee(s). Any access to this E-mail, including any files transmitted with it, by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this E-mail or any files transmitted with it. Such unauthorised use may be unlawful. If you have received this E-mail in error, please inform the sender immediately and delete it and all copies from your system. You may not forward this E-mail without the permission of the sender.
 
2. The views expressed in this E-mail are those of the author, and do not necessarily represent the views of AMT-SYBEX. Internet communications are not secure and AMT-SYBEX cannot, therefore, accept legal responsibility for the contents of this message nor for any damage caused by viruses.
 
AMT-SYBEX Limited is a UK company, registration number GB03036807 at address The Spirella Building, Bridge Road, Letchworth, SG6 4ET. 
AMT-SYBEX (NI) Limited is a UK company, registration number NI024104 at address Edgewater Office Park, Edgewater Rd, Belfast, BT3 9JQ.
For more information on the AMT-SYBEX Group visit http://www.amt-sybex.com
_________________________________________________________

RE: Preventing "Select All" and "Select None" links from being rendered by the TableSelectMany tag

Posted by "Yee, Richard K CTR DMDC" <Ri...@osd.pentagon.mil>.
 In these previous emails, "selectOne" and  "selectMany" should have
been "tableSelectOne" and "tableSelectMany"

-Richard


-----Original Message-----
From: Richard Yee [mailto:ryee@cruzio.com] 
Sent: Wednesday, August 08, 2007 5:33 AM
To: MyFaces Discussion
Subject: Re: Preventing "Select All" and "Select None" links from being
rendered by the selectMany tag

By the way, I have tried to use the selectOne tag instead of selectMany
to get around this problem but I then have the problem that I cannot
unselect a radio button once a row is selected. It seems that once a row
is selected with by clicking on the radio button, clicking on that
button again does not send a request to the server so I cannot receive
that event.

Thanks for any help in advance,

Richard

Richard Yee wrote:
> Does anyone know if there is a way to prevent the "Select All" and 
> "Select None" links from being displayed at the top of a table 
> containing a selectMany tag? The reason I need this is that some rows 
> in the table are disabled based on the rows that the user selects.
> Therefore, I can't let the user press the "Select All" link when no 
> items are selected.
>
> Thanks,
>
> Richard
>
>


Re: Preventing "Select All" and "Select None" links from being rendered by the selectMany tag

Posted by Richard Yee <ry...@cruzio.com>.
By the way, I have tried to use the selectOne tag instead of selectMany 
to get around this problem but I then have the problem that I cannot 
unselect a radio button once a row is selected. It seems that once a row 
is selected with by clicking on the radio button, clicking on that 
button again does not send a request to the server so I cannot receive 
that event.

Thanks for any help in advance,

Richard

Richard Yee wrote:
> Does anyone know if there is a way to prevent the "Select All" and 
> "Select None" links from being displayed at the top of a table 
> containing a selectMany tag? The reason I need this is that some rows 
> in the table are disabled based on the rows that the user selects. 
> Therefore, I can't let the user press the "Select All" link when no 
> items are selected.
>
> Thanks,
>
> Richard
>
>


Preventing "Select All" and "Select None" links from being rendered by the selectMany tag

Posted by Richard Yee <ry...@cruzio.com>.
Does anyone know if there is a way to prevent the "Select All" and 
"Select None" links from being displayed at the top of a table 
containing a selectMany tag? The reason I need this is that some rows in 
the table are disabled based on the rows that the user selects. 
Therefore, I can't let the user press the "Select All" link when no 
items are selected.

Thanks,

Richard


Re: [Trinidad] selectOneChoice - changing other component properties

Posted by Danny Robinson <da...@gmail.com>.
<tr:inputXyz partialTriggers="checker" disabled="#{
aBean.someBooleanThatWasUpdatedByYourChoice}".../>

On 8/7/07, Darren McEntee <da...@amt-sybex.com> wrote:
>
>  Thanks Matthias,
>
>
>
> Just wondering how the other components properties are accessed/changed in
> the bean, presumable by their ID?
>
> Is there documentation/examples on this?
>
>
>
> Thanks,
>
> Darren.
>
>
>
> -----Original Message-----
> From: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com] On Behalf Of
> Matthias Wessendorf
> Sent: 07 August 2007 15:31
> To: MyFaces Discussion
> Subject: Re: [Trinidad] selectOneChoice - changing other component
> properties
>
>
>
> ****** This Message Originated From The Internet Please Be Aware Of
> Suspicious Attachments And Content ******
>
>
>
> Hi Darren,
>
>
>
> use PPR, like
>
>
>
> <tr:selectOneChoice autoSubmit="true" id="checker"
>
> valueChangeListener=#{
> aBean.methodToDoSomeWorkLikeDisableOrEnableAnotherComp}">
>
>
>
> ...
>
> </tr:selectOneChoice>
>
>
>
> <tr:inputXyz partialTriggers="checker" .../>
>
>
>
> Here are demos of similar stuff:
>
>
>
> http://www.irian.at/trinidad-demo/faces/demos/pprDemos.jspx
>
>
>
> HTH,
>
> Matthias
>
>
>
> On 8/7/07, Darren McEntee <da...@amt-sybex.com> wrote:
>
> >
>
> >
>
> >
>
> >
>
> >
>
> > Hi, I am using a trinidad tr:selectOneChoice component on one of my
> pages,
>
> > and I also have other input components below this on the same page. The
>
> > selectOneChoice contains two values.
>
> >
>
> >
>
> >
>
> > What I want to do is when I select either one of the selectOneChoice
> drop
>
> > down values, it would then enable/disable the other components on the
> page.
>
> >
>
> >
>
> >
>
> > Is this possible, as I'm not sure how to go about it.
>
> >
>
> > Thanks,
>
> >
>
> > Darren.
>
> >
>
> >
>
> >
>
> > P Please consider the environment before printing this email
>
> >  _________________________________________________________
>
> >
>
> > 1. The information contained in this E-mail, including any files
> transmitted
>
> > with it, is confidential and may be legally privileged. This E-mail is
>
> > intended only for the personal attention of the stated addressee(s). Any
>
> > access to this E-mail, including any files transmitted with it, by any
> other
>
> > person is unauthorised. If you are not an addressee, you must not
> disclose,
>
> > copy, circulate or in any other way use or rely on the information
> contained
>
> > in this E-mail or any files transmitted with it. Such unauthorised use
> may
>
> > be unlawful. If you have received this E-mail in error, please inform
> the
>
> > sender immediately and delete it and all copies from your system. You
> may
>
> > not forward this E-mail without the permission of the sender.
>
> >
>
> > 2. The views expressed in this E-mail are those of the author, and do
> not
>
> > necessarily represent the views of AMT-SYBEX. Internet communications
> are
>
> > not secure and AMT-SYBEX cannot, therefore, accept legal responsibility
> for
>
> > the contents of this message nor for any damage caused by viruses.
>
> >
>
> >  AMT-SYBEX Limited is a UK company, registration number GB03036807 at
>
> > address The Spirella Building, Bridge Road, Letchworth, SG6 4ET.
>
> >  AMT-SYBEX (NI) Limited is a UK company, registration number NI024104 at
>
> > address Edgewater Office Park, Edgewater Rd, Belfast, BT3 9JQ.
>
> > For more information on the AMT-SYBEX Group visit
> http://www.amt-sybex.com
>
> > _________________________________________________________
>
> >
>
>
>
>
>
> --
>
> Matthias Wessendorf
>
>
>
> further stuff:
>
> blog: http://matthiaswessendorf.wordpress.com/
>
> mail: matzew-at-apache-dot-org
>
>
>
>
>
>
>
> P Please consider the environment before printing this email
>



-- 
Chordiant Software Inc.
www.chordiant.com

Re: [Trinidad] selectOneChoice - changing other component properties

Posted by Matthias Wessendorf <ma...@apache.org>.
You can do something like Danny said,

it's also possible to ensure a particular component is updated by PPR,
by using the JAVA API, inside your listener, like:

  RequestContext requestContext = RequestContext.getCurrentInstance();
  requestContext.addPartialTarget(mycomponent);

A complete demo is inside here:
code.google.com/p/facesgoodies

PAGE:
http://facesgoodies.googlecode.com/svn/trunk/src/main/webapp/all.xhtml

Bean:
http://facesgoodies.googlecode.com/svn/trunk/src/main/java/net/wessendorf/faces/starter/view/controller/AllController.java


(just a demo)

-Matthias

On 8/7/07, Darren McEntee <da...@amt-sybex.com> wrote:
>
>
>
>
> Thanks Matthias,
>
>
>
> Just wondering how the other components properties are accessed/changed in
> the bean, presumable by their ID?
>
> Is there documentation/examples on this?
>
>
>
> Thanks,
>
> Darren.
>
>
>
>
> -----Original Message-----
>  From: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com] On Behalf Of
> Matthias Wessendorf
>  Sent: 07 August 2007 15:31
>  To: MyFaces Discussion
>  Subject: Re: [Trinidad] selectOneChoice - changing other component
> properties
>
>
>
> ****** This Message Originated From The Internet Please Be Aware Of
> Suspicious Attachments And Content ******
>
>
>
> Hi Darren,
>
>
>
> use PPR, like
>
>
>
> <tr:selectOneChoice autoSubmit="true" id="checker"
>
> valueChangeListener=#{aBean.methodToDoSomeWorkLikeDisableOrEnableAnotherComp}">
>
>
>
> ...
>
> </tr:selectOneChoice>
>
>
>
> <tr:inputXyz partialTriggers="checker" .../>
>
>
>
> Here are demos of similar stuff:
>
>
>
> http://www.irian.at/trinidad-demo/faces/demos/pprDemos.jspx
>
>
>
> HTH,
>
> Matthias
>
>
>
> On 8/7/07, Darren McEntee <da...@amt-sybex.com> wrote:
>
> >
>
> >
>
> >
>
> >
>
> >
>
> > Hi, I am using a trinidad tr:selectOneChoice component on one of my pages,
>
> > and I also have other input components below this on the same page. The
>
> > selectOneChoice contains two values.
>
> >
>
> >
>
> >
>
> > What I want to do is when I select either one of the selectOneChoice drop
>
> > down values, it would then enable/disable the other components on the
> page.
>
> >
>
> >
>
> >
>
> > Is this possible, as I'm not sure how to go about it.
>
> >
>
> > Thanks,
>
> >
>
> > Darren.
>
> >
>
> >
>
> >
>
> > P Please consider the environment before printing this email
>
> >
> _________________________________________________________
>
> >
>
> > 1. The information contained in this E-mail, including any files
> transmitted
>
> > with it, is confidential and may be legally privileged. This E-mail is
>
> > intended only for the personal attention of the stated addressee(s). Any
>
> > access to this E-mail, including any files transmitted with it, by any
> other
>
> > person is unauthorised. If you are not an addressee, you must not
> disclose,
>
> > copy, circulate or in any other way use or rely on the information
> contained
>
> > in this E-mail or any files transmitted with it. Such unauthorised use may
>
> > be unlawful. If you have received this E-mail in error, please inform the
>
> > sender immediately and delete it and all copies from your system. You may
>
> > not forward this E-mail without the permission of the sender.
>
> >
>
> > 2. The views expressed in this E-mail are those of the author, and do not
>
> > necessarily represent the views of AMT-SYBEX. Internet communications are
>
> > not secure and AMT-SYBEX cannot, therefore, accept legal responsibility
> for
>
> > the contents of this message nor for any damage caused by viruses.
>
> >
>
> >  AMT-SYBEX Limited is a UK company, registration number GB03036807 at
>
> > address The Spirella Building, Bridge Road, Letchworth, SG6 4ET.
>
> >  AMT-SYBEX (NI) Limited is a UK company, registration number NI024104 at
>
> > address Edgewater Office Park, Edgewater Rd, Belfast, BT3 9JQ.
>
> > For more information on the AMT-SYBEX Group visit http://www.amt-sybex.com
>
> > _________________________________________________________
>
> >
>
>
>
>
>
> --
>
> Matthias Wessendorf
>
>
>
> further stuff:
>
> blog: http://matthiaswessendorf.wordpress.com/
>
> mail: matzew-at-apache-dot-org
>
>
>
>
>
>
>
> P Please consider the environment before printing this email


-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org

Re: [Trinidad] selectOneChoice - changing other component properties

Posted by Adam Winer <aw...@gmail.com>.
For general documentation on PPR, see:

http://myfaces.apache.org/trinidad/devguide/ppr.html

-- Adam


On 8/7/07, Darren McEntee <da...@amt-sybex.com> wrote:
>
>
>
>
> Thanks Matthias,
>
>
>
> Just wondering how the other components properties are accessed/changed in
> the bean, presumable by their ID?
>
> Is there documentation/examples on this?
>
>
>
> Thanks,
>
> Darren.
>
>
>
>
> -----Original Message-----
>  From: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com] On Behalf Of
> Matthias Wessendorf
>  Sent: 07 August 2007 15:31
>  To: MyFaces Discussion
>  Subject: Re: [Trinidad] selectOneChoice - changing other component
> properties
>
>
>
> ****** This Message Originated From The Internet Please Be Aware Of
> Suspicious Attachments And Content ******
>
>
>
> Hi Darren,
>
>
>
> use PPR, like
>
>
>
> <tr:selectOneChoice autoSubmit="true" id="checker"
>
> valueChangeListener=#{aBean.methodToDoSomeWorkLikeDisableOrEnableAnotherComp}">
>
>
>
> ...
>
> </tr:selectOneChoice>
>
>
>
> <tr:inputXyz partialTriggers="checker" .../>
>
>
>
> Here are demos of similar stuff:
>
>
>
> http://www.irian.at/trinidad-demo/faces/demos/pprDemos.jspx
>
>
>
> HTH,
>
> Matthias
>
>
>
> On 8/7/07, Darren McEntee <da...@amt-sybex.com> wrote:
>
> >
>
> >
>
> >
>
> >
>
> >
>
> > Hi, I am using a trinidad tr:selectOneChoice component on one of my pages,
>
> > and I also have other input components below this on the same page. The
>
> > selectOneChoice contains two values.
>
> >
>
> >
>
> >
>
> > What I want to do is when I select either one of the selectOneChoice drop
>
> > down values, it would then enable/disable the other components on the
> page.
>
> >
>
> >
>
> >
>
> > Is this possible, as I'm not sure how to go about it.
>
> >
>
> > Thanks,
>
> >
>
> > Darren.
>
> >
>
> >
>
> >
>
> > P Please consider the environment before printing this email
>
> >
> _________________________________________________________
>
> >
>
> > 1. The information contained in this E-mail, including any files
> transmitted
>
> > with it, is confidential and may be legally privileged. This E-mail is
>
> > intended only for the personal attention of the stated addressee(s). Any
>
> > access to this E-mail, including any files transmitted with it, by any
> other
>
> > person is unauthorised. If you are not an addressee, you must not
> disclose,
>
> > copy, circulate or in any other way use or rely on the information
> contained
>
> > in this E-mail or any files transmitted with it. Such unauthorised use may
>
> > be unlawful. If you have received this E-mail in error, please inform the
>
> > sender immediately and delete it and all copies from your system. You may
>
> > not forward this E-mail without the permission of the sender.
>
> >
>
> > 2. The views expressed in this E-mail are those of the author, and do not
>
> > necessarily represent the views of AMT-SYBEX. Internet communications are
>
> > not secure and AMT-SYBEX cannot, therefore, accept legal responsibility
> for
>
> > the contents of this message nor for any damage caused by viruses.
>
> >
>
> >  AMT-SYBEX Limited is a UK company, registration number GB03036807 at
>
> > address The Spirella Building, Bridge Road, Letchworth, SG6 4ET.
>
> >  AMT-SYBEX (NI) Limited is a UK company, registration number NI024104 at
>
> > address Edgewater Office Park, Edgewater Rd, Belfast, BT3 9JQ.
>
> > For more information on the AMT-SYBEX Group visit http://www.amt-sybex.com
>
> > _________________________________________________________
>
> >
>
>
>
>
>
> --
>
> Matthias Wessendorf
>
>
>
> further stuff:
>
> blog: http://matthiaswessendorf.wordpress.com/
>
> mail: matzew-at-apache-dot-org
>
>
>
>
>
>
>
> P Please consider the environment before printing this email

RE: [Trinidad] selectOneChoice - changing other component properties

Posted by Darren McEntee <da...@amt-sybex.com>.
Thanks Matthias,

 

Just wondering how the other components properties are accessed/changed
in the bean, presumable by their ID?

Is there documentation/examples on this?

 

Thanks,

Darren.

 

-----Original Message-----
From: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com] On Behalf Of
Matthias Wessendorf
Sent: 07 August 2007 15:31
To: MyFaces Discussion
Subject: Re: [Trinidad] selectOneChoice - changing other component
properties

 

****** This Message Originated From The Internet Please Be Aware Of
Suspicious Attachments And Content ******

 

Hi Darren,

 

use PPR, like

 

<tr:selectOneChoice autoSubmit="true" id="checker"

valueChangeListener=#{aBean.methodToDoSomeWorkLikeDisableOrEnableAnother
Comp}">

 

...

</tr:selectOneChoice>

 

<tr:inputXyz partialTriggers="checker" .../>

 

Here are demos of similar stuff:

 

http://www.irian.at/trinidad-demo/faces/demos/pprDemos.jspx

 

HTH,

Matthias

 

On 8/7/07, Darren McEntee <da...@amt-sybex.com> wrote:

> 

> 

> 

> 

> 

> Hi, I am using a trinidad tr:selectOneChoice component on one of my
pages,

> and I also have other input components below this on the same page.
The

> selectOneChoice contains two values.

> 

> 

> 

> What I want to do is when I select either one of the selectOneChoice
drop

> down values, it would then enable/disable the other components on the
page.

> 

> 

> 

> Is this possible, as I'm not sure how to go about it.

> 

> Thanks,

> 

> Darren.

> 

> 

> 

> P Please consider the environment before printing this email

>  _________________________________________________________

> 

> 1. The information contained in this E-mail, including any files
transmitted

> with it, is confidential and may be legally privileged. This E-mail is

> intended only for the personal attention of the stated addressee(s).
Any

> access to this E-mail, including any files transmitted with it, by any
other

> person is unauthorised. If you are not an addressee, you must not
disclose,

> copy, circulate or in any other way use or rely on the information
contained

> in this E-mail or any files transmitted with it. Such unauthorised use
may

> be unlawful. If you have received this E-mail in error, please inform
the

> sender immediately and delete it and all copies from your system. You
may

> not forward this E-mail without the permission of the sender.

> 

> 2. The views expressed in this E-mail are those of the author, and do
not

> necessarily represent the views of AMT-SYBEX. Internet communications
are

> not secure and AMT-SYBEX cannot, therefore, accept legal
responsibility for

> the contents of this message nor for any damage caused by viruses.

> 

>  AMT-SYBEX Limited is a UK company, registration number GB03036807 at

> address The Spirella Building, Bridge Road, Letchworth, SG6 4ET.

>  AMT-SYBEX (NI) Limited is a UK company, registration number NI024104
at

> address Edgewater Office Park, Edgewater Rd, Belfast, BT3 9JQ.

> For more information on the AMT-SYBEX Group visit
http://www.amt-sybex.com

> _________________________________________________________

> 

 

 

-- 

Matthias Wessendorf

 

further stuff:

blog: http://matthiaswessendorf.wordpress.com/

mail: matzew-at-apache-dot-org

 

 

 

P Please consider the environment before printing this email



Re: [Trinidad] selectOneChoice - changing other component properties

Posted by Matthias Wessendorf <ma...@apache.org>.
Hi Darren,

use PPR, like

<tr:selectOneChoice autoSubmit="true" id="checker"
valueChangeListener=#{aBean.methodToDoSomeWorkLikeDisableOrEnableAnotherComp}">

...
</tr:selectOneChoice>

<tr:inputXyz partialTriggers="checker" .../>

Here are demos of similar stuff:

http://www.irian.at/trinidad-demo/faces/demos/pprDemos.jspx

HTH,
Matthias

On 8/7/07, Darren McEntee <da...@amt-sybex.com> wrote:
>
>
>
>
>
> Hi, I am using a trinidad tr:selectOneChoice component on one of my pages,
> and I also have other input components below this on the same page. The
> selectOneChoice contains two values.
>
>
>
> What I want to do is when I select either one of the selectOneChoice drop
> down values, it would then enable/disable the other components on the page.
>
>
>
> Is this possible, as I'm not sure how to go about it.
>
> Thanks,
>
> Darren.
>
>
>
> P Please consider the environment before printing this email
>  _________________________________________________________
>
> 1. The information contained in this E-mail, including any files transmitted
> with it, is confidential and may be legally privileged. This E-mail is
> intended only for the personal attention of the stated addressee(s). Any
> access to this E-mail, including any files transmitted with it, by any other
> person is unauthorised. If you are not an addressee, you must not disclose,
> copy, circulate or in any other way use or rely on the information contained
> in this E-mail or any files transmitted with it. Such unauthorised use may
> be unlawful. If you have received this E-mail in error, please inform the
> sender immediately and delete it and all copies from your system. You may
> not forward this E-mail without the permission of the sender.
>
> 2. The views expressed in this E-mail are those of the author, and do not
> necessarily represent the views of AMT-SYBEX. Internet communications are
> not secure and AMT-SYBEX cannot, therefore, accept legal responsibility for
> the contents of this message nor for any damage caused by viruses.
>
>  AMT-SYBEX Limited is a UK company, registration number GB03036807 at
> address The Spirella Building, Bridge Road, Letchworth, SG6 4ET.
>  AMT-SYBEX (NI) Limited is a UK company, registration number NI024104 at
> address Edgewater Office Park, Edgewater Rd, Belfast, BT3 9JQ.
> For more information on the AMT-SYBEX Group visit http://www.amt-sybex.com
> _________________________________________________________
>


-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org