You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Erik de Hair <er...@pocos.nl> on 2014/06/16 11:42:23 UTC

modifiable properties of derived property

Hi,

I have a class A that has a derived property referencing class B that has some properties. B's fields are all disabled when editing class A.

Is it possible to modify B's properties by delegating the setters of these properties to A by using modifyXXX-methods? I tried to do this but the fields are still disabled (with reason "always disabled").

Thanks,
Erik

Re: modifiable properties of derived property

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
On 24 June 2014 07:50, Erik de Hair <er...@pocos.nl> wrote:

> Hi Dan,
>
> This doesn't help. The checkbox is still disabled. No 'disabled' property
> in the json-layout for forcedOnPBX or on the derived class's properties.
>
>

> I'll try to isolate the problem. Maybe I'm missing something.
>
>
Perhaps.

As an experiment, I just added the following to the ToDoItem (as per the
quickstart archetype):

    @Optional
    public Boolean isForcedonPBX()
    {
        return isComplete();
    }
    public void setForcedonPBX(Boolean forcedonPBX)
    {
        setComplete(forcedonPBX);
    }


Seemed to work ok.

Try putting a breakpoint in InteractionUtils#isUsableResult, with a
condition on a non-null "disables" string.  That should help you figure out
which facet is making this disabled.

Dan




> Erik
> ________________________________________
> From: Dan Haywood [dan@haywood-associates.co.uk]
> Sent: Monday, June 16, 2014 12:45 PM
> To: users
> Subject: Re: modifiable properties of derived property
>
> Hi Erik,
>
> You need a setter on that property:
>
> public Boolean isForcedonPBX()
> {
>     return getMobileSubscriber().isForcedonPBX();
> }
> public void setForcedonPBX(Boolean forcedonPBX)
> {
>     getMobileSubscriber().setForcedonPBX(forcedonPBX);
> }
>
>
> It's the presence of the setter that hints to Isis that this is
> (effectively) a read/write property.  The modifyXxx method is only required
> if you want to do some additional logic over and above just calling the
> setter, eg:
>
> public void setForcedonPBX(Boolean forcedonPBX)
> {
>     setForcedonPBX(forcedonPBX);
>     // then some other stuff, if you had something else to do
> }
>
>
> Let us know if that sorts things out for you...
>
> Dan
>
>
>
>
>
> On 16 June 2014 11:36, Erik de Hair <er...@pocos.nl> wrote:
>
> >  Hi Oscar,
> >
> > I did what you said but this still doesn't enable the fields in the
> wicket
> > viewer. Is that what your proposed solution should do?
> >
> > My problem is not that my setter is not called after editing the entity.
> > I'm not able to edit the derived entity (properties) at all. Any other
> idea?
> >
> > Erik
> >
> >  ------------------------------
> > *From:* GESCONSULTOR - Óscar Bou [o.bou@gesconsultor.com]
> > *Sent:* Monday, June 16, 2014 12:21 PM
> >
> > *To:* users@isis.apache.org
> > *Subject:* Re: modifiable properties of derived property
> >
> >
> >  1. Once updated Isis to the latest snapshot,
> >
> >  2. try to inject the "WrapperFactory" service,
> >
> >  3. and then replace
> >
> >  public void modifyForcedonPBX(Boolean forcedonPBX)
> > {
> > getMobileSubscriber().setForcedonPBX(forcedonPBX);
> > }
> >
> >
> >  with
> >
> >  public void modifyForcedonPBX(Boolean forcedonPBX)
> > {
> >
> >
> wrapperFactory.wrapSkipRules(getMobileSubscriber()).setForcedonPBX(forcedonPBX);
> > }
> >
> >
> >
> >  HTH,
> >
> >  Oscar
> >
> >
> >
> >
> >
> > El 16/06/2014, a las 12:11, Erik de Hair <er...@pocos.nl> escribió:
> >
> > I'm not wrapping any object. This is what I have in my code:
> >
> > public Boolean isForcedonPBX()
> > {
> > return getMobileSubscriber().isForcedonPBX();
> > }
> > public void modifyForcedonPBX(Boolean forcedonPBX)
> > {
> > getMobileSubscriber().setForcedonPBX(forcedonPBX);
> > }
> >
> > The getMobileSubscriber() returns the derived object.
> >
> > I have no wrapping-methods available right now. Will do an update first.
> >
> > Thanks,
> > Erik
> > ________________________________________
> > From: GESCONSULTOR [o.bou@gesconsultor.com]
> > Sent: Monday, June 16, 2014 12:01 PM
> > To: users@isis.apache.org
> > Subject: Re: modifiable properties of derived property
> >
> > Hi Erik.
> >
> > Are you invoking the setter within a a wrapped call?
> >
> > If so, on the modifyXXX instead of "this.wrap(domainObjectB).setXXX"
> >
> > Try
> >
> > "this.wrapSkipRules(domainObjectB).setXXX"
> >
> > This will execute all business logic associated with the property
> > (validate, modify, etc) without taking into account if the field is
> hidden
> > or disabled.
> >
> > "wrapSkipRules" was introduced about a month ago or so, so perhaps you
> > will need to update Isis to the latest snapshot
> >
> > El 16/06/2014, a las 11:42, Erik de Hair <er...@pocos.nl> escribió:
> >
> > Hi,
> >
> > I have a class A that has a derived property referencing class B that has
> > some properties. B's fields are all disabled when editing class A.
> >
> > Is it possible to modify B's properties by delegating the setters of
> these
> > properties to A by using modifyXXX-methods? I tried to do this but the
> > fields are still disabled (with reason "always disabled").
> >
> > Thanks,
> > Erik
> >
> >
> >
> > Óscar Bou Bou
> > Responsable de Producto
> > Auditor Jefe de Certificación ISO 27001 en BSI
> > CISA, CRISC, APMG ISO 20000, ITIL-F
> >
> >     902 900 231 / 620 267 520
> >    http://www.twitter.com/oscarbou
> >
> >    http://es.linkedin.com/in/oscarbou
> >
> >    http://www.GesConsultor.com <http://www.gesconsultor.com/>
> >
> >
> >
> >  Este mensaje y los ficheros anexos son confidenciales. Los mismos
> > contienen información reservada que no puede ser difundida. Si usted ha
> > recibido este correo por error, tenga la amabilidad de eliminarlo de su
> > sistema y avisar al remitente mediante reenvío a su dirección
> electrónica;
> > no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.
> > Su dirección de correo electrónico junto a sus datos personales constan
> en
> > un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de
> > mantener el contacto con Ud. Si quiere saber de qué información
> disponemos
> > de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un
> > escrito al efecto, acompañado de una fotocopia de su D.N.I. a la
> siguiente
> > dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo -
> > 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015
> (Valencia).
> > Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos
> > adjuntos no contengan virus informáticos, y en caso que los tuvieran
> > eliminarlos.
> >
> >
> >
> >
> >
> >
>

