I dont want to use orchestra, could you describe t:saveState? - how it should look?
2009/1/13 Leonardo Uribe <[email protected]>: > > > On Tue, Jan 13, 2009 at 8:30 AM, Anton Gavazuk <[email protected]> > 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 > >

