Mailing List webobjects-dev@wocommunity.org Message #274
From: Walter Lo Nigro <webobjects-dev@wocommunity.org>
Subject: Re: [WO-DEV] Re: Custom WOComponent "not seeing" D2W entity attributes in Inspect page
Date: Thu, 7 Oct 2021 19:12:17 +0200
To: WebObjects & WOnder Development <webobjects-dev@wocommunity.org>
Signed Data (Text SHA1)
Thank you Tyler, that’s interesting, but I’m not sure it would solve my problem… I’ll try to be more specific:

I have several related entities, of which the following are relevant: Registro, Docente, Classe, Lezione, Annoaccademico

Classe has a to-one relationship with Docente and a to-one relationship with Annoaccademico
Fetch specification: “FetchClassiDocenteInAnnoAccademico” with qualifier 'docente = $doc and annoAccademico = $annoAcc’

Lezione has a to-many relationship with Classe named ‘classi’ and a to-one relationship with Docente
Fetch specification: “FetchLezioniDocenteInAnnoAccademico” with qualifier 'classi.annoAccademico = $annoAcc and docente = $doc'

Registro has two to-one relationships: > Annoaccademico and > Docente

Now, I have created a WOComponent which extends AjaxGrid to be used in an InspectRegistro pageConfiguration and should be able to use those fetch specs, but…

Where is the correct place to set/bind the two variables $doc (should be Registro.docente()) and $annoAcc (should be Registro.annoAccademico()) ???

Thanks again
Walter


***  Walter Lo Nigro, Trieste, Italy  -  http://www.wln.it  ***
***  Choral Activities, "G. Tartini" Conservatory, Trieste  ***
***  Freelance conductor, RiscOS/ROOL registered developer  ***

Il giorno 07 ott 2021, alle ore 18:17, Jesse Tayler <webobjects-dev@wocommunity.org> ha scritto:

You can read the whole model, not sure where your query strings are there, and I might just put those into your D2W rules myself.

You can write rules that reach a session or session.user and write “(session.user.role = '%@' && active = ‘true')” or something using keys that are dynamically filled at runtime -- so your logic can include both query args and format in rules.

I have components that read an array of args from D2W and then a format string and the query just comes out and fills the list. I can adjust my D2W rules and see the sort orderings or batch settings and adjust the qualifier all in rules

Maybe that helps

On Oct 7, 2021, at 11:23 AM, Walter Lo Nigro <webobjects-dev@wocommunity.org> wrote:

Dear Listers,

Another (probably stupid) question for you…

In my D2W Wonder app I have an entity ‘Registro’ and set the InspectRegistro page to display a userPresentableDescription attribute. I have created a custom WOComponent called ‘RegistroDocente’ to display this attribute, basically extending AjaxGrid. I have obviusly set the relevant rule in d2w.d2wmodel and so far so good but...

I have also defined some fetch specifications in my EOModeler which use some $variables, and here’s the problem: I cannot find a way to get the RegistroDocente component to get hold of attributes in entity Registro, and I need them to get the fetch specifications working.

Am I supposed to bind these attributes/variables somewhere? Is there a specific EOEditingContext I must use for this? I am stunned :-/

Thank you for helping
Walter

***  Walter Lo Nigro, Trieste, Italy  -  http://www.wln.it  ***
***  Choral Activities, "G. Tartini" Conservatory, Trieste  ***
***  Freelance conductor, RiscOS/ROOL registered developer  ***



Content Unaltered as verified By:
presented certificate is issued by an unknown authority: <walter@lonigro.net>
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster