Re: Binding question
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