I think the problem is that cwicket.HomePage resolves to a class
object (like cwicket.HomePage.class in Java).  So (class
cwicket.HomePage) returns the class of the class object which is
java.lang.Class.  And that's not a subclass of Wicket's WebPage.  Try
this:
 
(defn -getHomePage [this] cwicket.HomePage)

Chris

On Jan 27, 12:17 am, idevai <ist...@istvandevai.com> wrote:
> Hi!
>
> I've created the following sources:
>
> HomePage.clj:
>
> (ns cwicket.HomePage
>     (:gen-class :extends org.apache.wicket.markup.html.WebPage)
> )
>
> WicketApplication.clj:
>
> (ns cwicket.WicketApplication
> <------>(:gen-class :extends
> org.apache.wicket.protocol.http.WebApplication)
> )
>
> (defn -getHomePage [this] (class cwicket.HomePage))
>
> However, when trying to access the context root, I get the following
> exception:
>
> ERROR - RequestCycle               - Argument pageClass must be an
> instance of org.apache.wicket.Page
> java.lang.IllegalArgumentException: Argument pageClass must be an
> instance of org.apache.wicket.Page
>         at
> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.<i 
> nit>
> (BookmarkablePageRequestTarget.java:127)
>
> Here is a link to the 
> source:http://github.com/apache/wicket/blob/wicket-1.4.5/wicket/src/main/jav...
>
> What could be the cause of this exception? It seems that
> HomePage.getClass is not recognized as an ancestor of Page, however,
> in repl isa? says so. Any good way to debug this?
>
> Cheers,
> Istvan

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to