You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by is_maximum <mn...@gmail.com> on 2007/05/01 12:57:12 UTC

problem with selectManyPicklist of Sandbox

Hello
I have a problem with selectManyPicklist. I have a drop down list to select
a category and for each catgory there are some fields that user may select
the field to be displayed or not and this happens by a picklist

the problem is the value of selected fields that before use opted as
displayable field doesnt work properly

to clarify my problem consider following snippet:

   		<!-- select a category to list all fields inside that -->   
		<t:selectOneMenu  id="categoryList1" required="true" 
					      valueChangeListener="#{userSetting.processValueChanged}" 
					      binding="#{userSetting.selectOneCategory}">
			<f:selectItems id="selectcategory"
value="#{userSetting.categorySelectItem}"/>
		</t:selectOneMenu> 


		<h:commandButton id="loadButton" value="Load" class="button"
action="#{userSetting.apply}"/>

   		<h:outputText id="headerNameOutput" value="select columns:" />

   		<!-- the picklist to select displayable fields -->   
          <s:selectManyPicklist id="pickList" size="10" 
                        		value="#{userSetting.selectedItems}" >
		     <s:selectItems id="columnHeadersSelectItems"
value="#{userSetting.columns}" var="column" 
		   				  itemValue="#{column.name}" itemLabel="#{column.label}" />
          </s:selectManyPicklist>

-------------
in <s:selectManyPicklist> as you can see the attribute value is set to
#{userSetting.selectedItems} and in the server-side this selectedItems type
is java.lang.List<String> and contains the values of selected items that
before selected by user. but  when user changes the category however this
selectedItems in server will change in valueChangeListener method but the
previous value still exists so in the new category selected it will shown
selected fields that is common with last category. 

the selectedItems never changes or if change it never being applied in the
picklist.

have you ever had such problem? 
I appreciate any help or suggestion

-- 
View this message in context: http://www.nabble.com/problem-with-selectManyPicklist-of-Sandbox-tf3674469.html#a10267455
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: problem with selectManyPicklist of Sandbox

Posted by is_maximum <mn...@gmail.com>.
Any Idea????
-- 
View this message in context: http://www.nabble.com/problem-with-selectManyPicklist-of-Sandbox-tf3674469.html#a10333843
Sent from the MyFaces - Users mailing list archive at Nabble.com.