Listshuttle causes problem: looks like a defect in listshuttle
winsterjose Dec 29, 2010 12:35 PMPlease find my code below. The action of commandbutton is not triggered. The sourcevalue and targetvalue is a list of strings. My backing bean is having request scope.
This is the error I am getting!
Component dialog:shuttlelist has invalid value expression test1
dialog is my form id. shuttlelist is my listshuttle id. test1 is a sample value set to available item. which is a string
I can reach my action in 2 ways. Either change the scope from request to view. Or use immediate=true for commandbutton. But I dont want to use these 2. I want to stick on requestscope and immediate=true gets me empty values in backingbean.
Whats going wrong here?
<f:view>
<rich:messages/>
<h:form id="dialog">
<a4j:jsFunction name="loadDialogDataJSF" action="#{dialogBean.loadDialogData}" reRender="shuttlelist"/>
<h:panelGrid>
<rich:listShuttle id="shuttlelist" sourceValue="#{dialogBean.availableItemsTest}"
targetValue="#{dialogBean.selectedItemsTest}"
var="items" listsHeight="150" sourceListWidth="152"
targetListWidth="152" sourceCaptionLabel="Available Items"
targetCaptionLabel="Selected Items">
<rich:column>
<h:outputText value="#{items}" />
</rich:column>
</rich:listShuttle>
<h:commandButton value="Submit" action="#{dialogBean.save}"/>
</h:panelGrid>
</h:form>
</f:view>
availableItemsTest = new ArrayList<String>();
selectedItemsTest = new ArrayList<String>();
availableItemsTest.add("test1");
availableItemsTest.add("test2");
availableItemsTest.add("test3");