Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

188
Vistas
Spring MVC AutoPopulatingList error

I'm creating a form with "add row" items and used AutoPopulatingList for spring. I started with the basic with just one row.

I have model:

ContractEntitlement.java

public class ContractEntitlement {

    private String category;

    getter and setter ....
}

I created a form class for the AutoPopulatingList:

CreateForm.java

@Entity
public class CreateForm {

    private AutoPopulatingList contractEntitlements;

    public AutoPopulatingList getContractEntitlements() {
        return contractEntitlements;
    }
    public void setContractEntitlements(AutoPopulatingList contractEntitlements) {
        this.contractEntitlements = contractEntitlements;
    }
}

For my controller:

CreateController.java

@RequestMapping(value = "/create", method = RequestMethod.GET)
public String createForm(Model model) {

    CreateForm createForm = new CreateForm();

//      CreateForm sbf = new CreateForm(); 
//      //sbf.getContractEntitlements().add(new ContractEntitlement());
//      sbf.setContractEntitlements(new 
//        AutoPopulatingList(ContractEntitlement.class)); 
    return "create";
}    

For my jsp

Create.jsp

    <spring:bind path="createForm.contractEntitlements[0].category">
                <form:input path="${status.expression}" size="40" />
    </spring:bind>

Notice in my controller I have commented out a few line of codes as I was testing to see which one works but all fails and I'm getting this error:

org.springframework.beans.NotReadablePropertyException: Invalid property 'contractEntitlement' of bean class [com.at.ccts.model.CreateForm]: Bean property 'contractEntitlement' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?

If I use this in my controller

CreateForm sbf = new CreateForm(); 
    sbf.setContractEntitlements(new 
AutoPopulatingList(ContractEntitlement.class)); 

Error:

ERROR: org.springframework.web.servlet.tags.form.InputTag - Invalid property 'contractEntitlement' of bean class [com.at.ccts.model.CreateForm]: Bean property 'contractEntitlement' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?

Am I missing something? Any ideas what causes the error?

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda