Hi, I have a problem and I was not able to find any clue to resolve it.

I have an entity with composite Id called ProyectoEmpleado and a jsp 
(empleadoProyectoList.jsp) that lists ProyectoEmpleado by id 
(ProyectoEmpleadoId)
When struts 2 render this page it renders the url to call as: 

http://localhost:8080/editProyectoEmpleado.html?proyectoEmpleadoId=ProyectoEmpleadoId+[idCalificacion%3D-1%2C+idEmpleado%3D-1%2C+idProyecto%3D-1]

I was wondered how to set proyectoEmpleadoId in the action...

I have a property in the action called proyectoEmpleadoId and I get the next 
error message

Invalid field value for field "proyectoEmpleadoId"

How can I set the id parameter sent by displaytag to the Action? please help me

Thank you

*********

My code:

@Entity
public class ProyectoEmpleado extends BaseObject {

    private ProyectoEmpleadoId id;
    private CatCalificacion calificacion;

    @EmbeddedId
    public ProyectoEmpleadoId getId() {
        return id;
    }
    public void setId(ProyectoEmpleadoId id) {
        this.id = id;
    }

   ....
}

and it's Id

@Embeddable
public class ProyectoEmpleadoId extends BaseObject {
    private Long idProyecto;
    private Long idEmpleado;
    private Long idCalificacion;
}

empleadoProyectoList.jsp

....

<display:column property="proyecto.nombreProyecto" sortable="true" 
href="editProyectoEmpleado.html" media="html" 
        paramId="proyectoEmpleado.id" paramProperty="id" 
        titleKey="proyectoEmpleado.nombreProyecto" />
    <display:column property="proyecto.nombreProyecto" media="csv excel xml 
pdf" titleKey="proyectoEmpleadoList.title"/>

...

my action:

public class ProyectoEmpleadoAction extends BaseAction implements Preparable {
...
    private ProyectoEmpleado proyectoEmpleado;
    private ProyectoEmpleadoId proyectoEmpleadoId;

   
...
   // setters and getters for proyectoEmpleado and proyectoEmpleadoId
}
                                          
_________________________________________________________________
Descubre IE8 con Otto
 www.otto.com.mx

Reply via email to