RE: modifiable properties of derived property

Posted by Erik de Hair <er...@pocos.nl>.
Hi Dan,

This doesn't help. The checkbox is still disabled. No 'disabled' property in the json-layout for forcedOnPBX or on the derived class's properties.

I'll try to isolate the problem. Maybe I'm missing something.

Erik
________________________________________
From: Dan Haywood [dan@haywood-associates.co.uk]
Sent: Monday, June 16, 2014 12:45 PM
To: users
Subject: Re: modifiable properties of derived property

Hi Erik,

You need a setter on that property:

public Boolean isForcedonPBX()
{
    return getMobileSubscriber().isForcedonPBX();
}
public void setForcedonPBX(Boolean forcedonPBX)
{
    getMobileSubscriber().setForcedonPBX(forcedonPBX);
}


It's the presence of the setter that hints to Isis that this is
(effectively) a read/write property.  The modifyXxx method is only required
if you want to do some additional logic over and above just calling the
setter, eg:

public void setForcedonPBX(Boolean forcedonPBX)
{
    setForcedonPBX(forcedonPBX);
    // then some other stuff, if you had something else to do
}


Let us know if that sorts things out for you...

Dan





On 16 June 2014 11:36, Erik de Hair <er...@pocos.nl> wrote:

>  Hi Oscar,
>
> I did what you said but this still doesn't enable the fields in the wicket
> viewer. Is that what your proposed solution should do?
>
> My problem is not that my setter is not called after editing the entity.
> I'm not able to edit the derived entity (properties) at all. Any other idea?
>
> Erik
>
>  ------------------------------
> *From:* GESCONSULTOR - Óscar Bou [o.bou@gesconsultor.com]
> *Sent:* Monday, June 16, 2014 12:21 PM
>
> *To:* users@isis.apache.org
> *Subject:* Re: modifiable properties of derived property
>
>
>  1. Once updated Isis to the latest snapshot,
>
>  2. try to inject the "WrapperFactory" service,
>
>  3. and then replace
>
>  public void modifyForcedonPBX(Boolean forcedonPBX)
> {
> getMobileSubscriber().setForcedonPBX(forcedonPBX);
> }
>
>
>  with
>
>  public void modifyForcedonPBX(Boolean forcedonPBX)
> {
>
> wrapperFactory.wrapSkipRules(getMobileSubscriber()).setForcedonPBX(forcedonPBX);
> }
>
>
>
>  HTH,
>
>  Oscar
>
>
>
>
>
> El 16/06/2014, a las 12:11, Erik de Hair <er...@pocos.nl> escribió:
>
> I'm not wrapping any object. This is what I have in my code:
>
> public Boolean isForcedonPBX()
> {
> return getMobileSubscriber().isForcedonPBX();
> }
> public void modifyForcedonPBX(Boolean forcedonPBX)
> {
> getMobileSubscriber().setForcedonPBX(forcedonPBX);
> }
>
> The getMobileSubscriber() returns the derived object.
>
> I have no wrapping-methods available right now. Will do an update first.
>
> Thanks,
> Erik
> ________________________________________
> From: GESCONSULTOR [o.bou@gesconsultor.com]
> Sent: Monday, June 16, 2014 12:01 PM
> To: users@isis.apache.org
> Subject: Re: modifiable properties of derived property
>
> Hi Erik.
>
> Are you invoking the setter within a a wrapped call?
>
> If so, on the modifyXXX instead of "this.wrap(domainObjectB).setXXX"
>
> Try
>
> "this.wrapSkipRules(domainObjectB).setXXX"
>
> This will execute all business logic associated with the property
> (validate, modify, etc) without taking into account if the field is hidden
> or disabled.
>
> "wrapSkipRules" was introduced about a month ago or so, so perhaps you
> will need to update Isis to the latest snapshot
>
> El 16/06/2014, a las 11:42, Erik de Hair <er...@pocos.nl> escribió:
>
> Hi,
>
> I have a class A that has a derived property referencing class B that has
> some properties. B's fields are all disabled when editing class A.
>
> Is it possible to modify B's properties by delegating the setters of these
> properties to A by using modifyXXX-methods? I tried to do this but the
> fields are still disabled (with reason "always disabled").
>
> Thanks,
> Erik
>
>
>
> Óscar Bou Bou
> Responsable de Producto
> Auditor Jefe de Certificación ISO 27001 en BSI
> CISA, CRISC, APMG ISO 20000, ITIL-F
>
>     902 900 231 / 620 267 520
>    http://www.twitter.com/oscarbou
>
>    http://es.linkedin.com/in/oscarbou
>
>    http://www.GesConsultor.com <http://www.gesconsultor.com/>
>
>
>
>  Este mensaje y los ficheros anexos son confidenciales. Los mismos
> contienen información reservada que no puede ser difundida. Si usted ha
> recibido este correo por error, tenga la amabilidad de eliminarlo de su
> sistema y avisar al remitente mediante reenvío a su dirección electrónica;
> no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.
> Su dirección de correo electrónico junto a sus datos personales constan en
> un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de
> mantener el contacto con Ud. Si quiere saber de qué información disponemos
> de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un
> escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente
> dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo -
> 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia).
> Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos
> adjuntos no contengan virus informáticos, y en caso que los tuvieran
> eliminarlos.
>
>
>
>
>
>

