Re: Javascript error when using XTile in T4
Impossible to say without more contextually relevant information. Ie what are you doing onClick? The only thing barring 4.1 from being released is updated documentation now. (Conversion of old docs is done, just need to add my new stuff in.) On 7/19/06, Dan Adams [EMAIL PROTECTED] wrote: When I try to call an xtile javascript method in a submit button onclick I get the following error in firefox: Error: [Exception... Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status] nsresult: 0x80040111 (NS_ERROR_NOT_AVAILABLE) location: JS frame :: http://localhost:8090/page/admin/Logout.html :: anonymous :: line 116 data: no] Does anyone know of a way around this error? -- Dan Adams Software Engineer Interactive Factory 617.235.5857 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
ASO and hivemind.xml
Hi, I found in the document what is the line to add into hivemind.xml file to create an ASO since getGlobal is deprecated. But I didn't find a standard hivemind.xml file and I have no idea what is mandatory to put in. I just want to declare my ASO object to be able to inject it in my page. So, where can I find a standard hivemind.xml or what do I have to put in to still have my application working normally? Thanks BW
Re: ASO and hivemind.xml
BW, No need to touch hivemind.xml. Add a file called hivemodule.xml to WEB-INF, with content similar to this: ?xml version=1.0? module id=jumpstart version=1.0.0 package=jumpstart.web !-- ServiceLocator and Visit -- contribution configuration-id=tapestry.state.ApplicationObjects state-object name=serviceLocator scope=application create-instance class=jumpstart.web.base.ServiceLocator/ /state-object /contribution contribution configuration-id=tapestry.state.ApplicationObjects state-object name=visit scope=session create-instance class=jumpstart.web.base.Visit/ /state-object /contribution /module In that example, ServiceLocator performs a similar function to the typical Global. Visit is just like the old Visit. Note that the scope of ServiceLocator is application and the scope of Visit is session. Here's an example of them being referenced in a page: @InjectState(serviceLocator) public abstract ServiceLocator getServiceLocator(); @InjectState(visit) // Can't call it getVisit() because it conflicts with a deprecated IPage method public abstract Visit getMyVisit(); Hope this helps. Geoff http://tapestry.apache.org/tapestry4.1/QuickStart/contributed.html On 20/07/2006, at 7:58 PM, Blackwings wrote: Hi, I found in the document what is the line to add into hivemind.xml file to create an ASO since getGlobal is deprecated. But I didn't find a standard hivemind.xml file and I have no idea what is mandatory to put in. I just want to declare my ASO object to be able to inject it in my page. So, where can I find a standard hivemind.xml or what do I have to put in to still have my application working normally? Thanks BW - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem using tapestry portlet with external components
Ach! The problem was that the .application file wasn't named the same as the portlet, thus the application file wasn't getting read. Mitch On 19.07.2006, at 18:23, Mitchell O'Brien wrote: Hi all, I'm trying to deploy a tapestry portlet which uses components from an external library but I seem to get an error message when the portlet tries to load. It works fine when deployed as a regular tapestry app but just not as a portlet. The .jar files are in the correct location and I'm using liferay as my portal software. Any ideas? Thanks, Mitch from HTML template: img jwcid=@sotacs:DynamicImage width=800 height=800 painter=painter:makeImage / from .application: application meta key=org.apache.tapestry.page-class-packages value=com.gutzmann.scc.pages/ library id=sotacs specification-path=classpath:/net/sf/sotacs/ sotacs.library/ /application Error message in log: ** Unable to process client request: Library 'sotacs' not found in application namespace. Session id: 1246EE364FDCE5BB6ECABC0B0AE04D79 Exceptions: org.apache.hivemind.ApplicationRuntimeException: Library 'sotacs' not found in application namespace. org.apache.tapestry.engine.Namespace.createNamespace(Namespace.java: 290) org.apache.tapestry.engine.Namespace.getChildNamespace (Namespace.java:148) org.apache.tapestry.resolver.AbstractSpecificationResolver.findNamespa ceForId(AbstractSpecificationResolver.java:204) org.apache.tapestry.resolver.ComponentSpecificationResolverImpl.resolv e(ComponentSpecificationResolverImpl.java:141) $ComponentSpecificationResolver_10c24ef3c91.resolve ($ComponentSpecificationResolver_10c24ef3c91.java) $ComponentSpecificationResolver_10c24ef3c92.resolve ($ComponentSpecificationResolver_10c24ef3c92.java) org.apache.tapestry.services.impl.DefaultParserDelegate.getAllowBody (DefaultParserDelegate.java:70) org.apache.tapestry.parse.TemplateParser.processComponentStart (TemplateParser.java:986) org.apache.tapestry.parse.TemplateParser.startTag (TemplateParser.java:858) org.apache.tapestry.parse.TemplateParser.parse(TemplateParser.java: 494) org.apache.tapestry.parse.TemplateParser.parse(TemplateParser.java: 326) $ITemplateParser_10c24ef3cf4.parse($ITemplateParser_10c24ef3cf4.java) $ITemplateParser_10c24ef3cf5.parse($ITemplateParser_10c24ef3cf5.java) org.apache.tapestry.services.impl.TemplateSourceImpl.constructTemplate Instance(TemplateSourceImpl.java:406) org.apache.tapestry.services.impl.TemplateSourceImpl.parseTemplate (TemplateSourceImpl.java:383) org.apache.tapestry.services.impl.TemplateSourceImpl.getOrParseTemplat e(TemplateSourceImpl.java:360) org.apache.tapestry.services.impl.TemplateSourceImpl.findStandardTempl ate(TemplateSourceImpl.java:340) org.apache.tapestry.services.impl.TemplateSourceImpl.findTemplate (TemplateSourceImpl.java:245) org.apache.tapestry.services.impl.TemplateSourceImpl.getTemplate (TemplateSourceImpl.java:188) $TemplateSource_10c24ef3c13.getTemplate ($TemplateSource_10c24ef3c13.java) org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemp late(ComponentTemplateLoaderImpl.java:55) $ComponentTemplateLoader_10c24ef3c93.loadTemplate ($ComponentTemplateLoader_10c24ef3c93.java) org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent (PageLoader.java:648) org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:77) org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:107) org.apache.tapestry.pageload.PageLoader.constructComponent (PageLoader.java:439) org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:613) $IPageLoader_10c24ef3c87.loadPage($IPageLoader_10c24ef3c87.java) $IPageLoader_10c24ef3c88.loadPage($IPageLoader_10c24ef3c88.java) org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:120) $IPageSource_10c24ef3beb.getPage($IPageSource_10c24ef3beb.java) org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java: 268) org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:251) org.apache.tapestry.engine.RequestCycle.activate(RequestCycle.java: 609) org.apache.tapestry.portlet.PortletRendererImpl.renderPage (PortletRendererImpl.java:58) $PortletRenderer_10c24ef3c77.renderPage ($PortletRenderer_10c24ef3c77.java) org.apache.tapestry.portlet.PortletHomeService.service (PortletHomeService.java:80) $IEngineService_10c24ef3c5b.service($IEngineService_10c24ef3c5b.java) org.apache.tapestry.services.impl.EngineServiceOuterProxy.service (EngineServiceOuterProxy.java:66) org.apache.tapestry.engine.AbstractEngine.service (AbstractEngine.java:248) org.apache.tapestry.services.impl.InvokeEngineTerminator.service (InvokeEngineTerminator.java:60) $WebRequestServicer_10c24ef3c29.service ($WebRequestServicer_10c24ef3c29.java) $WebRequestServicer_10c24ef3c27.service ($WebRequestServicer_10c24ef3c27.java)
Re: ASO and hivemind.xml
Thanks a lot, but I have a question again: To what, the id in the module tag, refer? Is it the name of my context? is it app? is it the package where something (what?) is store? Same question for the version. Thanks anyway BW 2006/7/20, Geoff Callender [EMAIL PROTECTED]: BW, No need to touch hivemind.xml. Add a file called hivemodule.xml to WEB-INF, with content similar to this: ?xml version=1.0? module id=jumpstart version=1.0.0 package=jumpstart.web !-- ServiceLocator and Visit -- contribution configuration-id=tapestry.state.ApplicationObjects state-object name=serviceLocator scope=application create-instance class= jumpstart.web.base.ServiceLocator/ /state-object /contribution contribution configuration-id=tapestry.state.ApplicationObjects state-object name=visit scope=session create-instance class=jumpstart.web.base.Visit / /state-object /contribution /module In that example, ServiceLocator performs a similar function to the typical Global. Visit is just like the old Visit. Note that the scope of ServiceLocator is application and the scope of Visit is session. Here's an example of them being referenced in a page: @InjectState(serviceLocator) public abstract ServiceLocator getServiceLocator(); @InjectState(visit) // Can't call it getVisit() because it conflicts with a deprecated IPage method public abstract Visit getMyVisit(); Hope this helps. Geoff http://tapestry.apache.org/tapestry4.1/QuickStart/contributed.html On 20/07/2006, at 7:58 PM, Blackwings wrote: Hi, I found in the document what is the line to add into hivemind.xml file to create an ASO since getGlobal is deprecated. But I didn't find a standard hivemind.xml file and I have no idea what is mandatory to put in. I just want to declare my ASO object to be able to inject it in my page. So, where can I find a standard hivemind.xml or what do I have to put in to still have my application working normally? Thanks BW - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ASO and hivemind.xml
You can use whatever you want for the module id (usually your application name, though) and the version has to have the format 1.0.0 (three dot-separated version numbers) . -Original Message- From: Blackwings [mailto:[EMAIL PROTECTED] Sent: Thursday, July 20, 2006 7:34 AM To: Tapestry users Subject: Re: ASO and hivemind.xml Thanks a lot, but I have a question again: To what, the id in the module tag, refer? Is it the name of my context? is it app? is it the package where something (what?) is store? Same question for the version. Thanks anyway BW 2006/7/20, Geoff Callender [EMAIL PROTECTED]: BW, No need to touch hivemind.xml. Add a file called hivemodule.xml to WEB-INF, with content similar to this: ?xml version=1.0? module id=jumpstart version=1.0.0 package=jumpstart.web !-- ServiceLocator and Visit -- contribution configuration-id=tapestry.state.ApplicationObjects state-object name=serviceLocator scope=application create-instance class= jumpstart.web.base.ServiceLocator/ /state-object /contribution contribution configuration-id=tapestry.state.ApplicationObjects state-object name=visit scope=session create-instance class=jumpstart.web.base.Visit / /state-object /contribution /module In that example, ServiceLocator performs a similar function to the typical Global. Visit is just like the old Visit. Note that the scope of ServiceLocator is application and the scope of Visit is session. Here's an example of them being referenced in a page: @InjectState(serviceLocator) public abstract ServiceLocator getServiceLocator(); @InjectState(visit) // Can't call it getVisit() because it conflicts with a deprecated IPage method public abstract Visit getMyVisit(); Hope this helps. Geoff http://tapestry.apache.org/tapestry4.1/QuickStart/contributed.html On 20/07/2006, at 7:58 PM, Blackwings wrote: Hi, I found in the document what is the line to add into hivemind.xml file to create an ASO since getGlobal is deprecated. But I didn't find a standard hivemind.xml file and I have no idea what is mandatory to put in. I just want to declare my ASO object to be able to inject it in my page. So, where can I find a standard hivemind.xml or what do I have to put in to still have my application working normally? Thanks BW - 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]
Re: Scheduling tasks
I can't comment on Quartz but I did use the Oracle scheduler until someone scheduled a query that ran for hours and made the database useless. It was difficult to recover from because you could not login to stop the task. If you schedule * * * * * wget http://localhost/cronjob then you don't have any machine dependencies although I generally schedule a shell script because I want an email if it fails which leads to Quartz only works when the JVM is running. I've seen enough JVM crashes to have a cronjob that restarts Tomcat. I don't recall cron ever crashing. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ASO and hivemind.xml
Others might chime in because I'm no expert on this, but this what I believe to be true... - The module id and version can be arbitrary. However, to avoid name clashes you can use the id as a qualifier, eg. @InjectState(jumpstart: serviceLocator) So the id forms a namespace. Why would you get name clashes? Because you can have more than one hivemodule.xml file in your classpath and HiveMind will pick up all of them - in addition to its own hivemind.xml. - The package name allows you to abbreviate your class names in the rest of the module, which I didn't do, so I wasted that feature. Can someone else confirm all of this? Cheers, Geoff On 20/07/2006, at 9:33 PM, Blackwings wrote: Thanks a lot, but I have a question again: To what, the id in the module tag, refer? Is it the name of my context? is it app? is it the package where something (what?) is store? Same question for the version. Thanks anyway BW 2006/7/20, Geoff Callender [EMAIL PROTECTED]: BW, No need to touch hivemind.xml. Add a file called hivemodule.xml to WEB-INF, with content similar to this: ?xml version=1.0? module id=jumpstart version=1.0.0 package=jumpstart.web !-- ServiceLocator and Visit -- contribution configuration- id=tapestry.state.ApplicationObjects state-object name=serviceLocator scope=application create-instance class= jumpstart.web.base.ServiceLocator/ /state-object /contribution contribution configuration- id=tapestry.state.ApplicationObjects state-object name=visit scope=session create-instance class=jumpstart.web.base.Visit / /state-object /contribution /module In that example, ServiceLocator performs a similar function to the typical Global. Visit is just like the old Visit. Note that the scope of ServiceLocator is application and the scope of Visit is session. Here's an example of them being referenced in a page: @InjectState(serviceLocator) public abstract ServiceLocator getServiceLocator(); @InjectState(visit) // Can't call it getVisit() because it conflicts with a deprecated IPage method public abstract Visit getMyVisit(); Hope this helps. Geoff http://tapestry.apache.org/tapestry4.1/QuickStart/contributed.html On 20/07/2006, at 7:58 PM, Blackwings wrote: Hi, I found in the document what is the line to add into hivemind.xml file to create an ASO since getGlobal is deprecated. But I didn't find a standard hivemind.xml file and I have no idea what is mandatory to put in. I just want to declare my ASO object to be able to inject it in my page. So, where can I find a standard hivemind.xml or what do I have to put in to still have my application working normally? Thanks BW - 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]
Re: ASO and hivemind.xml
The situation is : I create class that extends ApplicationServlet and I specify it as the tapestry main servlet in web.xml. In this class I call a class that initialise some application objects such as list of element common to everybody from the database. My class also set a bean member and implement the get/set method. I also specified this class as an ASO as you told me to do Geoff and I put the inject tag in my Home.page. At the loading of the application, my application object is loaded normally and contains all the list. When I call the Home.page, the inject seems to work and the pageBeginRender is called normally. I call getMyASO() I declared abstract, but when I try to get the application object it is null!! I think Tapestry recreate an instance of MyASO instead of directly get the first loaded : web.xml ... servlet servlet-namedm/servlet-name display-nameDM Initialization servlet/display-name servlet-classdgt.dm.controller.DossierManagerApplication /servlet-class load-on-startup0/load-on-startup /servlet ... hivemodule.xml ?xml version=1.0 encoding=UTF-8? module id=dgt.dm.controller version=06.02.01 package=dgt.dm.controller contribution configuration-id=tapestry.state.ApplicationObjects state-object name=dossierManagerApplication scope=application create-instance class=dgt.dm.controller.DossierManagerApplication/ /state-object /contribution /module DossierManagerApplication.java public class DossierManagerApplication extends ApplicationServlet { private ApplicationSettings appSettings = null; public ApplicationSettings getAppSettings() { return appSettings; } public void setAppSettings(ApplicationSettings appSettings) { this.appSettings = appSettings; } private InitServlet is = null; public void init(ServletConfig arg0) throws ServletException { super.init(arg0); String webRootPath = getServletContext().getRealPath(/); is = new InitServlet(); is.init(webRootPath); appSettings = is.getAppSettings(); // NOT NULL WHEN I DEBUG } ... HomePage.page ... page-specification class=dgt.dm.pages.HomePage inject property=dossierManagerApplication type=state object=dossierManagerApplication/ /page-specification HomePage.java public abstract DossierManagerApplication getDossierManagerApplication(); public abstract void setDossierManagerApplication(DossierManagerApplication dossierManagerApplication); public void pageBeginRender(PageEvent event) { DossierManagerApplication dossierManagerApplication = getDossierManagerApplication(); ApplicationSettings appSettings = dossierManagerApplication.getAppSettings(); // IS NULL setRequesters(appSettings.getRequesters()); setLanguages(appSettings.getLanguages()); } Thanks for help... BW 2006/7/20, Blackwings [EMAIL PROTECTED]: Thanks a lot, but I have a question again: To what, the id in the module tag, refer? Is it the name of my context? is it app? is it the package where something (what?) is store? Same question for the version. Thanks anyway BW 2006/7/20, Geoff Callender [EMAIL PROTECTED]: BW, No need to touch hivemind.xml. Add a file called hivemodule.xml to WEB-INF, with content similar to this: ?xml version=1.0? module id=jumpstart version= 1.0.0 package=jumpstart.web !-- ServiceLocator and Visit -- contribution configuration-id= tapestry.state.ApplicationObjects state-object name=serviceLocator scope=application create-instance class= jumpstart.web.base.ServiceLocator/ /state-object /contribution contribution configuration-id= tapestry.state.ApplicationObjects state-object name=visit scope=session create-instance class=jumpstart.web.base.Visit/ /state-object /contribution /module In that example, ServiceLocator performs a similar function to the typical Global. Visit is just like the old Visit. Note that the scope of ServiceLocator is application and the scope of Visit is session. Here's an example of them being referenced in a page: @InjectState(serviceLocator) public abstract ServiceLocator getServiceLocator(); @InjectState(visit) // Can't call it getVisit() because it conflicts with a deprecated IPage method public abstract Visit getMyVisit(); Hope this helps. Geoff http://tapestry.apache.org/tapestry4.1/QuickStart/contributed.html On 20/07/2006, at 7:58 PM, Blackwings wrote: Hi, I found in the document what is the line to add into hivemind.xml file to create an ASO since getGlobal is deprecated. But I didn't find a standard hivemind.xml file and I have no idea what is mandatory to put in. I just want to declare my ASO object to be able to inject it in my page. So, where can I find a standard hivemind.xml or what do I have to put in to still have my application working normally?
presenting a list of errors through comonent and NullPointerException
Hello I found quite a nice component named ShowErrors from helloworld-taplet example coming with tapestry 4.0.2 edition, but found it giving quite an unexpected result when submitting incomplete (or invalid) form the second time. Namely there will come a NullPointerException. Could anyone verify it or explain whats wrong with the following? Please note that error messages still get displayed the first time - the exception only comes after submitting the form once more with invalid data. PS! I'm not subscribed to the list, so I would appreciate adding [EMAIL PROTECTED] to bcc while answering. The component referenced through a page like following: bean name=delegate class= org.apache.tapestry.valid.ValidationDelegate/ component id=errorList type=ErrorList binding name=delegate value=ognl:beans.delegate/ /component ErrorList.jwc ?xml version=1.0 encoding=UTF-8? !DOCTYPE component-specification PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; component-specification allow-informal-parameters=no allow-body=no parameter name=delegate required=true/ property name=errorRenderer/ component id=if type=If binding name=condition value= delegate.hasErrors/ binding name=element value=literal:ul/ /component component id=loop type=For binding name=source value= delegate.fieldTracking.{?inError}.{errorRenderer}/ binding name=value value=errorRenderer/ binding name=element value=literal:li/ /component component id=error type=Delegator binding name=delegate value=ognl:errorRenderer / /component /component-specification ErrorList.html ul jwcid=if li jwcid=loop span jwcid=error/ /li /ul Finally the error report for the NullPonterException after submitting invalid form the second time org.apache.tapestry.BindingException Unable to read OGNL expression 'parsed OGNL expression' of [EMAIL PROTECTED]/errorList]: java.lang.NullPointerException binding: ExpressionBinding[BookEdit/errorList delegate.fieldTracking.{?inError}.{errorRenderer}] location: context:/WEB-INF/ErrorList.jwc, line 31, column 86 26component id=if type=If 27binding name=condition value=delegate.hasErrors/ 28binding name=element value=literal:ul/ 29/component 30component id=loop type=For 31binding name=source value=delegate.fieldTracking.{?inError}.{errorRenderer}/ 32binding name=value value=errorRenderer/ 33binding name=element value=literal:li/ 34/component 35component id=error type=Delegator 36binding name=delegate value=ognl:errorRenderer / org.apache.hivemind.ApplicationRuntimeException Unable to read OGNL expression 'parsed OGNL expression' of [EMAIL PROTECTED]/errorList]: java.lang.NullPointerException component: [EMAIL PROTECTED]/errorList] location: context:/WEB-INF/BookEdit.page, line 20, column 45 15binding name=listener value=ognl:listeners.bookFormSubmit / 16binding name=delegate value=ognl:beans.delegate / 17!-- binding name=clientValidationEnabled value=true/ -- 18/component 19 20component id=errorList type=ErrorList 21binding name=delegate value=ognl:beans.delegate/ 22/component 23 24component id=titleLabel type=FieldLabel 25binding name=field value=component:title/ java.lang.NullPointerException Stack Trace: * ognl.OgnlRuntime$ClassCache.get(OgnlRuntime.java:144) * ognl.OgnlRuntime.getHandler(OgnlRuntime.java:1551) * ognl.OgnlRuntime.getElementsAccessor(OgnlRuntime.java:1518) * ognl.ASTSelect.getValueBody (ASTSelect.java:53) * ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170) * ognl.SimpleNode.getValue(SimpleNode.java:210) * ognl.ASTChain.getValueBody(ASTChain.java:109) * ognl.SimpleNode.evaluateGetValueBody (SimpleNode.java:170) * ognl.SimpleNode.getValue(SimpleNode.java:210) * ognl.Ognl.getValue(Ognl.java:333) * ognl.Ognl.getValue(Ognl.java:310) * org.apache.tapestry.services.impl.ExpressionEvaluatorImpl.readCompiled( ExpressionEvaluatorImpl.java:91) * $ExpressionEvaluator_10c8ac5eb01.readCompiled($ExpressionEvaluator_10c8ac5eb01.java) * org.apache.tapestry.binding.ExpressionBinding.resolveExpression( ExpressionBinding.java :110) * org.apache.tapestry.binding.ExpressionBinding.getObject( ExpressionBinding.java:103) * org.apache.tapestry.components.ForBean.evaluateSourceIterator( ForBean.java:603) * org.apache.tapestry.components.ForBean$ReadSourceDataIterator .init( ForBean.java:287) * org.apache.tapestry.components.ForBean.getStoredData(ForBean.java:278) * org.apache.tapestry.components.ForBean.getData(ForBean.java:256) * org.apache.tapestry.components.ForBean.renderComponent (ForBean.java :107) * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java :617) * org.apache.tapestry.AbstractComponent.renderBody( AbstractComponent.java:434) *
going from 4.0 to 4.1
The stuff in 4.1 looks neat but I have a couple questions about transitioning. I apologize if these have already been answered. - Does it effect your ability to test with htmlunit? We use this a *ton* and testibility is a big issue. Can you test with javascript off and have pages still work normally? - We probably won't be using the ajax stuff very much, at least not for a while. Can you use 4.1 without it getting in the way? - Are there ton's of API changes? How easy is the switch? -- Dan Adams Software Engineer Interactive Factory 617.235.5857 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Javascript error when using XTile in T4
well, i have this in the template: xtile jwcid=@contrib:XTile listener=listener:start sendName=_sendStartRecording receiveName=_recvMsg / xtile jwcid=@contrib:XTile listener=listener:append sendName=_sendAppend receiveName=_recvMsg / xtile jwcid=@contrib:XTile listener=listener:stop sendName=_sendStopRecording receiveName=_recvMsg / then i have onclick handlers for links and submit buttons. each of these just call _sendAppend() with some text and then return normally. i don't get any errors from the link onclick handler but only from the submit button onclick. After some investigation, it looks like this is a problem with firefox that needs to be handled in the xtitle javascript: http://radio.javaranch.com/pascarello/2006/02/07/1139345471027.html The good stuff: Mozilla calls onload() for all HTTP transactions that succeeded. The only time it calls onerror() is when a network error happened. Inside the onerror handler, accessing the status attribute results in this exception: Error: [Exception... Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status] nsresult: 0x80040111 (NS_ERROR_NOT_AVAILABLE) location: JS frame :: file:///Users/chuck/errtest.html :: anonymous :: line 114 data: no] Source File: file:///Users/chuck/errtest.html Line: 114 /quote Now an easy fix for now is to add another try catch in your onerror function when you are reading the status property. This will stop the error occuring, but thanks to this, you will not have all of the information that you could have with IE. On Thu, 2006-07-20 at 02:30 -0400, Jesse Kuhnert wrote: Impossible to say without more contextually relevant information. Ie what are you doing onClick? The only thing barring 4.1 from being released is updated documentation now. (Conversion of old docs is done, just need to add my new stuff in.) On 7/19/06, Dan Adams [EMAIL PROTECTED] wrote: When I try to call an xtile javascript method in a submit button onclick I get the following error in firefox: Error: [Exception... Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status] nsresult: 0x80040111 (NS_ERROR_NOT_AVAILABLE) location: JS frame :: http://localhost:8090/page/admin/Logout.html :: anonymous :: line 116 data: no] Does anyone know of a way around this error? -- Dan Adams Software Engineer Interactive Factory 617.235.5857 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Dan Adams Software Engineer Interactive Factory 617.235.5857 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
contrib:Table paging in @For loop
I'm having a problem with the contrib:Table component nested inside a @For loop. Essentially I'm rendering several lists of objects. The initial display is correct, but paging fails. What I think is happening is that a single @contrib:Table component is being reused with each iteration of the loop and the paging listeners are firing against that single component without regard to where I am in the @For loop. My evidence is the hidden form fields associated with paging state are being created for each iteration of the loop, but always contain the same values. Has anyone seen behavior like this before or know of a workaround? -Steve
Where can I find info on speeding up a pure tapestry 3.0 application?
- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Scheduling tasks
any oracle developer or dba could tell you: alter system kill session 'sid,serial'; Kills any session. In Oracle you can allways kill session that have gone astray. And even if it doesn't work from sql+, you can always look op the OS-pid (in v$session) and kill the process on the os level. (Be sure that you set job_queue_processes to 0, because if you don't Oracle sometimes restarts the job). Martijn Original Message From: [EMAIL PROTECTED] To: users@tapestry.apache.org Subject: Re: Scheduling tasks Date: Thu, 20 Jul 2006 07:28:42 -0500 I can't comment on Quartz but I did use the Oracle scheduler until someone scheduled a query that ran for hours and made the database useless. It was difficult to recover from because you could not login to stop the task. If you schedule * * * * * wget http://localhost/cronjob then you don't have any machine dependencies although I generally schedule a shell script because I want an email if it fails which leads to Quartz only works when the JVM is running. I've seen enough JVM crashes to have a cronjob that restarts Tomcat. I don't recall cron ever crashing. - 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]
components in library using only annotations
Is it possible to package components that have *no* specification (defined using annotations only) into a component library? How is the specification-path defined in the .library file? For example: component-type type=MyComponent specification-path=???/ Thanks, Rowland - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ASO and hivemind.xml
Have you tried using a StateObjectFactory? -Original Message- From: Blackwings [mailto:[EMAIL PROTECTED] Sent: Thursday, July 20, 2006 9:07 AM To: Tapestry users Subject: Re: ASO and hivemind.xml The situation is : I create class that extends ApplicationServlet and I specify it as the tapestry main servlet in web.xml. In this class I call a class that initialise some application objects such as list of element common to everybody from the database. My class also set a bean member and implement the get/set method. I also specified this class as an ASO as you told me to do Geoff and I put the inject tag in my Home.page. At the loading of the application, my application object is loaded normally and contains all the list. When I call the Home.page, the inject seems to work and the pageBeginRender is called normally. I call getMyASO() I declared abstract, but when I try to get the application object it is null!! I think Tapestry recreate an instance of MyASO instead of directly get the first loaded : web.xml ... servlet servlet-namedm/servlet-name display-nameDM Initialization servlet/display-name servlet-classdgt.dm.controller.DossierManagerApplication /servlet-class load-on-startup0/load-on-startup /servlet ... hivemodule.xml ?xml version=1.0 encoding=UTF-8? module id=dgt.dm.controller version=06.02.01 package=dgt.dm.controller contribution configuration-id=tapestry.state.ApplicationObjects state-object name=dossierManagerApplication scope=application create-instance class=dgt.dm.controller.DossierManagerApplication/ /state-object /contribution /module DossierManagerApplication.java public class DossierManagerApplication extends ApplicationServlet { private ApplicationSettings appSettings = null; public ApplicationSettings getAppSettings() { return appSettings; } public void setAppSettings(ApplicationSettings appSettings) { this.appSettings = appSettings; } private InitServlet is = null; public void init(ServletConfig arg0) throws ServletException { super.init(arg0); String webRootPath = getServletContext().getRealPath(/); is = new InitServlet(); is.init(webRootPath); appSettings = is.getAppSettings(); // NOT NULL WHEN I DEBUG } ... HomePage.page ... page-specification class=dgt.dm.pages.HomePage inject property=dossierManagerApplication type=state object=dossierManagerApplication/ /page-specification HomePage.java public abstract DossierManagerApplication getDossierManagerApplication(); public abstract void setDossierManagerApplication(DossierManagerApplication dossierManagerApplication); public void pageBeginRender(PageEvent event) { DossierManagerApplication dossierManagerApplication = getDossierManagerApplication(); ApplicationSettings appSettings = dossierManagerApplication.getAppSettings(); // IS NULL setRequesters(appSettings.getRequesters()); setLanguages(appSettings.getLanguages()); } Thanks for help... BW 2006/7/20, Blackwings [EMAIL PROTECTED]: Thanks a lot, but I have a question again: To what, the id in the module tag, refer? Is it the name of my context? is it app? is it the package where something (what?) is store? Same question for the version. Thanks anyway BW 2006/7/20, Geoff Callender [EMAIL PROTECTED]: BW, No need to touch hivemind.xml. Add a file called hivemodule.xml to WEB-INF, with content similar to this: ?xml version=1.0? module id=jumpstart version= 1.0.0 package=jumpstart.web !-- ServiceLocator and Visit -- contribution configuration-id= tapestry.state.ApplicationObjects state-object name=serviceLocator scope=application create-instance class= jumpstart.web.base.ServiceLocator/ /state-object /contribution contribution configuration-id= tapestry.state.ApplicationObjects state-object name=visit scope=session create-instance class=jumpstart.web.base.Visit/ /state-object /contribution /module In that example, ServiceLocator performs a similar function to the typical Global. Visit is just like the old Visit. Note that the scope of ServiceLocator is application and the scope of Visit is session. Here's an example of them being referenced in a page: @InjectState(serviceLocator) public abstract ServiceLocator getServiceLocator(); @InjectState(visit) // Can't call it getVisit() because it conflicts with a deprecated IPage method public abstract Visit getMyVisit(); Hope this helps. Geoff http://tapestry.apache.org/tapestry4.1/QuickStart/contributed.html On 20/07/2006, at 7:58 PM, Blackwings wrote: Hi, I found in the document what is the line to add into hivemind.xml file to create an ASO since getGlobal is deprecated. But I
Using an Application state object in a service
Hello, I have defined a custom service to generate images on fly. I need to inject an application state object into my service. Normally I would use @InjectState(XXXList) in a page implementation. However this time I need to make a setter and use the set-object property=... or set-configuration property=... element in hivemodule.xml. Configuration: contribution configuration-id=tapestry.state.ApplicationObjects ... state-object name=gelCompareList scope=session create-instance class=com.kodak.mis.web.GelCompareList/ /state-object /contribution service-point id=GelCompareImageService interface=org.apache.tapestry.engine.IEngineService invoke-factory construct class=com.kodak.mis.web.engine.GelCompareImageService set-object property=linkFactory value=service:tapestry.url.LinkFactory/ set??? property=gelCompareList value=state:gelCompareList/ -Here is where I want to inject the state object /construct /invoke-factory /service-point Thanks, Ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Controlling component render order
Hello, I have a page that contains three components and I would like to modify the order in which they are rendered by the page. Is this possible ? As I see from my logs (I made them all implement PageBeginRenderListener to see when their pageBeginRender() method gets called), the last component declared in the HTML is rendered first by the page, and the first in the HTML is rendered last. Right now, the last component to load gets some data from the DB that should modify some property from the first (a form), but this can't happen since it has already rendered. Thanks in advance, Jorge
Re: How much faster have you found tapestry 4 to be over tapestry 3?
Haven't had the tools and opportunity to tell, but seems a lot slower on startup and first-time page load, and perceptibly faster at execution (as long as caching is enabled). On 7/20/06, Skriloff, Nicholas [EMAIL PROTECTED] wrote: How much faster have you found tapestry 4 to be over tapestry 3? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Jakarta HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ASO and hivemind.xml
On 7/20/06, Geoff Callender [EMAIL PROTECTED] wrote: Others might chime in because I'm no expert on this, but this what I believe to be true... - The module id and version can be arbitrary. However, to avoid name clashes you can use the id as a qualifier, eg. @InjectState(jumpstart: serviceLocator) Sorry, this isn't true. As ASOs are typically defined by the application and rarely if every defined by a library, the extra effort for segmenting the ASO namespace did not appear to be worthwhile (in fact, would be a negative, since it would subject users to pain without reward). Thus the ASO namespace is flat, and you'll see errors if you configure more than one ASO with the same name, regardless of module. By contract, the namespace for libraries is rich and nested ... and confusing, and ambiguous, and overkill (just as The Other Geoff). Blackwings would always inject @InjectState(serviceLocator), regardless of what id he gives his module. -- Howard M. Lewis Ship Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Jakarta HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: components in library using only annotations
As I know you do not need to define the components in this case in the .application/.library file. Tapestry will automatically look for them by name in the component/page class packages (http://tapestry.apache.org/tapestry4/UsersGuide/configuration.html#configuration.properties). Regards, Norbi Rowland Smith wrote: Is it possible to package components that have *no* specification (defined using annotations only) into a component library? How is the specification-path defined in the .library file? For example: component-type type=MyComponent specification-path=???/ Thanks, Rowland - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.2/393 - Release Date: 2006.07.19. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Component rendering order and parameter direction
Hi, I have this: search component - param1 - list component - param2 - view component. In a tapestry4 page of mine. The three components all implement renderComponent(). Param1 is set in the search component renderComponent(). Param2 is set in the list component renderComponent(). For this to work properly, the renderComponent() calling order should happen in the order above, otherwise, the parameters param1 and param2 do not have their value properly set before they are needed by the next component. I am seeing that in fact, renderComponent() calling order depends on the order they appear in the html of the page. Is there any way to force the renderComponent() calling order to do the right thing here ? Thanks a lot Henri - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: going from 4.0 to 4.1
Answers inlined. On 7/20/06, Dan Adams [EMAIL PROTECTED] wrote: The stuff in 4.1 looks neat but I have a couple questions about transitioning. I apologize if these have already been answered. - Does it effect your ability to test with htmlunit? We use this a *ton* and testibility is a big issue. Can you test with javascript off and have pages still work normally? Last time I checked htmlunit wasn't capable of processing dojo. Don't know if they've improved their API since. You can test with javascript off and have pages work as much normally as they do now I think. - We probably won't be using the ajax stuff very much, at least not for a while. Can you use 4.1 without it getting in the way? Yep. None of the ajax stuff is on by default unless you explicitly use it, or use a new component based on it. - Are there ton's of API changes? How easy is the switch? There are a few api changes of course. The biggest items that people will notice are: -) All api's marked as being deprecated /removed by 4.1 have been removed. (At least as many as I've found so far). That means no more page.visit/page.global (unless you've injected them in with the same property name by coincidence). No more ActionService/ActionLink. Probably a lot of others I've forgotten. You'll know what you're up against if you turn on deprecated warnings for your project in eclipse before doing an upgrade. :) -) The old javascript form logic has been changed, with one major breaking change. Anything that accessed the client side form objects via form.events.foo won't exist anymore. There are replacement functions to do the same things but those don't exist. The global Tapestry.do foo functions do still exist (but have been marked as deprecated) . I'm not sure how easy the switch is. Other than the items mentioned there shouldn't be too many visible changes that people will notice. It should still be considered very unstable for a while though. (at least until more people use it and expose any issues) -- Dan Adams Software Engineer Interactive Factory 617.235.5857 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
Re: Testing Tapestry application
Here, http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/test/ All ~ 1,500 unit tests in tapestry use the tapestry-testng module from howardlewisship.com. There should be enough in there for more complete examples :) I've also already broken the basic base unit test classes in tapestry out into a new maven project that I've deployed, just haven't genereated a site for it yet with documentation. Eventually, people should be able to use the same testing resources tapestry developers do to test their own components/pages. On 7/20/06, KE Gan [EMAIL PROTECTED] wrote: Hi, I have been coding Tapestry for a few months now. It is really nice to work with, especially with Hivemind tightly integrated ... hence I get to easily unit test my POJOs (domain objects, etc). However, I still have problem unit testing the Tapestry pages of the application. I did try to use HtmlUnit, but that that's more like integration testing. It requires the tomcat and database server to be running. I am wondering what are other Tapestry users are doing to unit testing Tapestry pages without need to use the servlet container ? This would make development much faster! I read a bit here and there about using TestNG + EasyMock [tapestry-testng] ( http://howardlewisship.com/tapestry-javaforge/tapestry-testng/index.html). It seems to be what I am looking for (am I right?), but I cannot find any example about how to using it, or much documentation of how to go about that either. I greatly appreciate if fellow Tapestry users can give some pointers. By the way, what is the development status of tapestry-testng ? Seems like still a 'snapshot' release? When can we see a full release with Tapestry? Thanks. -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
Re: ASO and hivemind.xml
Howard, thanks for the advice. I have to use JDK1.4 so I cannot use annotations. My real problem is to understand how I can instanciate an object at the context load, in the ApplicationServlet via inheritance and to make this object available to my pages. As I already explained, getGlobal is Deprecated so I have to use the ASO and the inject tag. My question is to understand how ;o) I was able to instanciate my object (appSettings in the code I wrote in my previous post), I was able to setup hivemodule.xml to create an instance of an object but i was not able to inject the right instance of the object. Can you help me on this part please? Thanks anyway BW 2006/7/20, Howard Lewis Ship [EMAIL PROTECTED]: On 7/20/06, Geoff Callender [EMAIL PROTECTED] wrote: Others might chime in because I'm no expert on this, but this what I believe to be true... - The module id and version can be arbitrary. However, to avoid name clashes you can use the id as a qualifier, eg. @InjectState(jumpstart: serviceLocator) Sorry, this isn't true. As ASOs are typically defined by the application and rarely if every defined by a library, the extra effort for segmenting the ASO namespace did not appear to be worthwhile (in fact, would be a negative, since it would subject users to pain without reward). Thus the ASO namespace is flat, and you'll see errors if you configure more than one ASO with the same name, regardless of module. By contract, the namespace for libraries is rich and nested ... and confusing, and ambiguous, and overkill (just as The Other Geoff). Blackwings would always inject @InjectState(serviceLocator), regardless of what id he gives his module. -- Howard M. Lewis Ship Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Jakarta HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Portlet hivemodule space in class name?
Looking at the Tapestry 4.02 Portlet source I noticed: construct class=org.apache.tapestry.describe.RootDescriptionReceiverFactory Impl In the hivemodule.xml file. Is the space between 'RootDescriptionReceiverFactory' and 'Impl' a typo? Thanks, Ezra Epstein - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Testing Tapestry application
Jesse, Thanks a lot for the pointers!! And eagerly looking forward for the independent testing module that you will be making available :) Could you please make a announcement here once you did ? By the way, when can we expect it ;) ? Thanks again. On 7/21/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: Here, http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/test/ All ~ 1,500 unit tests in tapestry use the tapestry-testng module from howardlewisship.com. There should be enough in there for more complete examples :) I've also already broken the basic base unit test classes in tapestry out into a new maven project that I've deployed, just haven't genereated a site for it yet with documentation. Eventually, people should be able to use the same testing resources tapestry developers do to test their own components/pages. On 7/20/06, KE Gan [EMAIL PROTECTED] wrote: Hi, I have been coding Tapestry for a few months now. It is really nice to work with, especially with Hivemind tightly integrated ... hence I get to easily unit test my POJOs (domain objects, etc). However, I still have problem unit testing the Tapestry pages of the application. I did try to use HtmlUnit, but that that's more like integration testing. It requires the tomcat and database server to be running. I am wondering what are other Tapestry users are doing to unit testing Tapestry pages without need to use the servlet container ? This would make development much faster! I read a bit here and there about using TestNG + EasyMock [tapestry-testng] ( http://howardlewisship.com/tapestry-javaforge/tapestry-testng/index.html ). It seems to be what I am looking for (am I right?), but I cannot find any example about how to using it, or much documentation of how to go about that either. I greatly appreciate if fellow Tapestry users can give some pointers. By the way, what is the development status of tapestry-testng ? Seems like still a 'snapshot' release? When can we see a full release with Tapestry? Thanks. -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
Re: Testing Tapestry application
I can't really take credit for it. All I did was move java files around to different places and made them use the testing infrastructure that Howard/the team had already created. You can use it now, just don't ask for documentation yet ;) http://people.apache.org/repo/m2-snapshot-repository/org/apache/tapestry/tapestry-test/ On 7/20/06, KE Gan [EMAIL PROTECTED] wrote: Jesse, Thanks a lot for the pointers!! And eagerly looking forward for the independent testing module that you will be making available :) Could you please make a announcement here once you did ? By the way, when can we expect it ;) ? Thanks again. On 7/21/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: Here, http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/test/ All ~ 1,500 unit tests in tapestry use the tapestry-testng module from howardlewisship.com. There should be enough in there for more complete examples :) I've also already broken the basic base unit test classes in tapestry out into a new maven project that I've deployed, just haven't genereated a site for it yet with documentation. Eventually, people should be able to use the same testing resources tapestry developers do to test their own components/pages. On 7/20/06, KE Gan [EMAIL PROTECTED] wrote: Hi, I have been coding Tapestry for a few months now. It is really nice to work with, especially with Hivemind tightly integrated ... hence I get to easily unit test my POJOs (domain objects, etc). However, I still have problem unit testing the Tapestry pages of the application. I did try to use HtmlUnit, but that that's more like integration testing. It requires the tomcat and database server to be running. I am wondering what are other Tapestry users are doing to unit testing Tapestry pages without need to use the servlet container ? This would make development much faster! I read a bit here and there about using TestNG + EasyMock [tapestry-testng] ( http://howardlewisship.com/tapestry-javaforge/tapestry-testng/index.html ). It seems to be what I am looking for (am I right?), but I cannot find any example about how to using it, or much documentation of how to go about that either. I greatly appreciate if fellow Tapestry users can give some pointers. By the way, what is the development status of tapestry-testng ? Seems like still a 'snapshot' release? When can we see a full release with Tapestry? Thanks. -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.