On 24 June 2014 07:50, Erik de Hair <[email protected]> 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 [[email protected]]
> 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 <[email protected]> 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 [[email protected]]
> > *Sent:* Monday, June 16, 2014 12:21 PM
> >
> > *To:* [email protected]
> > *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 <[email protected]> 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 [[email protected]]
> > Sent: Monday, June 16, 2014 12:01 PM
> > To: [email protected]
> > 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 <[email protected]> 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.
> >
> >
> >
> >
> >
> >
>