Re: modifiable properties of derived property

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

You need a setter on that property:

public Boolean isForcedonPBX()
{
    return getMobileSubscriber().isForcedonPBX();
}
public void setForcedonPBX(Boolean forcedonPBX)
{
    getMobileSubscriber().setForcedonPBX(forcedonPBX);
}


It's the presence of the setter that hints to Isis that this is
(effectively) a read/write property.  The modifyXxx method is only required
if you want to do some additional logic over and above just calling the
setter, eg:

public void setForcedonPBX(Boolean forcedonPBX)
{
    setForcedonPBX(forcedonPBX);
    // then some other stuff, if you had something else to do
}


Let us know if that sorts things out for you...

Dan





On 16 June 2014 11:36, Erik de Hair <er...@pocos.nl> wrote:

>  Hi Oscar,
>
> I did what you said but this still doesn't enable the fields in the wicket
> viewer. Is that what your proposed solution should do?
>
> My problem is not that my setter is not called after editing the entity.
> I'm not able to edit the derived entity (properties) at all. Any other idea?
>
> Erik
>
>  ------------------------------
> *From:* GESCONSULTOR - Óscar Bou [o.bou@gesconsultor.com]
> *Sent:* Monday, June 16, 2014 12:21 PM
>
> *To:* users@isis.apache.org
> *Subject:* Re: modifiable properties of derived property
>
>
>  1. Once updated Isis to the latest snapshot,
>
>  2. try to inject the "WrapperFactory" service,
>
>  3. and then replace
>
>  public void modifyForcedonPBX(Boolean forcedonPBX)
> {
> getMobileSubscriber().setForcedonPBX(forcedonPBX);
> }
>
>
>  with
>
>  public void modifyForcedonPBX(Boolean forcedonPBX)
> {
>
> wrapperFactory.wrapSkipRules(getMobileSubscriber()).setForcedonPBX(forcedonPBX);
> }
>
>
>
>  HTH,
>
>  Oscar
>
>
>
>
>
> El 16/06/2014, a las 12:11, Erik de Hair <er...@pocos.nl> escribió:
>
> I'm not wrapping any object. This is what I have in my code:
>
> public Boolean isForcedonPBX()
> {
> return getMobileSubscriber().isForcedonPBX();
> }
> public void modifyForcedonPBX(Boolean forcedonPBX)
> {
> getMobileSubscriber().setForcedonPBX(forcedonPBX);
> }
>
> The getMobileSubscriber() returns the derived object.
>
> I have no wrapping-methods available right now. Will do an update first.
>
> Thanks,
> Erik
> ________________________________________
> From: GESCONSULTOR [o.bou@gesconsultor.com]
> Sent: Monday, June 16, 2014 12:01 PM
> To: users@isis.apache.org
> Subject: Re: modifiable properties of derived property
>
> Hi Erik.
>
> Are you invoking the setter within a a wrapped call?
>
> If so, on the modifyXXX instead of "this.wrap(domainObjectB).setXXX"
>
> Try
>
> "this.wrapSkipRules(domainObjectB).setXXX"
>
> This will execute all business logic associated with the property
> (validate, modify, etc) without taking into account if the field is hidden
> or disabled.
>
> "wrapSkipRules" was introduced about a month ago or so, so perhaps you
> will need to update Isis to the latest snapshot
>
> El 16/06/2014, a las 11:42, Erik de Hair <er...@pocos.nl> escribió:
>
> Hi,
>
> I have a class A that has a derived property referencing class B that has
> some properties. B's fields are all disabled when editing class A.
>
> Is it possible to modify B's properties by delegating the setters of these
> properties to A by using modifyXXX-methods? I tried to do this but the
> fields are still disabled (with reason "always disabled").
>
> Thanks,
> Erik
>
>
>
> Óscar Bou Bou
> Responsable de Producto
> Auditor Jefe de Certificación ISO 27001 en BSI
> CISA, CRISC, APMG ISO 20000, ITIL-F
>
>     902 900 231 / 620 267 520
>    http://www.twitter.com/oscarbou
>
>    http://es.linkedin.com/in/oscarbou
>
>    http://www.GesConsultor.com <http://www.gesconsultor.com/>
>
>
>
>  Este mensaje y los ficheros anexos son confidenciales. Los mismos
> contienen información reservada que no puede ser difundida. Si usted ha
> recibido este correo por error, tenga la amabilidad de eliminarlo de su
> sistema y avisar al remitente mediante reenvío a su dirección electrónica;
> no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.
> Su dirección de correo electrónico junto a sus datos personales constan en
> un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de
> mantener el contacto con Ud. Si quiere saber de qué información disponemos
> de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un
> escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente
> dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo -
> 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia).
> Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos
> adjuntos no contengan virus informáticos, y en caso que los tuvieran
> eliminarlos.
>
>
>
>
>
>

