myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Gavazuk" <antongava...@gmail.com>
Subject Re: [MYFACES][SANDBOX] Partial Page update, chain together combo box and inputSuggestAjax.
Date Tue, 13 Jan 2009 15:28:04 GMT
I dont want to use orchestra,

could you describe t:saveState? - how it should look?

2009/1/13 Leonardo Uribe <lu4242@gmail.com>:
>
>
> On Tue, Jan 13, 2009 at 8:30 AM, Anton Gavazuk <antongavazuk@gmail.com>
> wrote:
>>
>> Hi all,
>>
>> I'm trying to implement such scenario (maybe common)
>> I have combobox with countries and another input with cities, so when
>> user is choosing an country from combobox, he can enter city name in
>> the second input, but in the same time, if the system knows entered
>> city in choosed country, show to him the suggestion menu.
>>
>> so my quick construction looks like:
>>
>> <h:selectOneMenu id="inDropCountry" value="#{addressBean.countryInt}">
>>      <f:selectItems value="#{dictionaryBean.countries}"/>
>>   </h:selectOneMenu>
>>   <sand:pprPanelGroup id="city_ppr"
>>                       partialTriggers="inDropCountry(onchange)">
>>      <h:outputText value="#{addressBean.countryInt}"/>
>>      <h:outputLabel value="City:">
>>         <sand:inputSuggestAjax value="#{addressBean.city}"
>>
>> suggestedItemsMethod="#{addressBean.getCitiesForCountry}"
>>
>>  itemLabelMethod="#{addressBean.getCityLabel}">
>>            <f:converter converterId="cityConverter"/>
>>         </sand:inputSuggestAjax>
>>      </h:outputLabel>
>>   </sand:pprPanelGroup>
>>
>> Everything is fine on paper (or in editor :) ), but now I have
>> obstacle - every change in inputSuggest forces to create new
>> AddressBean instance and of course in that case the state of previous
>> addreassBean is being loosed. (The scope is request)
>> Now I see only one way - to play around with session saving of some
>> attributes, but its not very convenient.
>>
>> Could anyone suggest  how to implement this scenario in more handy/easier
>> way?
>
> Hi
>
> There are many solutions: use myfaces orchestra (conversation scope),
> t:saveState, .....
>
> regards
>
> Leonardo Uribe
>
>>
>> Cheers,
>> Anton
>
>

Mime
View raw message