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

Re: Binding question


  • Subject: Re: Binding question
  • From: David LeBer <email@hidden>
  • Date: Tue, 18 Mar 2008 11:37:44 -0400


On 18-Mar-08, at 11:22 AM, Gustavo Pizano wrote:

Hello

I want to know if ie. I have XXX.WO there i have some WOtext fields inside a WOFrom, in the java the keys should always be public? or the can be private with some accessor method, or protected variable? if so, then how can i bind them?

As a general rule: Objects in your WOComponent.java file must be publicly accessible for bindings to work.


That means they either need to be defined as public:

	public String myString;

Or they need to have public accessor methods:

	private String _myString;

	...

	public String myString() {
		return _myString;
	}

	public void setMyString(String s) {
		_myString = s;
	}

Bindings use Key Value Coding (KVC) and KVC smart enough to find the right thing.

;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site:   http://codeferous.com
blog: http://davidleber.net
profile: http://www.linkedin.com/in/davidleber
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org


_______________________________________________ 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: 
 >Binding question (From: Gustavo Pizano <email@hidden>)

  • Prev by Date: Re: Binding question
  • Next by Date: Re: Binding question
  • Previous by thread: Re: Binding question
  • Next by thread: Saving data in the db
  • Index(es):
    • Date
    • Thread