You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by ea...@tmb.net on 2008/01/08 09:15:03 UTC

Dependant selectOne* and input* components in PPR Trinidad

Hi, 
 
I am trying Trinidad PPR component facility to create dependant input
fields. 
My objective is to create a selectOneChoice that its data is updated
when a previous selectOneChoice value is selected.
 
The sample code is at the bottom.
 
The problem is that the first time you choose the first select, the
second one is updated correctly.
But when you try it once again the second select value is updated, in
the server side, but the previous value is also submitted, so that, no
change is made.
 
My question is, Is that possible? 
In component demo aplications there is no example on using PPR for
dependant input components.
 
Thanks in advance.
 
Esteve
 
<tr:selectOneChoice id="selOne"

label="Label 1"

autoSubmit="true"

unselectedLabel="None"

valueChangeListener="#{helloWorldBacking.label1Changed}">

<tr:selectItem label="First" value="1" />

<tr:selectItem label="Second" value="2" />

<tr:selectItem label="Third" value="3" />

</tr:selectOneChoice>

<tr:outputText partialTriggers="selOne"

value="The Value is: #{helloWorldBacking.label2Value}" />

<tr:selectOneChoice id="selTwo"

label="Label 2"

partialTriggers="selOne"

unselectedLabel="None"

immediate="true"

value="#{helloWorldBacking.label2Value}">

<tr:selectItem label="First" value="1" />

<tr:selectItem label="Second" value="2" />

<tr:selectItem label="Third" value="3" />

</tr:selectOneChoice>



 
__________________________________________________________________________

Aquest missatge electronic esta dirigit unicament a les adreces indicades. El seu caracter confidencial, personal i intransferible esta protegit legalment. Qualsevol revelacio, us o reenviament no autoritzat, total o parcial, esta prohibit. Si ha rebut aquest missatge per equivocacio, notifiqui-ho immediatament a la persona que l'ha enviat i esborri el missatge original juntament amb els seus fitxers annexos sense llegir-lo ni gravar-lo.
TMB (Transports Metropolitans de Barcelona)


Informacio interactiva de transport: www.tmb.net

Re: Dependant selectOne* and input* components in PPR Trinidad

Posted by Gerhard Petracek <ge...@gmail.com>.
hello esteve,

there are several possibilities in place to use scopes which lasts longer
than the request scope and shorter than the session scope.

e.g. you can use mechanisms which are provided by:
- myfaces tomahawk, trinidad and orchestra
- the spring project (custom scopes - which are also used by orchestra) +
sub-projects (see spring web flow)

the best choice depends on your requirements.

regards,
gerhard



