• 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: Condition for showing DeleteButton in a ListPage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Condition for showing DeleteButton in a ListPage


  • Subject: Re: Condition for showing DeleteButton in a ListPage
  • From: Fabian Peters <email@hidden>
  • Date: Mon, 08 Apr 2019 18:37:28 +0200

Hi Savas,

That rule gets evaluated only once and the result is cached. The easiest way to
get what you want is probably to drop the rule and implement the
ERXGuardedObjectInterface, e.g.:

public boolean canDelete() {
   return "cantBeDeleted".equals(status()) ? false : true;
}

Or you may want to use an er.directtoweb.ERDDelayedKeyValueAssignment to avoid
the caching behaviour. But that'll require an additional rule if I'm not
mistaken.

Fabian

> Am 08.04.2019 um 18:19 schrieb Savas Celik <email@hidden>:
>
> How can I make the Key: isEntityDeletable true or false depending on the
> objects status?
>
> for example:      100 : (pageConfiguration = 'ListUser' and object.status =
> “cantBeDeleted") => isEntityDeletable = “false"
> [com.webobjects.directtoweb.Assignment]
>
> This should make every User delete able except the once with the status =
> “cantBeDeleted”. But it does not work, it only applies it for the first item
> in the List.
>
> Savas
> _______________________________________________
> 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

References: 
 >Condition for showing DeleteButton in a ListPage (From: Savas Celik <email@hidden>)

  • Prev by Date: Condition for showing DeleteButton in a ListPage
  • Next by Date: Re: Condition for showing DeleteButton in a ListPage
  • Previous by thread: Condition for showing DeleteButton in a ListPage
  • Next by thread: Re: Condition for showing DeleteButton in a ListPage
  • Index(es):
    • Date
    • Thread