• 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
Re: NPE at at er.modern.directtoweb.components.buttons.ERMDRemoveRelatedButton.showRemoveButton(ERMDRemoveRelatedButton.java:197) with isEntityDeletable=false
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NPE at at er.modern.directtoweb.components.buttons.ERMDRemoveRelatedButton.showRemoveButton(ERMDRemoveRelatedButton.java:197) with isEntityDeletable=false


  • Subject: Re: NPE at at er.modern.directtoweb.components.buttons.ERMDRemoveRelatedButton.showRemoveButton(ERMDRemoveRelatedButton.java:197) with isEntityDeletable=false
  • From: David LeBer <email@hidden>
  • Date: Thu, 23 Dec 2010 12:15:09 -0500

On 2010-12-23, at 12:09 PM, Johan Henselmans wrote:

> Just to warn some people that might get caught in the same corner.
>
> I was happily testing rules on NavigationMenu.plists and a new DateTimePicker component, when I got at strange message when I tried to edit a relation from an entity.
>
> The thing was a n-1 relation, nothing special (a location where a performance might take place). When I tried to select a location, the ModernDirectToWeb would crash.
>
> I first thought it had to do with some error in the EOModel, and noticed that there were a lot of the properties of the Location entity flagged as being part of a client class. Removed them, no dice. To make a few hours search short (like completely rebuilding the app with the navigation menu stripped etc.  I found out what is was.
>
> I had set up a rule
> if session.isAdmin => isEntityDeletable= true,
> and the accompanying rule
> true=> isEntityDeletable=false
>
> As I was trying to replace this stuff with a role based structure, I had all forgotten about it, and the session.isAdmin was disabled, so nothing should be deletable.
>
> When I enabled
> isEntityDeletable=true
>
> the crashes stopped.
>
> Apparently, if you have an entity that can be created and where relations can be created, then ERModernDirectToWeb assumes that it should also be able to remove these relations, and that collided with the isEntityDeletable rule.


Patches welcome.

;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site: 	http://codeferous.com
blog: 	http://davidleber.net
profile:	http://www.linkedin.com/in/davidleber
twitter:	http://twitter.com/rebeld
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org




 _______________________________________________
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

References: 
 >NPE at at er.modern.directtoweb.components.buttons.ERMDRemoveRelatedButton.showRemoveButton(ERMDRemoveRelatedButton.java:197) with isEntityDeletable=false (From: Johan Henselmans <email@hidden>)

  • Prev by Date: NPE at at er.modern.directtoweb.components.buttons.ERMDRemoveRelatedButton.showRemoveButton(ERMDRemoveRelatedButton.java:197) with isEntityDeletable=false
  • Next by Date: Re: how to advance my WOKnowledge
  • Previous by thread: NPE at at er.modern.directtoweb.components.buttons.ERMDRemoveRelatedButton.showRemoveButton(ERMDRemoveRelatedButton.java:197) with isEntityDeletable=false
  • Next by thread: Trying to build a ModernLook DateTimePicker: JQuery and Prototype together?
  • Index(es):
    • Date
    • Thread