2008/1/8, eavilesa@tmb.net <ea...@tmb.net>:
>
>  Hello Gerhard,
>
> Thank you very much for your rapid response.
> I've been looking for a long time this functionality but I used bad keys.
>
> When you talk about extended request scope, what are you talking about?
> How do you set it up. Where can I get more information?
>
> Thanks once more.
>
>
>
> Esteve
>
>  ------------------------------
> *De:* Gerhard Petracek [mailto:gerhard.petracek@gmail.com]
> *Enviado el:* martes, 08 de enero de 2008 9:40
> *Para:* MyFaces Discussion
> *Asunto:* Re: Dependant selectOne* and input* components in PPR Trinidad
>
> hello esteve,
>
> please have a look at:
> http://www.nabble.com/-Trinidad--valueChangeListener-called-too-often--to14098783.html#a14098783
>
>
> regards,
> gerhard
>
>
>
> 2008/1/8, eavilesa@tmb.net <ea...@tmb.net>:
> >
> >  Hi,
> >
> > I am trying Trinidad PPR component facility to create dependant input
> > fields.
> > My objective is to create a selectOneChoice that its data is updated
> > when a previous selectOneChoice value is selected.
> >
> > The sample code is at the bottom.
> >
> > The problem is that the first time you choose the first select, the
> > second one is updated correctly.
> > But when you try it once again the second select value is updated, in
> > the server side, but the previous value is also submitted, so that, no
> > change is made.
> >
> > My question is, Is that possible?
> > In component demo aplications there is no example on using PPR for
> > dependant input components.
> >
> > Thanks in advance.
> >
> > Esteve
> >
> >
> > <tr:selectOneChoice id= "selOne"
> >
> > label="Label 1"
> >
> > autoSubmit="true"
> >
> > unselectedLabel="None"
> >
> > valueChangeListener="#{helloWorldBacking.label1Changed }">
> >
> > <tr:selectItem label="First" value="1" />
> >
> > <tr:selectItem label="Second" value="2" />
> >
> > <tr:selectItem label="Third" value="3" />
> >
> > </tr:selectOneChoice>
> >
> > <tr:outputText partialTriggers= "selOne"
> >
> > value="The Value is: #{helloWorldBacking.label2Value }" />
> >
> > <tr:selectOneChoice id= "selTwo"
> >
> > label="Label 2"
> >
> > partialTriggers="selOne"
> >
> > unselectedLabel="None"
> >
> > immediate="true"
> >
> > value="#{helloWorldBacking.label2Value}" >
> >
> > <tr:selectItem label="First" value="1" />
> >
> > <tr:selectItem label="Second" value="2" />
> >
> > <tr:selectItem label="Third" value="3" />
> >
> > </tr:selectOneChoice>
> >
> > Advertencia:
> > __________________________________________________________________________
> >
> >
> > Aquest missatge electronic esta dirigit unicament a les adreces
> > indicades. El seu caracter confidencial, personal i intransferible esta
> > protegit legalment. Qualsevol revelacio, us o reenviament no autoritzat,
> > total o parcial, esta prohibit. Si ha rebut aquest missatge per equivocacio,
> > notifiqui-ho immediatament a la persona que l'ha enviat i esborri el
> > missatge original juntament amb els seus fitxers annexos sense llegir-lo ni
> > gravar-lo.
> > TMB (Transports Metropolitans de Barcelona)
> >
> > Informacio interactiva de transport: www.tmb.net
> > .
> >
>
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
> Advertencia:
> __________________________________________________________________________
>
>
> Aquest missatge electronic esta dirigit unicament a les adreces indicades.
> El seu caracter confidencial, personal i intransferible esta protegit
> legalment. Qualsevol revelacio, us o reenviament no autoritzat, total o
> parcial, esta prohibit. Si ha rebut aquest missatge per equivocacio,
> notifiqui-ho immediatament a la persona que l'ha enviat i esborri el
> missatge original juntament amb els seus fitxers annexos sense llegir-lo ni
> gravar-lo.
> TMB (Transports Metropolitans de Barcelona)
>
> Informacio interactiva de transport: www.tmb.net
> .
>



-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

RE: Dependant selectOne* and input* components in PPR Trinidad

Posted by ea...@tmb.net.
Hello Gerhard,
 
Thank you very much for your rapid response. 
I've been looking for a long time this functionality but I used bad
keys.
 
When you talk about extended request scope, what are you talking about?
How do you set it up. Where can I get more information?
 
Thanks once more.
 
 
 
Esteve

________________________________

De: Gerhard Petracek [mailto:gerhard.petracek@gmail.com] 
Enviado el: martes, 08 de enero de 2008 9:40
Para: MyFaces Discussion
Asunto: Re: Dependant selectOne* and input* components in PPR Trinidad


hello esteve,

please have a look at:
http://www.nabble.com/-Trinidad--valueChangeListener-called-too-often--t
o14098783.html#a14098783 

regards,
gerhard




2008/1/8, eavilesa@tmb.net <ea...@tmb.net>: 

	Hi, 
	 
	I am trying Trinidad PPR component facility to create dependant
input fields. 
	My objective is to create a selectOneChoice that its data is
updated when a previous selectOneChoice value is selected.
	 
	The sample code is at the bottom.
	 
	The problem is that the first time you choose the first select,
the second one is updated correctly.
	But when you try it once again the second select value is
updated, in the server side, but the previous value is also submitted,
so that, no change is made.
	 
	My question is, Is that possible? 
	In component demo aplications there is no example on using PPR
for dependant input components.
	 
	Thanks in advance.
	 
	Esteve
	 
	

	<tr:selectOneChoice id= "selOne" 

	label="Label 1"

	autoSubmit="true"

	unselectedLabel="None"

	valueChangeListener="#{helloWorldBacking.label1Changed }">

	

	<tr:selectItem label="First" value="1" /> 

	

	<tr:selectItem label="Second" value="2" /> 

	

	<tr:selectItem label="Third" value="3" /> 

	

	</tr:selectOneChoice> 

	

	<tr:outputText partialTriggers= "selOne" 

	

	value="The Value is: #{helloWorldBacking.label2Value }" /> 

	

	<tr:selectOneChoice id= "selTwo" 

	

	label="Label 2" 

	

	partialTriggers="selOne" 

	

	unselectedLabel="None" 

	

	immediate="true" 

	

	

	value="#{helloWorldBacking.label2Value}" > 

	

	<tr:selectItem label="First" value="1" /> 

	

	<tr:selectItem label="Second" value="2" /> 

	

	<tr:selectItem label="Third" value="3" /> 

	

	</tr:selectOneChoice>

	

	Advertencia:
	
