Yes I think my intention/want now is to have everything "just work" whether you stick things in context or classpath (if possible, some things aren't because of restricted filesystem access ).
I'll look in to this later today, but to be sure I'm not mis-interpreting ....A good example would be having a page with no spec + the html template just being under the web-inf folder right ? On 5/2/07, Ben Dotte <[EMAIL PROTECTED]> wrote:
It looks like the newest snapshot does fix my EventListener and Script problems. However now I am seeing the problem Andreas mentioned, where a component isn't being found where it used to get found. We are specless and our page/component templates are stored in WEB-INF/app. There was a change made to ComponentSpecificationResolverImpl.java between the current snapshot and the one from 4-20 that seems to have caused this problem (in searchForComponentClass() line 252): Resource componentResource = namespaceResource.getRelativeResource(type + ".jwc"); // try classpath relative if namespace relative doesn't resolve if (componentResource.getResourceURL() == null) { Resource classResource = new ClasspathResource(_classResolver, componentClass.getName().replace('.', '/')); componentResource = classResource.getRelativeResource(type + ".jwc"); } Since we don't have any .jwc files, componentResource.getResourceURL() always returns null and it then searches on the classpath instead. I tried putting the templates on the classpath and it finds them there, but that isn't how our build system is setup to work right now. If I comment out that if statement everything works fine again and the templates on WEB-INF/app are found. So, is this an intentional change, or should it be able to find templates in WEB-INF/app for specless apps? Thanks, Ben -----Original Message----- From: Ben Dotte [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 01, 2007 2:54 PM To: Tapestry users Subject: RE: 4.1.2 snapshot changes 4-20 to 4-30 Thanks for looking into it so quickly.. I will try out the new snapshot tomorrow. -----Original Message----- From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 01, 2007 2:49 PM To: Tapestry users Subject: Re: 4.1.2 snapshot changes 4-20 to 4-30 A fix is deploying now for the @EventListener related issue. (though I'm unsure if it fixes it for Ben but we'll see) The script thing will have to happen later tonight. On 5/1/07, Jesse Kuhnert <[EMAIL PROTECTED]> wrote: > > Yeah I'm aware of the issue, think it's fixed locally but am still testing > the changes. > > On 5/1/07, Andreas Andreou < [EMAIL PROTECTED]> wrote: > > > > I think i've seen some similar issues in the latest snapshots... > > > > They indeed seem to be related to how components/pages are found, i'll > > try > > to have > > a clean example demonstrating this and register a JIRA. > > > > For now, try using: > > > > <dependency> > > <groupId>org.apache.tapestry</groupId> > > <artifactId>tapestry-framework</artifactId> > > <version>4.1.2-20070424.205219-56</version> > > </dependency> > > > > > > > > On 5/1/07, Ben Dotte <[EMAIL PROTECTED]> wrote: > > > > > > I tried the snapshots from this morning but unfortunately I still get > > > the same EventListener error. For the script error I tried adding > > > context: to the path like this: > > > > > > <span jwcid="@Script" script="context:/scripts/categoryHelper.script" > > /> > > > > > > But now the error I get for that is: > > > > > > Unable to parse script > > > > > classpath:collective/ui/components/context:/scripts/categoryHelper.scrip > > > t. > > > > > > -----Original Message----- > > > From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] ] > > > Sent: Tuesday, May 01, 2007 9:33 AM > > > To: Tapestry users > > > Subject: Re: 4.1.2 snapshot changes 4-20 to 4-30 > > > > > > There were two unrelated changes made. The @EventListener change > > > involved > > > some inevitable fundamental flaws that I think are all fully resolved > > as > > > of > > > this mornings deployment of snapshots. > > > > > > The script error is related to how the component specs are being > > > resolved, > > > I'll look into why this is messing up for you but am sure that if you > > > add > > > either "context:" or "classpath:" in front of your string it will work > > > correctly. (though I intended for it to work without them, so it's a > > bug > > > if > > > it isn't working) > > > > > > On 5/1/07, Ben Dotte <[EMAIL PROTECTED]> wrote: > > > > > > > > Were there some sort of fundamental changes that happened between > > the > > > > Tapestry 4.1.2 4-20 snapshot and the one from 4-30? I tried > > upgrading > > > to > > > > 4-30 and I just seem to hit one error after another. The first > > problem > > > > is an EventListener that used to work fine: > > > > > > > > @EventListener(targets="sessionData", events="onclick") > > > > public void sessionDataClicked(IRequestCycle cycle) > > > > { > > > > setShowSessionData(true); > > > > cycle.getResponseBuilder > > ().updateComponent("theSessionData"); > > > > } > > > > > > > > The nested stack from that is: > > > > > > > > Caused by: org.apache.hivemind.ApplicationRuntimeException : No > > > component > > > > found in tree for EventListener binding with a matching component id > > > of > > > > sessionData. [context:/WEB-INF/app/ErrorPage.html, line 1] > > > > at > > > > > > > org.apache.tapestry.pageload.EventConnectionVisitor.visitComponent > > (Event > > > > ConnectionVisitor.java:51) > > > > at > > > > > > > > > $IComponentVisitor_11248054e16.visitComponent($IComponentVisitor_1124805 > > > > 4e16.java) > > > > at > > > > > > > > > $IComponentVisitor_11248054e17.visitComponent($IComponentVisitor_1124805 > > > > 4e17.java) > > > > at > > > > > > > org.apache.tapestry.pageload.ComponentTreeWalker.walkComponentTree(Compo > > > > nentTreeWalker.java:45) > > > > at > > > > > > > org.apache.tapestry.pageload.ComponentTreeWalker.walkComponentTree > > (Compo > > > > nentTreeWalker.java:57) > > > > at > > > > org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java > > :604) > > > > at > > > > $IPageLoader_11248054e04.loadPage($IPageLoader_11248054e04.java) > > > > at > > > > $IPageLoader_11248054e05.loadPage($IPageLoader_11248054e05.java) > > > > at > > > > org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:119) > > > > at > > > > $IPageSource_11248054d1c.getPage($IPageSource_11248054d1c.java) > > > > at > > > > > > > org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java > > :239) > > > > at > > > > org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java > > :226) > > > > at > > > > > > > org.apache.tapestry.error.ExceptionPresenterImpl.presentException > > (Except > > > > ionPresenterImpl.java:42) > > > > ... 62 more > > > > > > > > After I commented that out I got another error for a Script: > > > > > > > > <span jwcid="@Script" script="/scripts/categoryHelper.script" /> > > > > > > > > Caused by: org.apache.tapestry.util.xml.DocumentParseException: > > Unable > > > > to find resource classpath:/scripts/categoryHelper.script. > > > > [classpath:/scripts/categoryHelper.script] > > > > at > > > > > > > org.apache.tapestry.util.xml.RuleDirectedParser.parse > > (RuleDirectedParser > > > > .java:125) > > > > at > > > > org.apache.tapestry.script.ScriptParser.parse(ScriptParser.java:112) > > > > at > > > > > > > org.apache.tapestry.engine.DefaultScriptSource.parse > > (DefaultScriptSource > > > > .java:88) > > > > ... 124 more > > > > > > > > I saw a minor change in JIRA to the way scripts are found but I > > > couldn't > > > > see how it would relate to this in particular. > > > > > > > > Thanks, > > > > Ben > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > -- > > > Jesse Kuhnert > > > Tapestry/Dojo team member/developer > > > > > > Open source based consulting work centered around > > > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > -- > > Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr > > Tapestry / Tacos developer > > Open Source / JEE Consulting > > > > > > -- > Jesse Kuhnert > Tapestry/Dojo team member/developer > > Open source based consulting work centered around > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com > -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com