You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Stefan Kogler <st...@kathrein.de> on 2008/05/27 13:04:59 UTC

[Trinidad] Three dependent selectOneChoice-Boxes

Hi all,

i have a problem with dependent selectOneChoice-Components.

Here is my code: 


                                <h:outputLabel value="Agency:" style=
"width: 100px;" />
                                <tr:selectOneChoice id="selectedAgency" 
                                                                value="
#{Agency.tempSelectedAgency}" 
                                                          unselectedLabel=
"Select an agency..." 
                                                                  
autoSubmit="true"
                                                                  
immediate="true">
                                        <f:selectItems value
="#{Agency.userAgencies}"/>
                                </tr:selectOneChoice>

                                <h:outputLabel value="Partner:" style=
"width: 100px;" /> 
                                <tr:selectOneChoice id="selectedPartner"  
                                                                        
value="#{Partner.tempSelectedPartner}" 
                                                                        
unselectedLabel="Select a partner..." 
                                                                        
partialTriggers="selectedAgency" 
                                                                        
autoSubmit="true" 
                                                                        
immediate="true">
                                        <f:selectItems value
="#{Partner.agencyPartners}" />
                                </tr:selectOneChoice>

                                <h:outputLabel value="Country:" style=
"width: 100px;" />
                                <tr:selectOneChoice value
="#{Country.tempSelectedCountry}" 
                                                                        
unselectedLabel="Select a country..." 
                                                                        
partialTriggers="selectedPartner" >
                                        <f:selectItems value
="#{Country.partnerCountries}"/>
                                </tr:selectOneChoice>


The user should first select the Agency then the partner which depends on 
the selected agency and then the
country which depends on the selected partner.

The problem is the second selectOneChoice (selectedPartner): When i select 
a partner the autoSubmit occurs and resets the 
selection to the value of unselectedLabel. But i need the autoSubmit to 
refresh the countrys. 

Can anybody help me?


-- 
Stefan Kogler
Informationstechnik Organisation, ITO

KATHREIN-Werke KG
Anton-Kathrein-Straße 1-3
P.O. Box 100 444
83004 Rosenheim, Germany

Tel.: +49 8031 184-5837
Fax: +49 8031 184-525837

E-Mail: stefan.kogler@kathrein.de
Internet: http://www.kathrein.de


-- 
Registergericht / Register court: Amtsgericht Traunstein, HRA 460 / local court Traunstein, certificate of registration no. 460 
Geschäftsführender persönlich haftender Gesellschafter / Personally liable managing partner: Prof. Dr. Dr. h.c. Anton Kathrein, Dipl.-Betriebswirt (MBA-equivalent) 
Erfüllungsort und Gerichtsstand / Place of performance and place of jurisdiction: Rosenheim 

This e-mail is confidential and may contain privileged information. If you have received this communication in error, please notify us immediately by responding to this email and then delete it from your system. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. We believe but do not warrant that this e-mail and any attachments are virus free. You must therefore take full responsibility for virus checking. 

Re: [Trinidad] Three dependent selectOneChoice-Boxes

Posted by Andrew Robinson <an...@gmail.com>.
Do not use immediate true. This is not the proper usage. Use
tr:subForm if you want to skip validation for different areas on a
page.

On Tue, May 27, 2008 at 5:04 AM, Stefan Kogler
<st...@kathrein.de> wrote:
>
> Hi all,
>
> i have a problem with dependent selectOneChoice-Components.
>
> Here is my code:
>
>
>                                 <h:outputLabel value="Agency:" style="width:
> 100px;" />
>                                 <tr:selectOneChoice id="selectedAgency"
>
> value="#{Agency.tempSelectedAgency}"
>
> unselectedLabel="Select an agency..."
>
> autoSubmit="true"
>
> immediate="true">
>                                         <f:selectItems
> value="#{Agency.userAgencies}"/>
>                                 </tr:selectOneChoice>
>
>                                 <h:outputLabel value="Partner:"
> style="width: 100px;" />
>                                 <tr:selectOneChoice id="selectedPartner"
>
> value="#{Partner.tempSelectedPartner}"
>
> unselectedLabel="Select a partner..."
>
> partialTriggers="selectedAgency"
>
> autoSubmit="true"
>
> immediate="true">
>                                         <f:selectItems
> value="#{Partner.agencyPartners}" />
>                                 </tr:selectOneChoice>
>
>                                 <h:outputLabel value="Country:"
> style="width: 100px;" />
>                                 <tr:selectOneChoice
> value="#{Country.tempSelectedCountry}"
>
> unselectedLabel="Select a country..."
>
> partialTriggers="selectedPartner" >
>                                         <f:selectItems
> value="#{Country.partnerCountries}"/>
>                                 </tr:selectOneChoice>
>
>
> The user should first select the Agency then the partner which depends on
> the selected agency and then the
> country which depends on the selected partner.
>
> The problem is the second selectOneChoice (selectedPartner): When i select a
> partner the autoSubmit occurs and resets the
> selection to the value of unselectedLabel. But i need the autoSubmit to
> refresh the countrys.
>
> Can anybody help me?
>
>
> --
> Stefan Kogler
> Informationstechnik Organisation, ITO
>
> KATHREIN-Werke KG
> Anton-Kathrein-Straße 1-3
> P.O. Box 100 444
> 83004 Rosenheim, Germany
>
> Tel.: +49 8031 184-5837
> Fax: +49 8031 184-525837
>
> E-Mail: stefan.kogler@kathrein.de
> Internet: http://www.kathrein.de
> --
> Registergericht / Register court: Amtsgericht Traunstein, HRA 460 / local
> court Traunstein, certificate of registration no. 460
> Geschäftsführender persönlich haftender Gesellschafter / Personally liable
> managing partner: Prof. Dr. Dr. h.c. Anton Kathrein, Dipl.-Betriebswirt
> (MBA-equivalent)
> Erfüllungsort und Gerichtsstand / Place of performance and place of
> jurisdiction: Rosenheim
>
> This e-mail is confidential and may contain privileged information. If you
> have received this communication in error, please notify us immediately by
> responding to this email and then delete it from your system. The sender
> therefore does not accept liability for any errors or omissions in the
> contents of this message which arise as a result of e-mail transmission. We
> believe but do not warrant that this e-mail and any attachments are virus
> free. You must therefore take full responsibility for virus checking.
>