Re: WROXComponent Example
Re: WROXComponent Example
- Subject: Re: WROXComponent Example
- From: David Griffith <email@hidden>
- Date: Tue, 16 Mar 2004 20:30:07 +0100
Hi Franck,
I'm not sure if you copied the text below or if you retyped it, but there is
definitely something amiss there.
> Hi,
>
> I'm new to WO and Java. I was wondering if someone could help me.
> I'm trying to build 2 components based on example from WO 5.0 with Java
> (WROX). (page 166).
> I followed the direction (New file, choosed Java Class). The java class
> are under WebComponents folder (in XCode).
> I choose Application Server as the target when adding the file.
>
> I'm getting the error for WROXPage.java: cannot resolve symbol :
> constructor WROXComponent()
>
> Thx a lot.
>
> WROXComponent.java
>
> import com.webobjects.foundation.*;
> import com.webobjects.eocontrol.*;
> import com.webobjects.appserver.*;
>
> public abstract class WROXComponent extends WOComponent {
>
> public WROXComponent(WOContext context) {
> super(context);
> }
> public abstract String getArea();
--> here you are missing a { and you should not have the ; above
>
> }
>
>
>
> WROXPage.java
>
> import com.webobjects.foundation.*;
> import com.webobjects.eocontrol.*;
> import com.webobjects.appserver.*;
>
>
> public abstract class WROXPage extends WROXComponent {
--> here you are missing the constructor for WROXPage
> public WROXPage getPage() {
>
> return (WROXPage)context().page();
> }
>
> }
I guess you want something like:
WROXComponent.java
import com.webobjects.foundation.*;
import com.webobjects.eocontrol.*;
import com.webobjects.appserver.*;
public abstract class WROXComponent extends WOComponent {
public WROXComponent(WOContext context) {
super(context);
}
public abstract String getArea()
{
}
}
WROXPage.java
import com.webobjects.foundation.*;
import com.webobjects.eocontrol.*;
import com.webobjects.appserver.*;
public abstract class WROXPage extends WROXComponent {
public WROXPage(WOContext context) {
super(context);
}
public WROXPage getPage() {
return (WROXPage)context().page();
}
}
Hope this helps somewhat!
Dave.
> _______________________________________________
> 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.
_______________________________________________
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.