You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Amol Yadwadkar <ay...@webifyservices.com> on 2003/06/17 13:27:33 UTC

Needed Help for "FOREACH"

Hi All,
  I am trying the example on "Foreach" Loop and following the  guidelines as per Tapestry Doc for doing Foreach Component.
Please Find a zip file with this mail and also the errs i am pasting on the mail.
Can Anyone help me on this to get on with it?

Pls. note :- My PAckage Heirachy was >>>>> /com/Loop for my Application Server

Thankx.
Best Regds,
Amol


      org.apache.tapestry.ApplicationRuntimeException 
      Class com.Loop.SalesPage does not implement the IPage interface. 
      location: classpath:/com/Loop/Home.page, line 6 
         
      java.lang.ClassCastException 
      com.Loop.SalesPage 
      Stack Trace: 
        a.. org.apache.tapestry.pageload.PageLoader.instantiatePage(PageLoader.java:769) 
        b.. org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:831) 
        c.. org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:194) 
        d.. org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:236) 
        e.. org.apache.tapestry.engine.HomeService.service(HomeService.java:100) 
        f.. org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:879) 
        g.. org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:238) 
        h.. org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:199) 
        i.. javax.servlet.http.HttpServlet.service(HttpServlet.java:740) 
        j.. javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
        k.. org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360) 
        l.. org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:280) 
        m.. org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:553) 
        n.. org.mortbay.http.HttpContext.handle(HttpContext.java:1717) 
        o.. org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:549) 
        p.. org.mortbay.http.HttpContext.handle(HttpContext.java:1667) 
        q.. org.mortbay.http.HttpServer.service(HttpServer.java:862) 
        r.. org.jboss.jetty.Jetty.service(Jetty.java:497) 
        s.. org.mortbay.http.HttpConnection.service(HttpConnection.java:759) 
        t.. org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:923) 
        u.. org.mortbay.http.HttpConnection.handle(HttpConnection.java:776) 
        v.. org.mortbay.http.SocketListener.handleConnection(SocketListener.java:202) 
        w.. org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) 
        x.. org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455) 
     

Re: Needed Help for "FOREACH"

Posted by Amol Yadwadkar <ay...@webifyservices.com>.
Hi Harish,
Why I need to implement "IPage " this Interface.....That was actually my
Basic Question?
If I do that I need to define the Methods of that Interface ???
Can U pls tell me Why its so
Thankx for the reply
Best Regds,
Amol
----- Original Message -----
From: "Harish Krishnaswamy" <hk...@comcast.net>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Tuesday, June 17, 2003 5:26 PM
Subject: Re: Needed Help for "FOREACH"


> Tapestry has got the best error reporting I have seen so far. The errors
> point right at the source of the problem with line numbers and a brief
> message.
>
> Class com.Loop.SalesPage does not implement the IPage interface.
> location: classpath:/com/Loop/Home.page, line 6
>
>
> Your SalesPage has to implement Tapestry's IPage. There is a convenience
> base class, BasePage, that may be, and is typically, extended.
>
> -Harish
>
> Amol Yadwadkar wrote:
>
> > Hi All,
> >   I am trying the example on "Foreach" Loop and following the
> >  guidelines as per Tapestry Doc for doing Foreach Component.
> > Please Find a zip file with this mail and also the errs i am pasting
> > on the mail.
> > Can Anyone help me on this to get on with it?
> >
> > Pls. note :- My PAckage Heirachy was >>>>> /com/Loop for my
> > Application Server
> >
> > Thankx.
> > Best Regds,
> > Amol
> >
> >
> > org.apache.tapestry.ApplicationRuntimeException
> > Class com.Loop.SalesPage does not implement the IPage interface.
> > location: classpath:/com/Loop/Home.page, line 6
> >
> > java.lang.ClassCastException
> > com.Loop.SalesPage
> > Stack Trace:
> >
> >     *
org.apache.tapestry.pageload.PageLoader.instantiatePage(PageLoader.java:769)
> >
> >     *
org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:831)
> >
> >     *
org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:194)
> >
> >     *
org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:236)
> >
> >     *
org.apache.tapestry.engine.HomeService.service(HomeService.java:100)
> >
> >     *
org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:879)
> >
> >     *
org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:238
)
> >
> >     *
org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:199)
> >
> >     * javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> >     * javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >     *
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
> >
> >     *
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandl
er.java:280)
> >
> >     *
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:553)
> >
> >     * org.mortbay.http.HttpContext.handle(HttpContext.java:1717)
> >     *
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext
.java:549)
> >
> >     * org.mortbay.http.HttpContext.handle(HttpContext.java:1667)
> >     * org.mortbay.http.HttpServer.service(HttpServer.java:862)
> >     * org.jboss.jetty.Jetty.service(Jetty.java:497)
> >     * org.mortbay.http.HttpConnection.service(HttpConnection.java:759)
> >     *
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:923)
> >     * org.mortbay.http.HttpConnection.handle(HttpConnection.java:776)
> >     *
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:202)
> >
> >     * org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
> >     * org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
> >
> >------------------------------------------------------------------------
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
>
>


Re: Needed Help for "FOREACH"

Posted by Harish Krishnaswamy <hk...@comcast.net>.
Tapestry has got the best error reporting I have seen so far. The errors 
point right at the source of the problem with line numbers and a brief 
message.

Class com.Loop.SalesPage does not implement the IPage interface. 
location: classpath:/com/Loop/Home.page, line 6


Your SalesPage has to implement Tapestry's IPage. There is a convenience 
base class, BasePage, that may be, and is typically, extended.

-Harish

Amol Yadwadkar wrote:

> Hi All,
>   I am trying the example on "Foreach" Loop and following the 
>  guidelines as per Tapestry Doc for doing Foreach Component.
> Please Find a zip file with this mail and also the errs i am pasting 
> on the mail.
> Can Anyone help me on this to get on with it?
>  
> Pls. note :- My PAckage Heirachy was >>>>> /com/Loop for my 
> Application Server
>  
> Thankx.
> Best Regds,
> Amol
>  
>  
> org.apache.tapestry.ApplicationRuntimeException
> Class com.Loop.SalesPage does not implement the IPage interface.
> location: classpath:/com/Loop/Home.page, line 6
>  
> java.lang.ClassCastException
> com.Loop.SalesPage
> Stack Trace:
>
>     * org.apache.tapestry.pageload.PageLoader.instantiatePage(PageLoader.java:769)
>
>     * org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:831)
>
>     * org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:194)
>
>     * org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:236)
>
>     * org.apache.tapestry.engine.HomeService.service(HomeService.java:100)
>
>     * org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:879)
>
>     * org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:238)
>
>     * org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:199)
>
>     * javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>     * javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>     * org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
>
>     * org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:280)
>
>     * org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:553)
>
>     * org.mortbay.http.HttpContext.handle(HttpContext.java:1717)
>     * org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:549)
>
>     * org.mortbay.http.HttpContext.handle(HttpContext.java:1667)
>     * org.mortbay.http.HttpServer.service(HttpServer.java:862)
>     * org.jboss.jetty.Jetty.service(Jetty.java:497)
>     * org.mortbay.http.HttpConnection.service(HttpConnection.java:759)
>     * org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:923)
>     * org.mortbay.http.HttpConnection.handle(HttpConnection.java:776)
>     * org.mortbay.http.SocketListener.handleConnection(SocketListener.java:202)
>
>     * org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
>     * org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>