2 Replies Latest reply on Sep 24, 2007 7:22 PM by Vincent LAUGIER

    EntityConverter with patch for seam 1.2.0

    Vincent LAUGIER Newbie


      we have been strugling all day trying to make the patch for EntityConverter work

      for seam_EAP 4.2 with integrated seam 1.2.0

      we have followed

      but it doesn't work and we are short of ideas now

      we get the following error in french
      sourceId=createService:radioService[severity=(ERROR 2), summary=(la valeur nest pas valide), detail=(la valeur nest pas valide)]

      which I translate as

      sourceId=createService:radioService[severity=(ERROR 2), summary=(value is not valid), detail=(value is not valid)]

      I put as attachment our code for the web page and the manager (bean + interface)

      I know the support is not meant for debugging our code, but in that case I dare to ask since this is a basic functionnality of seam that we expect to work

      the web page code

      <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
      <ui:define name="body">
       <h:messages globalOnly="true" styleClass="message"/>
       <h:form id="createService" styleClass="edit">
       <f:facet name="header">Créer un compte</f:facet>
       <div class="input">
       <s:decorate template="layout/edit.xhtml">
       <ui:define name="label">nom du service :</ui:define>
       <h:inputText id="login" size="50" value="#{service.name}" required="true" />
       <div class="input">
       <h:selectOneRadio id="radioService" value="#{selectedService}">
       <s:selectItems value="#{createService.services}" var="row"
       label="#{row.name}" /><br/>
       <ec:convertEntity />
       <div class="actionButtons">
       <h:commandButton value="Créer le service"

      the manager bean
      package fr.helmet.portal.manager;
      import fr.helmet.portal.entity.Service;
      import java.util.List;
      import javax.ejb.Remove;
      import javax.ejb.Stateful;
      import javax.persistence.EntityManager;
      import javax.persistence.PersistenceContext;
      import javax.persistence.PersistenceContextType;
      import org.jboss.seam.annotations.Create;
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.annotations.In;
      import org.jboss.seam.annotations.Destroy;
      import org.jboss.seam.annotations.Logger;
      import org.jboss.seam.annotations.Out;
      import org.jboss.seam.log.Log;
      import org.jboss.seam.core.FacesMessages;
      public class CreateServiceBean implements CreateService {
       @Logger private Log log;
       @In FacesMessages facesMessages;
       @In (required=false)
       @Out (required=false)
       private Service service;
       private EntityManager entityManager;
       @In (required=false)
       private Service selectedService;
       public Service getSelectedService() {
       return selectedService;
       public void setSelectedService(Service selectedService) {
       this.selectedService = selectedService;
       private List<Service> services;
       public void createService()
       //implement your business logic here
       //log.info("createService.createService() action called with: #{createService.name}");
       //facesMessages.add("createService #{createService.name}");
       System.out.println("enregistrement du produit");
       if (this.selectedService != null) this.service.setParentService(selectedService);
       this.service = null;
       //add additional action methods
       public void find() {
       this.services = entityManager.createQuery("select c from Service c").getResultList();
       public Service getService() {
       return service;
       public void setService(Service service) {
       this.service = service;
       public List<Service> getServices() {
       return services;
       public void setServices(List<Service> services) {
       this.services = services;
       @Destroy @Remove
       public void destroy() {}

      hope someone had this problem already

      patching old version is such a pain, arghhh !!