Eclipse cannot find binding in WO Components
Eclipse cannot find binding in WO Components
- Subject: Eclipse cannot find binding in WO Components
- From: Roger Perryman <email@hidden>
- Date: Wed, 20 Aug 2008 14:28:00 -0400
It took a lot of work, but I have completed most of the transition of
my project from Xcode 2.x (WO 5.3) to Eclipse 3.3.2 / WOLips 3.3.5385
(WO 5.4.2). The java files are error from but still have some
warnings, mostly due to generics. The problem I am running into is
with the WO components. I get error messages (from Eclipse) in the
HTML/WOD files stating there is no key 'keyName' in
MiniMonthCalendar. It is unable to find inherited iVars. If I define
the iVar locally, it works. All java files are in the same package.
Note that all of this was working code prior to the migration.
Here are the simplified relevant pieces to the classes / components
involved:
BaseComponent extends WOComponent
{
// valueForKey() was overridden here to provide some custom behavior.
// I found a thread that indicated that could be the cause problems
so I
// removed it for testing. The errors persisted.
}
CalendarBase extends BaseComponent
{
protected int dayIndex; // No accessor methods provided for dayIndex
}
MiniMonthCalendar extends CalendarBase
{
protected GregorianCalendar gcMiniCalendar;
public AppointmentCalendar dayViewForDate()
{
AppointmentCalendar nextPage = (AppointmentCalendar) pageWithName
( AppointmentCalendar.class.getName() );
. . .
return nextPage;
}
public NSTimestamp calendarDate()
{
NSTimestamp tsTemp = new NSTimestamp( gcMiniCalendar.getTime() );
gcMiniCalendar.add( GregorianCalendar.DAY_OF_MONTH, 1 );
return tsTemp;
}
public NSMutableDictionary<String, String> dateDict()
{
return NSMutableDictionary containing the date information as a
String for the clicked date
}
}
MiniMonthCalendar.html
<webobject name="dayLoop">
<webobject name="dayLink">
<webobject name="theDate"></webobject>
</webobject>
</webobject>
MiniMonthCalendar.wod
dayLoop: WORepetition
{
count = 7;
index = dayIndex; // Cannot find -- iVar defined in CalendarBase.java
}
dayLink: WOHyperlink
{
action = dayViewForDate; // Can find -- method defined in
MiniMonthCalendar.java
queryDictionary = dateDict; // Can find -- method defined in
MiniMonthCalendar.java
}
theDate: WOString
{
value = calendarDate; // Can find -- method defined in
MiniMonthCalendar.java
dateformat = "%d";
}
_______________________________________________
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