RE: modifiable properties of derived property

Posted by Erik de Hair <er...@pocos.nl>.
Hi Oscar,

I did what you said but this still doesn't enable the fields in the wicket viewer. Is that what your proposed solution should do?

My problem is not that my setter is not called after editing the entity. I'm not able to edit the derived entity (properties) at all. Any other idea?

Erik

________________________________
From: GESCONSULTOR - Óscar Bou [o.bou@gesconsultor.com]
Sent: Monday, June 16, 2014 12:21 PM
To: users@isis.apache.org
Subject: Re: modifiable properties of derived property


1. Once updated Isis to the latest snapshot,

2. try to inject the "WrapperFactory" service,

3. and then replace

public void modifyForcedonPBX(Boolean forcedonPBX)
{
getMobileSubscriber().setForcedonPBX(forcedonPBX);
}

with

public void modifyForcedonPBX(Boolean forcedonPBX)
{
wrapperFactory.wrapSkipRules(getMobileSubscriber()).setForcedonPBX(forcedonPBX);
}


HTH,

Oscar





El 16/06/2014, a las 12:11, Erik de Hair <er...@pocos.nl>> escribió:

I'm not wrapping any object. This is what I have in my code:

public Boolean isForcedonPBX()
{
return getMobileSubscriber().isForcedonPBX();
}
public void modifyForcedonPBX(Boolean forcedonPBX)
{
getMobileSubscriber().setForcedonPBX(forcedonPBX);
}

