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
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user