Object property initialization problem
Object property initialization problem
- Subject: Object property initialization problem
- From: Randall Perry <email@hidden>
- Date: Tue, 20 Apr 2004 17:41:58 -0400
Got a Direct Action that calls a component page, ResultPage, passing it a
EOGenericRecord object, CustView, that's populated with data.
Am able to access properties of the CustView object in the component (via
.wod file). But need to access a property of the object in a method in
ResultPage.java.
So, tried to access it and got 'Cannot resolve symbol' error. Thought ok, so
I need to create a dummy instance of the class object because the compiler
doesn't know it's going to be set by the Direct Action, so I created it.
public CustView custInfo = new CustView();
String custDir = "/Users" + custInfo.userName;
Then I got the same error trying to access the object property 'userName'.
So tried initializing userName to an empty string but couldn't find a way to
do it without error:
public CustView custInfo = new CustView();
custInfo.setUserName("");
2nd line above generates error "<identifier> expected"
Any help is appreciated.
--
Randall Perry
sysTame
Xserve Web Hosting/Co-location
Website Development/Promotion
Mac Consulting/Sales
http://www.systame.com/
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.