[jboss-user] [JBoss Seam] - Re: Cannot find the entityconverter taglib

jeffconstantin do-not-reply at jboss.com
Wed Mar 14 15:36:53 EDT 2007


I have this working except for one problem. I get my <s:selectItems> populated in the "create form" but some "250-char-serialized-string" is save in the database for my "car" column.  I am sure I am missing a converter somewhere but I don't know what or where it goes. 

Your entityConverter works great. It takes my Entity ( SeamtestCars ) and builds the correct  options as string. I am guessing hibernate is controlling the insert/update and it is not converting my "car" column to a string before inserting. 

Am I way off base? Any suggestion?

Situation SEAM-GEN application with 2 tables: ( no foreign-key enabled )
Oracle Database 9i

1. SEAMTEST ( column called car ) PK= ID
  | 2. SEAMTEST_CARS ( id ) PK = ID
  | 
I have added the code as suggested in your example.

IN: components.xml

    <!-- this will create the ejb objects for the selectItems  -->
  |     <framework:entity-query name="cars" ejbql="select d from SeamtestCars d" />
  | 
IN: Seamtest.java

	@ManyToOne
  | 	private SeamtestCars car = new SeamtestCars();
  | 
  |        getters and setters....
  | 
IN: editSeamtest.jsp

<h:selectOneMenu value="#{seamtestEditor.instance.car}" id="car">
  | <s:selectItems value="#{cars.resultList}" var="car" label="#{car.name}" /> 
  | <ec:convertEntity />	
  | </h:selectOneMenu>


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

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



More information about the jboss-user mailing list