orderingList Error with Getting Selection - Severity=(ERROR
echua Jul 3, 2008 6:08 PMI get the following error
INFO: WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
sourceId=storelistform2:orderingListStore[severity=(ERROR 2), summary=("Component storelistform2:orderingListStore has invalid value expression Store [1] by Beewhole"), detail=("Component storelistform2:orderingListStore has invalid value expression Store [1] by Beewhole")]
I am trying to just get the user selected row in a orderingList. What am I doing wrong?
I have a converter
public class StoreConverter implements Converter {
/* (non-Javadoc)
* @see javax.faces.convert.Converter#getAsObject(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.String)
*/
public Object getAsObject(FacesContext context, UIComponent component,
String value) {
int index1 = value.indexOf(':');
int index2 = value.lastIndexOf(':');
return new Store(Integer.valueOf(value.substring(0, index1)), value.substring(index1 + 1,index2),value.substring(index2+1));
}
/* (non-Javadoc)
* @see javax.faces.convert.Converter#getAsString(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)
*/
public String getAsString(FacesContext context, UIComponent component,
Object value) {
Store storeItem = (Store) value;
return (storeItem.getStoreid() + ":" + storeItem.getName() +":" + storeItem.getDescription());
}
}
and here is my orderingList
<h:form id="storelistform2">
<rich:orderingList id="orderingListStore" value="#{sysUsers.storeList}" var="store" controlsType="button" listHeight="150" listWidth="350"
selection="#{sysUsers.selection}" converter="#{storeConverter}" >
<h:column width="50px">
<f:facet name="header">
<h:outputText value="StoreID" />
</f:facet>
<h:outputText value="#{store.storeid}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Store Name" />
</f:facet>
<h:outputText value="#{store.name}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Description" />
</f:facet>
<h:outputText value="#{store.description}"></h:outputText>
</h:column>
</rich:orderingList>
<a4j:commandButton id="submitLButton" value="Submit" action="#{sysUsers.showPreview}" />
</h:form>
I use hibernate in my bean to get the list. Nay one had this problem??