Re: Tabs in ERMODTabInspectPage not showing
Re: Tabs in ERMODTabInspectPage not showing
- Subject: Re: Tabs in ERMODTabInspectPage not showing
- From: Fabian Peters <email@hidden>
- Date: Mon, 05 May 2014 20:18:38 +0200
Does isOrganization get called? Once you've checked that it does, you could try to put "isOrganization = 0" on the first rule, to see whether that makes a difference. The "*Delayed*" assignments shouldn't make a difference here.
I've found changing of tabSectionsContents to be a tricky business, as they tend to get cached.
If the rules don't get fired as expected, then you need to trace them:
log4j.logger.er.directtoweb.rules.ERD2WTraceRuleFiringEnabled=DEBUG
log4j.logger.er.directtoweb.rules.tabSectionsContents=DEBUG
log4j.logger.er.directtoweb.rules.tabSectionsContents.candidates=DEBUG
log4j.logger.er.directtoweb.rules.tabSectionsContents.fire=DEBUG
Fabian
Am 05.05.2014 um 19:16 schrieb Ângelo Andrade Cirino <email@hidden>:
> Hi Fabian,
>
> In terms of rules, what I intend to implement is the following:
>
> 90 : (pageConfiguration = 'EditParty' or pageConfiguration = 'InspectParty') => tabSectionsContents = ("[Status]", "status", "created", "lastModified", "notes", "[PersonData]", "person.firstName", "person.lastName", "person.birthDate", "[PostalAdresses]", "[Emails]", "[Phones]") [com.webobjects.directtoweb.Assignment]
> 100 : ((pageConfiguration = 'EditParty' or pageConfiguration = 'InspectParty') and object.isOrganization = 1) => tabSectionsContents = ("[Status]", "status", "created", "lastModified", "notes", "[OrganizationData]", "organization.name", "[PostalAdresses]", "[Emails]", "[Phones]") [com.webobjects.directtoweb.Assignment]
>
> But the rule with "object.isOrganization = 1" doesn't work. I am still looking for a solution that doesn't need changing the code, a solution that relies only on the viewer, respecting the MVC paradigm. Perhaps "ERDDelayedSwitchAssignment" is what I am looking for.
>
> Ângelop
>
>
> 2014-05-05 10:51 GMT-03:00 Fabian Peters <email@hidden>:
> Hi Ângelo,
>
> For some reason I never use tabSectionsContents, only displayPropertyKeys in the first format "(('Tab1', 'foo', …), ('Tab2', 'bar', …))". But your syntax looks fine in all variants. However, the "isPerson" condition looks suspicious to me. Are you sure it behaves as you expect? I assume it's a key on the EO, so it should be "object.isPerson".
>
> Fabian
>
> Am 04.05.2014 um 20:41 schrieb Ângelo Andrade Cirino <email@hidden>:
>
> > Hi,
> >
> > I have used tabs in subtasks for editing entities in the past without problems. Now I can't figure out why my rules below don't work:
> >
> > 100 : ((pageConfiguration = 'EditParty' or pageConfiguration = 'InspectParty') and isPerson = 1) => subTask = "tab" [com.webobjects.directtoweb.Assignment]
> > 100 : ((pageConfiguration = 'EditParty' or pageConfiguration = 'InspectParty') and isPerson = 1) => tabSectionsContents = (("Status", "status", "created", "lastModified", "notes"), ("PersonData", "person.firstName", "person.lastName", "person.birthDate")) [com.webobjects.directtoweb.Assignment]
> > 100 : ((pageConfiguration = 'EditParty' or pageConfiguration = 'InspectParty') and isPerson = 1) => tabSectionsContents = ("(Status)", "status", "created", "lastModified", "notes", "(PersonData)", "person.firstName", "person.lastName", "person.birthDate") [com.webobjects.directtoweb.Assignment]
> > 100 : ((pageConfiguration = 'EditParty' or pageConfiguration = 'InspectParty') and isPerson = 1) => tabSectionsContents = ("[Status]", "status", "created", "lastModified", "notes", "[PersonData]", "person.firstName", "person.lastName", "person.birthDate") [com.webobjects.directtoweb.Assignment]
> >
> > Only one of the three tabSectionsContents is active at once, because I wanted to try the three configurations, but none is displayed. If I turn on the following rule
> >
> > 100 : ((pageConfiguration = 'EditParty' or pageConfiguration = 'InspectParty') and isPerson = 1) => displayPropertyKeys = ("[Status]", "status", "created", "lastModified", "notes", "[PersonData]", "person.firstName", "person.lastName", "person.birthDate") [com.webobjects.directtoweb.Assignment]
> >
> > D2W will throw an exception:
> >
> > UnknownKeyException: <models.Party 0x6bda6308> valueForKey(): lookup of unknown key: '[Status]'.
> > This class does not have an instance variable of the name [Status] or _[Status], nor a method of the name [Status], _[Status], get[Status], or _get[Status]
> >
> > By the way, to show only the attributes I want I had to set up this rule:
> >
> > 100 : ((pageConfiguration = 'EditParty' or pageConfiguration = 'InspectParty') and isPerson = 1) => displayPropertyKeys = ("status", "created", "lastModified", "notes", "person.firstName", "person.lastName", "person.birthDate") [com.webobjects.directtoweb.Assignment]
> >
> > because the other rules won't work.
> >
> > Here is a screen capture showing that it is apparently well configured:
> >
> >
> >
> > Thanks for any help,
> >
> > Ângelo
> > _______________________________________________
> > Do not post admin requests to the list. They will be ignored.
> > Webobjects-dev mailing list (email@hidden)
> > Help/Unsubscribe/Update your Subscription:
> >
> > This email sent to email@hidden
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden