click-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Md. Jahid Shohel (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CLK-625) createPage makes htm-to-class duplicates
Date Fri, 18 Jun 2010 17:09:24 GMT

    [ https://issues.apache.org/jira/browse/CLK-625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12880248#action_12880248
] 

Md. Jahid Shohel commented on CLK-625:
--------------------------------------

I tried to re-create the problem. Seems like it was fixed or it was not a problem at all.
I tried to re-create the problem with -

HomePage homePage = (HomePage) getContext().createPage("home.htm");  //without leading /

And that created an exception (and that is how it should be) -

[Click] [error] handleException: java.lang.IllegalArgumentException: No Page class configured
for path: home.htm
        at org.apache.click.ClickServlet.createPage(ClickServlet.java:1694)
        at org.apache.click.Context.createPage(Context.java:547)
        at com.working.DestinationPage.onLinkClick(DestinationPage.java:14)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.click.util.ClickUtils.invokeMethod(ClickUtils.java:2763)
        at org.apache.click.util.ClickUtils.invokeListener(ClickUtils.java:1747)
        at org.apache.click.util.ActionListenerAdaptor.onAction(ActionListenerAdaptor.java:59)
        at org.apache.click.ActionEventDispatcher.fireActionEvent(ActionEventDispatcher.java:240)
        at org.apache.click.ActionEventDispatcher.fireActionEvents(ActionEventDispatcher.java:217)
        at org.apache.click.ActionEventDispatcher.fireActionEvents(ActionEventDispatcher.java:146)
        at org.apache.click.ClickServlet.performOnProcess(ClickServlet.java:719)
        at org.apache.click.ClickServlet.processPageEvents(ClickServlet.java:607)
        at org.apache.click.ClickServlet.processPage(ClickServlet.java:561)
        at org.apache.click.ClickServlet.handleRequest(ClickServlet.java:383)
        at org.apache.click.ClickServlet.doGet(ClickServlet.java:276)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
        at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

> createPage makes htm-to-class duplicates
> ----------------------------------------
>
>                 Key: CLK-625
>                 URL: https://issues.apache.org/jira/browse/CLK-625
>             Project: Click
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.1.0
>            Reporter: Andrey Rybin
>
> We have 
> - ControlListenerType1Page.htm - in web root
> and
> ControlListenerType1Page.java with:
>   @Bindable protected ActionLink bugMaker = new ActionLink(this, "makeBug");
>   public boolean makeBug () {
>     Page p = getContext().createPage("ControlListenerType1Page.htm");// without leading
/
>     if (!(p instanceof ControlListenerType1Page)) { throw new Error("very bad"); }
>     //successfully!  BUT now htm-to-class map contains two mappings for ControlListenerType1Page.class:

>     //  ControlListenerType1Page.htm->ControlListenerType1Page.class and 
>     //  /ControlListenerType1Page.htm->ControlListenerType1Page.class 
>     p = getContext().createPage(ControlListenerType1Page.class);
>     //^^^throws java.lang.IllegalArgumentException with message:
>     //Page class resolves to multiple paths: net.sf.apr.cui.ControlListenerType1Page
-> [/ControlListenerType1Page.htm, ControlListenerType1Page.htm]
>     setForward(p);    return true;
>   }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message