• 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: bug : nullablePropertyKeys won't work with an array as a property...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug : nullablePropertyKeys won't work with an array as a property...


  • Subject: Re: bug : nullablePropertyKeys won't work with an array as a property...
  • From: Farrukh Ijaz <email@hidden>
  • Date: Wed, 08 Feb 2012 15:13:08 +0300

Hi James,

In practice you should use either d2wContext.setDynamicPage(...) or d2wContext.setEntity(...) and d2wContext.setTask(...) methods prior to call d2wContext.valueForKey(...).

Farrukh

On 2012-02-07, at 11:24 PM, James Cicenia wrote:

Here is the code:

        if (null == _nullablePropertyKeys) {
            NSMutableArray array = new NSMutableArray();
            String preKey = propertyKey();
            D2WContext d2wContext = d2wContext();
            for (Enumeration keysEnum = displayPropertyKeys().objectEnumerator(); keysEnum.hasMoreElements();) {
                String key = (String)keysEnum.nextElement();
                setPropertyKey(key);

                Object isMandatory = d2wContext.valueForKey("isMandatory");
                if (isMandatory != null && !ERXValueUtilities.booleanValue(isMandatory)) {
                    array.addObject(key);
                }
            }
            _nullablePropertyKeys = array;
            setPropertyKey(preKey); // Restore the property key.
        }
        return _nullablePropertyKeys;
    }


Since it brings back all property keys... it doesn't work with Grouped/Tabbed/Sectioned property lists as those are arrays.


- James
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
  • Prev by Date: handling D2W rules
  • Next by Date: ERD2WMultiItemCustomComponent and CSS
  • Previous by thread: Re: handling D2W rules
  • Next by thread: Re: bug : nullablePropertyKeys won't work with an array as a property...
  • Index(es):
    • Date
    • Thread