The getMobileSubscriber() returns the derived object.

I have no wrapping-methods available right now. Will do an update first.

Thanks,
Erik
________________________________________
From: GESCONSULTOR [o.bou@gesconsultor.com<ma...@gesconsultor.com>]
Sent: Monday, June 16, 2014 12:01 PM
To: users@isis.apache.org<ma...@isis.apache.org>
Subject: Re: modifiable properties of derived property

Hi Erik.

Are you invoking the setter within a a wrapped call?

If so, on the modifyXXX instead of "this.wrap(domainObjectB).setXXX"

Try

"this.wrapSkipRules(domainObjectB).setXXX"

This will execute all business logic associated with the property (validate, modify, etc) without taking into account if the field is hidden or disabled.

"wrapSkipRules" was introduced about a month ago or so, so perhaps you will need to update Isis to the latest snapshot

El 16/06/2014, a las 11:42, Erik de Hair <er...@pocos.nl>> escribió:

Hi,

I have a class A that has a derived property referencing class B that has some properties. B's fields are all disabled when editing class A.

Is it possible to modify B's properties by delegating the setters of these properties to A by using modifyXXX-methods? I tried to do this but the fields are still disabled (with reason "always disabled").

Thanks,
Erik


Óscar Bou Bou
Responsable de Producto
Auditor Jefe de Certificación ISO 27001 en BSI
CISA, CRISC, APMG ISO 20000, ITIL-F

[cid:4C38BF6A-D280-4C7F-BFC2-4285B2033897]   902 900 231 / 620 267 520
   http://www.twitter.com/oscarbou

[cid:DDC0BB1F-E0FC-4120-97F8-E2D5F0DA9BC5]   http://es.linkedin.com/in/oscarbou

[cid:F31E93E9-D0D0-4F96-9A7C-496F094117DC]   http://www.GesConsultor.com<http://www.gesconsultor.com/>

[cid:04E888F1-A5E9-49D1-832D-465FE2C6C940]


Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.
Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.






Re: modifiable properties of derived property

Posted by GESCONSULTOR - Óscar Bou <o....@gesconsultor.com>.
1. Once updated Isis to the latest snapshot, 

2. try to inject the "WrapperFactory" service,

3. and then replace 

> public void modifyForcedonPBX(Boolean forcedonPBX)
> 	{
> 		getMobileSubscriber().setForcedonPBX(forcedonPBX);
> 	}

with

> public void modifyForcedonPBX(Boolean forcedonPBX)
> 	{
> 		wrapperFactory.wrapSkipRules(getMobileSubscriber()).setForcedonPBX(forcedonPBX);
> 	}



HTH,

Oscar





El 16/06/2014, a las 12:11, Erik de Hair <er...@pocos.nl> escribió:

