[jboss-user] [JBoss Seam] - SeamSelectItemsNewDesign Problem with converting

grdzeli_kaci do-not-reply at jboss.com
Wed Mar 7 02:02:59 EST 2007

hi petemuir,
i found your project "SeamSelectItemsNewDesign", i tryed to use it, download selectitems-1.1.1beta4.

than i put selectitems.jar and selectitems-ui.jar into my WEB-INF/lib.

then i tryed to fill application combo with application name 
Application class is simple database entity bean has properties applicId,name,code,description

then i wrote entity query into my componets.xml file

  | <framework:entity-query name="applications" ejbql="select a from Application a" />
and then i wrote simple converter class

  | @Name("exampleBean")
  | public class ExampleBean extends SelectItemsConverter {
  |     @Override
  |     protected String convertToString(FacesContext facesContext, UIComponent uIComponent, Object object) throws ConverterException {
  |         return ":::";
  |     }
  |     @Override
  |     protected Object convertToObject(FacesContext facesContext, UIComponent uIComponent, String string) throws ConverterException {
  |         return new Application();
  |     }
  | }

and in the end into my facelet i wrote this :

  | <h:selectOneMenu styleClass="font_style" value="#{application.name}" converter="#{exampleBean}">
  |                                         <si:selectItems value="#{applications.resultList}" var="application" label="#{application.name}" />
  |                                     </h:selectOneMenu>                                    
  |                                     <h:messages style="color: red" for="application"/>

i found discussion about this problem

you said :
anonymous wrote : 
  | The first issue I suspect is a class loading problem - you probably have multiple (stale) copies of the selectitems.jar floating around. 
i'm sure that i had only one selectitems.jar and selectitems-ui.jar into my ear file 
which contains war file, such contains this files into web-inf/lib folder 

i also read this and done everything 

but i got an error again and again :(

  | javax.faces.FacesException: Converter must implement SelectItemsConverter: com.magticom.billing.businesslayer.sessionbeans.ccare.ExampleBean at 1c2832e
  |         at org.jboss.seam.selectitems.ui.UISeamSelectItems.addConverters(UISeamSelectItems.java:364)
  |         at org.jboss.seam.selectitems.ui.UISeamSelectItems.getValue(UISeamSelectItems.java:246)
  |         at org.apache.myfaces.shared_impl.util.SelectItemsIterator.hasNext(SelectItemsIterator.java:102)
  |         at org.apache.myfaces.shared_impl.renderkit.RendererUtils.internalGetSelectItemList(RendererUtils.java:477)

what did i wrong ? i did not changed entitymanager and i think i must not add any config into my components.xml


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025682#4025682

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025682

More information about the jboss-user mailing list