• 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: KeyValueConditional
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: KeyValueConditional


  • Subject: Re: KeyValueConditional
  • From: Ramsey Lee Gurley <email@hidden>
  • Date: Mon, 07 Sep 2009 20:09:02 -0400

You can do one of two things...  Either 1) add

//VALID

after the value = "$application.statics.SomeClass.CONSTANT" part or 2) add ^application\.statics\..* to your binding validation rules if you anticipate using the application.statics key path frequently

PNG image


On Sep 7, 2009, at 6:03 PM, Chan Yeow Heong, Jerome wrote:

Thanks but how do I get past this error. I added in a State class in the registration process.

There is no key 'State' for the keypath 'application.statics' in UserAdministration UserAdministration.html Beta/Components/pages/ UserAdministration.wo line 13 WebObjects Template Problems

The modified App still runs, I verified this by printing a new welcome message on the console.

On 08-Sep-2009, at 3:00 AM, Ramsey Lee Gurley wrote:

If you're using Wonder, have a look at ERXKeyValueCodingUtilities.

http://webobjects.mdimension.com/hudson/job/Wonder53/javadoc/er/extensions/foundation/ERXKeyValueCodingUtilities.html

You could just plant a handle to this thing in your application subclass

public NSKeyValueCodingAdditions statics() {
	return ERXKeyValueCodingUtilities.Statics;
}

Load it when you run the application

public void didFinishLaunching() {
	ERXKeyValueCodingUtilities.registerClass(SomeClass.class);
}

and go

<wo:WOKeyValueConditional key = "mode" value = "$application.statics.SomeClass.CONSTANT">

from any component.

Awesome, right? :-)


On Sep 7, 2009, at 9:45 AM, Chan Yeow Heong, Jerome wrote:

Is there a way to do the following?

<wo:WOKeyValueConditional key = "mode" value = "CLASSNAME.constant">

I've just started working using the inline bindings.

Thanks!

_______________________________________________
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:
@mac.com


This email sent to email@hidden

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: KeyValueConditional
      • From: "Chan Yeow Heong, Jerome" <email@hidden>
References: 
 >KeyValueConditional (From: "Chan Yeow Heong, Jerome" <email@hidden>)
 >Re: KeyValueConditional (From: Ramsey Lee Gurley <email@hidden>)
 >Re: KeyValueConditional (From: "Chan Yeow Heong, Jerome" <email@hidden>)

  • Prev by Date: Re: D2W: How to turn on relationship editing?
  • Next by Date: Re: D2W: How to turn on relationship editing?
  • Previous by thread: Re: KeyValueConditional
  • Next by thread: Re: KeyValueConditional
  • Index(es):
    • Date
    • Thread