> I'm not wrapping any object. This is what I have in my code:
> 
> public Boolean isForcedonPBX()
> 	{
> 		return getMobileSubscriber().isForcedonPBX();
> 	}
> public void modifyForcedonPBX(Boolean forcedonPBX)
> 	{
> 		getMobileSubscriber().setForcedonPBX(forcedonPBX);
> 	}
> 
> The getMobileSubscriber() returns the derived object.
> 
> I have no wrapping-methods available right now. Will do an update first.
> 
> Thanks,
> Erik
> ________________________________________
> From: GESCONSULTOR [o.bou@gesconsultor.com]
> Sent: Monday, June 16, 2014 12:01 PM
> To: users@isis.apache.org
> Subject: Re: modifiable properties of derived property
> 
> Hi Erik.
> 
> Are you invoking the setter within a a wrapped call?
> 
> If so, on the modifyXXX instead of "this.wrap(domainObjectB).setXXX"
> 
> Try
> 
> "this.wrapSkipRules(domainObjectB).setXXX"
> 
> This will execute all business logic associated with the property (validate, modify, etc) without taking into account if the field is hidden or disabled.
> 
> "wrapSkipRules" was introduced about a month ago or so, so perhaps you will need to update Isis to the latest snapshot
> 
>> El 16/06/2014, a las 11:42, Erik de Hair <er...@pocos.nl> escribió:
>> 
>> Hi,
>> 
>> I have a class A that has a derived property referencing class B that has some properties. B's fields are all disabled when editing class A.
>> 
>> Is it possible to modify B's properties by delegating the setters of these properties to A by using modifyXXX-methods? I tried to do this but the fields are still disabled (with reason "always disabled").
>> 
>> Thanks,
>> Erik


Óscar Bou Bou
Responsable de Producto
Auditor Jefe de Certificación ISO 27001 en BSI
CISA, CRISC, APMG ISO 20000, ITIL-F

   902 900 231 / 620 267 520
   http://www.twitter.com/oscarbou

   http://es.linkedin.com/in/oscarbou

   http://www.GesConsultor.com 




Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.
Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.






RE: modifiable properties of derived property

Posted by Erik de Hair <er...@pocos.nl>.
I'm not wrapping any object. This is what I have in my code:

public Boolean isForcedonPBX()
	{
		return getMobileSubscriber().isForcedonPBX();
	}
public void modifyForcedonPBX(Boolean forcedonPBX)
	{
		getMobileSubscriber().setForcedonPBX(forcedonPBX);
	}

The getMobileSubscriber() returns the derived object.

I have no wrapping-methods available right now. Will do an update first.

Thanks,
Erik
________________________________________
From: GESCONSULTOR [o.bou@gesconsultor.com]
Sent: Monday, June 16, 2014 12:01 PM
To: users@isis.apache.org
Subject: Re: modifiable properties of derived property

Hi Erik.

Are you invoking the setter within a a wrapped call?

If so, on the modifyXXX instead of "this.wrap(domainObjectB).setXXX"

Try

"this.wrapSkipRules(domainObjectB).setXXX"

This will execute all business logic associated with the property (validate, modify, etc) without taking into account if the field is hidden or disabled.

"wrapSkipRules" was introduced about a month ago or so, so perhaps you will need to update Isis to the latest snapshot

> El 16/06/2014, a las 11:42, Erik de Hair <er...@pocos.nl> escribió:
>
> Hi,
>
> I have a class A that has a derived property referencing class B that has some properties. B's fields are all disabled when editing class A.
>
> Is it possible to modify B's properties by delegating the setters of these properties to A by using modifyXXX-methods? I tried to do this but the fields are still disabled (with reason "always disabled").
>
> Thanks,
> Erik

Re: modifiable properties of derived property

Posted by GESCONSULTOR <o....@gesconsultor.com>.
Hi Erik.

Are you invoking the setter within a a wrapped call? 

If so, on the modifyXXX instead of "this.wrap(domainObjectB).setXXX" 

Try

"this.wrapSkipRules(domainObjectB).setXXX" 

This will execute all business logic associated with the property (validate, modify, etc) without taking into account if the field is hidden or disabled.

"wrapSkipRules" was introduced about a month ago or so, so perhaps you will need to update Isis to the latest snapshot

> El 16/06/2014, a las 11:42, Erik de Hair <er...@pocos.nl> escribió:
> 
> Hi,
> 
> I have a class A that has a derived property referencing class B that has some properties. B's fields are all disabled when editing class A.
> 
> Is it possible to modify B's properties by delegating the setters of these properties to A by using modifyXXX-methods? I tried to do this but the fields are still disabled (with reason "always disabled").
> 
> Thanks,
> Erik