0

Is there a way to add a loupe field in finders? I trying with this finder form with loupefield:

<form:find id="fc_org_po_dominio_Carga" finderName="ByUnidadmotor"
    path="/cargas/reports/reporte_rendimientoxplacaPeriodo/genera?size=${empty param.size ? 10 : param.size}&amp;command=0" 
    render="${empty dependencies}" z="user-managed">
   <loupefield:loupe 
       additionalFields="placas,modelovehiculo,areaadscrita" 
       caption="placas" controllerPath="cargas" 
       field="unidadmotor" disableFormBinding="true"
       id="c_org_pgjeo_dominio_Carga_unidadmotor" 
       itemValue="id" items="${vehiculoes}"
       listPath="vehiculoes/list" mode="create" 
       path="/vehiculoes" pkField="id" z="user-managed"/>
 </form:find>

But I got this error:

org.springframework.beans.NotReadablePropertyException: Invalid property 'unidadmotor' of bean class [java.lang.String]: Bean property 'unidadmotor' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?

For example in petclinic online: http://geo-gvnix.rhcloud.com/pets?find=ByOwner&form&page=1&size=10 would be desirable have a loupefield when looking for a owner instead of the select field.

any hint?

jmvivo
  • 2,653
  • 1
  • 16
  • 20
Ezequiel Hdez.
  • 144
  • 1
  • 3

1 Answers1

0

After a few hours I could add a loupefield in a finder form, I realize is necessary include in the uiModel the "command" attribute, this attribute of the model must have the property of the loupefield to search, for example:

uiModel.addAttribute("command", new Entidad());

I added this attribute and the finder work seamlessly!

Ezequiel Hdez.
  • 144
  • 1
  • 3