Ok, Dan
the screenshot of the Domain Object (OBJECT FORM) in the Wicket viewer [1]
the validation code:
private int pax;
@Named("Personas")
public int getPax() {
return pax;
}
public void setPax(int pax) {
this.pax = pax;
}
public String validatePax(int personas){
return mayorPaxPermitido(personas) ? null : "El nĂºmero de personas es
mayor al permitido";
}
private boolean mayorPaxPermitido(int personas) {
if((getTipoHabitacion() == TipoHabitacion.Doble) && (personas > 2)) {
return false;
}
if((getTipoHabitacion() == TipoHabitacion.Triple) && (personas > 3)) {
return false;
}
if((getTipoHabitacion() == TipoHabitacion.Cuadruple) && (personas > 4)) {
return false;
}
return true;
}
[1] http://www.subeimagenes.com/img/invalid-properties-765048.html
2013/10/25 Dan Haywood <[email protected]>
> Is this in Wicket viewer, Ezequiel?
>
> Perhaps you could upload a screenshot somewhere?
>
> Cheers
>
> On 24 October 2013 04:05, Ezequiel Celiz <[email protected]> wrote:
>
> > Hi Folks
> >
> > When I try to validate a property, the framework does not return the
> > specific text from
> > validatePropertyName (PropertyType param) {... }
> >
> > It works fine, but the feedback just shows:
> >
> > Invalid properties: "Property"
> >
> > Is there any way to fix it?
> >
> > Regards
> > Ezequiel
> >
>