[jboss-user] [JBoss Seam] - @Embeddable question

anescu do-not-reply at jboss.com
Mon May 21 09:16:35 EDT 2007


Hi,

We're trying to use an @Embeddable class in our project. It's a seam generated project, but we keep our entities and modify the views as needed.

So, we have a ABC @Embeddable class which has one field

    private String name;
And this class is embedded into another, XYZ.

On the interface i have a field:
<s:decorate id="ABCNameDecoration" template="layout/edit.xhtml">
  | 	<ui:define name="label"><h:outputText value="#{messages['XYZ.ABCName.label']}" /></ui:define>
  | 	<h:inputText id="ABCName"
  | 			   size="100"
  | 		  maxlength="100"
  | 			  value="#{xyzHome.instance.ABC.name}" title="#{messages['XYZ.ABCName.tooltip']}">
  | 		<a:support event="onblur" reRender="ABCNameDecoration"/>
  | 	</h:inputText>
  | </s:decorate>

The page renders ok, but when i try to edit/add an entity and put some value into this field I get a validation error:
anonymous wrote : value could not be converted to the expected type
No error shows up in the log, even on debug mode.

I browsed the forum and found somewhere something about needing a converter for this entity. I also found some examples on how to build a custom JSF converter. So, my questions are:
1) is there a doc on how to do custom converters on seam (what needs to be configured and so on)
2) If my ABC class has 5 fields, all rendered on the page of the owing entity (XYZ) as separate fields, do I need 5 converters, one for each field????
Tnx, I wait for your reply...

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

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



More information about the jboss-user mailing list