Re: Condition for showing DeleteButton in a ListPage
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