________________________________________________________________________
__ 
	
	Aquest missatge electronic esta dirigit unicament a les adreces
indicades. El seu caracter confidencial, personal i intransferible esta
protegit legalment. Qualsevol revelacio, us o reenviament no autoritzat,
total o parcial, esta prohibit. Si ha rebut aquest missatge per
equivocacio, notifiqui-ho immediatament a la persona que l'ha enviat i
esborri el missatge original juntament amb els seus fitxers annexos
sense llegir-lo ni gravar-lo. 
	TMB (Transports Metropolitans de Barcelona) 
	
	Informacio interactiva de transport: www.tmb.net 
	.




-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces 


 
__________________________________________________________________________

Aquest missatge electronic esta dirigit unicament a les adreces indicades. El seu caracter confidencial, personal i intransferible esta protegit legalment. Qualsevol revelacio, us o reenviament no autoritzat, total o parcial, esta prohibit. Si ha rebut aquest missatge per equivocacio, notifiqui-ho immediatament a la persona que l'ha enviat i esborri el missatge original juntament amb els seus fitxers annexos sense llegir-lo ni gravar-lo.
TMB (Transports Metropolitans de Barcelona)


Informacio interactiva de transport: www.tmb.net

Re: Dependant selectOne* and input* components in PPR Trinidad

Posted by Gerhard Petracek <ge...@gmail.com>.
hello esteve,

please have a look at:
http://www.nabble.com/-Trinidad--valueChangeListener-called-too-often--to14098783.html#a14098783

regards,
gerhard



2008/1/8, eavilesa@tmb.net <ea...@tmb.net>:
>
>  Hi,
>
> I am trying Trinidad PPR component facility to create dependant input
> fields.
> My objective is to create a selectOneChoice that its data is updated when
> a previous selectOneChoice value is selected.
>
> The sample code is at the bottom.
>
> The problem is that the first time you choose the first select, the second
> one is updated correctly.
> But when you try it once again the second select value is updated, in the
> server side, but the previous value is also submitted, so that, no change is
> made.
>
> My question is, Is that possible?
> In component demo aplications there is no example on using PPR for
> dependant input components.
>
> Thanks in advance.
>
> Esteve
>
>
> <tr:selectOneChoice id="selOne"
>
> label="Label 1"
>
> autoSubmit="true"
>
> unselectedLabel="None"
>
> valueChangeListener="#{helloWorldBacking.label1Changed}">
>
> <tr:selectItem label="First" value="1" />
>
> <tr:selectItem label="Second" value="2" />
>
> <tr:selectItem label="Third" value="3" />
>
> </tr:selectOneChoice>
>
> <tr:outputText partialTriggers="selOne"
>
> value="The Value is: #{helloWorldBacking.label2Value}" />
>
> <tr:selectOneChoice id="selTwo"
>
> label="Label 2"
>
> partialTriggers="selOne"
>
> unselectedLabel="None"
>
> immediate="true"
>
> value="#{helloWorldBacking.label2Value}">
>
> <tr:selectItem label="First" value="1" />
>
> <tr:selectItem label="Second" value="2" />
>
> <tr:selectItem label="Third" value="3" />
>
> </tr:selectOneChoice>
>
> Advertencia:
> __________________________________________________________________________
>
>
> Aquest missatge electronic esta dirigit unicament a les adreces indicades.
> El seu caracter confidencial, personal i intransferible esta protegit
> legalment. Qualsevol revelacio, us o reenviament no autoritzat, total o
> parcial, esta prohibit. Si ha rebut aquest missatge per equivocacio,
> notifiqui-ho immediatament a la persona que l'ha enviat i esborri el
> missatge original juntament amb els seus fitxers annexos sense llegir-lo ni
> gravar-lo.
> TMB (Transports Metropolitans de Barcelona)
>
> Informacio interactiva de transport: www.tmb.net
> .
>



-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces