• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Q about ERModernLook and embedded lists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Q about ERModernLook and embedded lists


  • Subject: Q about ERModernLook and embedded lists
  • From: Philippe Rabier <email@hidden>
  • Date: Fri, 04 Nov 2011 23:54:41 +0100

Hi all,

One week ago before knowing the list server outage, I sent the following email which was never sent. And the solution below.
(if you want to read my question quickly go to the end)

The email I sent: 
--------------------------------------------
I have 2 entities:
- Client (company)
- User

There are 2 relationships between User and Client
- a toOne called employer (a user has only one employer)
- a Many2Many called contractors where a user can work for different Client

There is an edit page for the Client entity (template name: ERMODTabInspectPage, page configuration name: EditNOClient) with 3 tabs:
- address informations
- users
- contractors

I have several issues to customize the users list and the contractors list because both have:
- the same parent page configuration (EditNOClient)
- the same page configuration (EditRelationshipEmbeddedNOUser)

I would like to customize the list of attributes, let the New button for the users list but remove it for the contractors list, …

I tried (but didn't believe it would work) to play withe the relationship name like:
(pageConfiguration = 'EditRelationshipEmbeddedNOUser' and parentPageConfiguration = 'EditNOClient' and propertyKey = 'users') -> RHS

But this propertyKey is unknown at this level.

So if you have any clue to share, I would be very happy.
--------------------------------------------

Since that day, I found that the object who handles the configuration page name was an instance of ERMDDefaultConfigurationNameAssignment.

So I create a subclass, MyMDDefaultConfigurationNameAssignment and put this kind of code:


public Object editRelationshipEmbeddedConfigurationName(final D2WContext c) 
    {
     Object result = super.editRelationshipEmbeddedConfigurationName(c) + configurationPageSuffix(c);
     return result;
    }

ou super. editRelationshipEmbeddedConfigurationName corresond a ca :

    public Object editRelationshipEmbeddedConfigurationName(D2WContext c) {
     return "EditRelationshipEmbedded" + entityNameForContext(c);
    }

et configurationPageSuffix est :
    private String configurationPageSuffix(final D2WContext c)
    {
        String pageSuffix = (String)c.valueForKey("configurationPageSuffix");
return pageSuffix != null ? pageSuffix : "";
    }

I changed the rules accordingly and it works great

My question:
No I have a last question. When I click on the Delete button, I get 3 options:
- delete
- remove from relationShip
- cancel

What I want is to remove the delete action but I didn't know how? 

My suggestion:
Do you think any interest to modify ERMDDefaultConfigurationNameAssignment and add the method  configurationPageSuffix as I did in my own class?

Thanks,

Philippe

 _______________________________________________
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

  • Follow-Ups:
    • Re: Q about ERModernLook and embedded lists
      • From: David Holt <email@hidden>
  • Prev by Date: Re: Migration Issue with 0 level migration
  • Next by Date: Re: Q about ERModernLook and embedded lists
  • Previous by thread: Re: Migration Issue with 0 level migration and ERAttachement
  • Next by thread: Re: Q about ERModernLook and embedded lists
  • Index(es):
    • Date
    • Thread