• 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: Inline bindings and WOConditional
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inline bindings and WOConditional


  • Subject: Re: Inline bindings and WOConditional
  • From: Jean-Francois Veillette <email@hidden>
  • Date: Fri, 19 Feb 2010 22:53:55 -0500

In principle, all @ key will be handled by the nsarray class, so you could try member.organizationProfiles.@isEmpty and see if it work.

- jfv

Le 10-02-19 à 22:46, Pascal Robert a écrit :

I'm trying to hide some text if an array is empty, so I tried this :

 <wo:WOConditional condition = "$member.organizationProfiles.isEmpty">

But I'm getting :

<org.wocommunity.logic.eof.OrganizationProfile 0x40964823> valueForKey(): lookup of unknown key: 'isEmpty'. This class does not have an instance variable of the name isEmpty or _isEmpty, nor a method of the name isEmpty, _isEmpty, getIsEmpty, or _getIsEmpty

Why it's trying to find isEmpty on a OrganizationProfile instead of the array (which is populated with OrganizationProfile objects)? So far, the only way I found to check if it's empty with non-Java code was with :

OrgsProCondition : WOConditional {
 condition = member.organizationsProfiles.@count > 0;
 negate = true;
}

I also tried with :

<wo:WOConditional condition = "$member.organizationProfiles.@count > 0">

But I get a "has a quote left open", and using &gt; didn't help.


_______________________________________________ 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


  • Follow-Ups:
    • Re: Inline bindings and WOConditional
      • From: Pascal Robert <email@hidden>
References: 
 >Inline bindings and WOConditional (From: Pascal Robert <email@hidden>)

  • Prev by Date: Inline bindings and WOConditional
  • Next by Date: Re: Inline bindings and WOConditional
  • Previous by thread: Inline bindings and WOConditional
  • Next by thread: Re: Inline bindings and WOConditional
  • Index(es):
    • Date
    • Thread