You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Ezequiel Celiz <el...@gmail.com> on 2013/10/24 05:05:38 UTC

validatePropertyName

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

Re: validatePropertyName

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
On 29 October 2013 16:32, Ezequiel Celiz <el...@gmail.com> wrote:

> Precisely, I'm using version 1.2.0.
>

good, so hopefully with v1.3.0 everything will be ok.


By the way, on the published site [4],
> I think there is an error in archetypeVersion = 1.0.3 \ ... because in this
> case the core of isis version is 1.2.0, but if I change the
> archetypeVersion = 1.3.0,
> now shows the core version 1.3.0 in the pom.xml
>
> Perhaps this wrong?
>

Yes, that was wrong.  Now fixed.  Thanks for pointing it out.

The release matrix [5] shows the correlation between the archetype versions
and the isis core versions etc.  v1.3.0 of the archetype is the correct one
to used.

Cheers
Dan


[5] http://isis.apache.org/release-matrix.html

Re: validatePropertyName

Posted by Ezequiel Celiz <el...@gmail.com>.
Precisely, I'm using version 1.2.0.
By the way, on the published site [4],
I think there is an error in archetypeVersion = 1.0.3 \ ... because in this
case the core of isis version is 1.2.0, but if I change the
archetypeVersion = 1.3.0,
now shows the core version 1.3.0 in the pom.xml

Perhaps this wrong?

Thanks for your interest Dan!

regards

[4] http://isis.apache.org/getting-started/quickstart-archetype.html


2013/10/29 Dan Haywood <da...@haywood-associates.co.uk>

> Hi Ezequiel,
>
> thanks for uploading the screenshot, it helps.
>
> Can you tell me which version you are on?  I ask because seems to be
> working okay in v1.3.0 (released last week), so I wonder if you are on an
> older version.
>
> Perhaps you could also try out running the ToDo app
> (examples/application/quickstart_wicket_restful_jdo/
>
> ... as you can see that there's a similar validation on the dueBy property
> [2], and as screenshot [3] shows, it seems to be working ok.
>
> Thx
> Dan
>
> [2]
>
> https://github.com/apache/isis/blob/master/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItem.java#L184
> [3] http://danhaywood.com/?attachment_id=1220
>
>
>
>
>
> On 25 October 2013 14:18, Ezequiel Celiz <el...@gmail.com> wrote:
>
> > 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 <da...@haywood-associates.co.uk>
> >
> > > Is this in Wicket viewer, Ezequiel?
> > >
> > > Perhaps you could upload a screenshot somewhere?
> > >
> > > Cheers
> > >
> > > On 24 October 2013 04:05, Ezequiel Celiz <el...@gmail.com> 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
> > > >
> > >
> >
>

Re: validatePropertyName

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Hi Ezequiel,

thanks for uploading the screenshot, it helps.

Can you tell me which version you are on?  I ask because seems to be
working okay in v1.3.0 (released last week), so I wonder if you are on an
older version.

Perhaps you could also try out running the ToDo app
(examples/application/quickstart_wicket_restful_jdo/

... as you can see that there's a similar validation on the dueBy property
[2], and as screenshot [3] shows, it seems to be working ok.

Thx
Dan

[2]
https://github.com/apache/isis/blob/master/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItem.java#L184
[3] http://danhaywood.com/?attachment_id=1220





On 25 October 2013 14:18, Ezequiel Celiz <el...@gmail.com> wrote:

> 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 <da...@haywood-associates.co.uk>
>
> > Is this in Wicket viewer, Ezequiel?
> >
> > Perhaps you could upload a screenshot somewhere?
> >
> > Cheers
> >
> > On 24 October 2013 04:05, Ezequiel Celiz <el...@gmail.com> 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
> > >
> >
>

Re: validatePropertyName

Posted by Ezequiel Celiz <el...@gmail.com>.
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 <da...@haywood-associates.co.uk>

> Is this in Wicket viewer, Ezequiel?
>
> Perhaps you could upload a screenshot somewhere?
>
> Cheers
>
> On 24 October 2013 04:05, Ezequiel Celiz <el...@gmail.com> 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
> >
>

Re: validatePropertyName

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Is this in Wicket viewer, Ezequiel?

Perhaps you could upload a screenshot somewhere?

Cheers

On 24 October 2013 04:05, Ezequiel Celiz <el...@gmail.com> 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
>