Getting list of Pages containing a specific annotation
Hi, Is there anyway of getting list of all pages containing a specific annotation. for example , if I want to get all tapestry page class names containing one annotation @TestPage. I tried by writing a ComponentClassTransformWorker, but this is working only when the page is invoked. I tried writing ApplicationInitializerFilter also and using ComponentClassResolver I can get page names and classes. But I think I need to use some library like javaassit to get only pages with specific annotation. Is there any elegant way of doing this? Chakra -- View this message in context: http://www.nabble.com/Getting-list-of-Pages-containing-a-specific-annotation-tp25212402p25212402.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
advanced localization
Hi, I'm studying advanced localization techniques right now, and realised that T5 message bundles has no framework support for plural forms. Are there any solutions that take into account tapestry component hierarchies? Of course it is possible to just use GNU gettext solution, but it knows nothing about T5 component owned message bundles. What do you think about making such feature request? Regards, Sergey. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: ServletOutputStream gives null pointer in v5.1.0.5 but not in v5.0.18
I post this mail again, now with the stack trace added below the code: To get a file from disk I wrote this code below. It works perfectly in version 5.0.18 but it generates a null pointer in v5.1.0.5. I checked the release notes to no avail. What's going on here? Apparently a gzip service is needed now? Object onActionFromGetParticipantsFile() { String method = get; try { FileInputStream fInput = new FileInputStream(fileName); byte[] bytes = new byte[fInput.available()]; fInput.read(bytes, 0, fInput.available()); if (bytes != null) { ServletOutputStream stream = response.getHTTPServletResponse().getOutputStream(); response.getHTTPServletResponse().setContentType(text/plain); response.getHTTPServletResponse().setContentLength(bytes.length); response.getHTTPServletResponse().setHeader(Content-Disposition, method + ;filename= +fileName; stream.write(bytes); line 446 in the code: Here it comes up with the null pointer, although the stream object exists as I checked that. stream.flush(); stream.close(); return response; } } catch (Exception e) { e.printStackTrace(); } return new TextStreamResponse(text/plain, String.format(file + fileName+ not found)); java.lang.NullPointerException at org.apache.tapestry5.internal.services.ResponseCompressionAnalyzerImpl.isCompressable(ResponseCompressionAnalyzerImpl.java:65) at $ResponseCompressionAnalyzer_1236c9345b8.isCompressable($ResponseCompressionAnalyzer_1236c9345b8.java) at org.apache.tapestry5.internal.gzip.BufferedGZipOutputStream.openResponseOutputStream(BufferedGZipOutputStream.java:77) at org.apache.tapestry5.internal.gzip.BufferedGZipOutputStream.checkForCutover(BufferedGZipOutputStream.java:70) at org.apache.tapestry5.internal.gzip.BufferedGZipOutputStream.write(BufferedGZipOutputStream.java:108) at mobiquete.pages.SurveyDeploy.onActionFromGetParticipantsFile(SurveyDeploy.java:446) at mobiquete.pages.SurveyDeploy.dispatchComponentEvent(SurveyDeploy.java) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:902) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1081) at org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:75) at org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42) at $ComponentEventRequestHandler_1236c934654.handle($ComponentEventRequestHandler_1236c934654.java) at org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42) at $ComponentEventRequestHandler_1236c934654.handle($ComponentEventRequestHandler_1236c934654.java) at org.apache.tapestry5.upload.internal.services.UploadExceptionFilter.handle(UploadExceptionFilter.java:75) at $ComponentEventRequestHandler_1236c934654.handle($ComponentEventRequestHandler_1236c934654.java) at org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2164) at $ComponentEventRequestHandler_1236c934654.handle($ComponentEventRequestHandler_1236c934654.java) at $ComponentEventRequestHandler_1236c9345d9.handle($ComponentEventRequestHandler_1236c9345d9.java) at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43) at $ComponentRequestHandler_1236c9345cd.handleComponentEvent($ComponentRequestHandler_1236c9345cd.java) at org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46) at $Dispatcher_1236c9345cf.dispatch($Dispatcher_1236c9345cf.java) at $Dispatcher_1236c9345c5.dispatch($Dispatcher_1236c9345c5.java) at org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245) at mobiquete.services.AppModule$1.service(AppModule.java:96) at $RequestFilter_1236c9345c4.service($RequestFilter_1236c9345c4.java) at $RequestHandler_1236c9345c6.service($RequestHandler_1236c9345c6.java) at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) at $RequestHandler_1236c9345c6.service($RequestHandler_1236c9345c6.java) at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778) at $RequestHandler_1236c9345c6.service($RequestHandler_1236c9345c6.java) at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767) at $RequestHandler_1236c9345c6.service($RequestHandler_1236c9345c6.java) at
Re: Getting list of Pages containing a specific annotation
Don't know if there's a T5 way of getting to those annotations, but i've used http://scannotation.sourceforge.net/ for similar purposes On Sun, Aug 30, 2009 at 6:14 PM, chakrachakri.tut...@gmail.com wrote: Hi, Is there anyway of getting list of all pages containing a specific annotation. for example , if I want to get all tapestry page class names containing one annotation @TestPage. I tried by writing a ComponentClassTransformWorker, but this is working only when the page is invoked. I tried writing ApplicationInitializerFilter also and using ComponentClassResolver I can get page names and classes. But I think I need to use some library like javaassit to get only pages with specific annotation. Is there any elegant way of doing this? Chakra -- View this message in context: http://www.nabble.com/Getting-list-of-Pages-containing-a-specific-annotation-tp25212402p25212402.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr Tapestry / Tacos developer Open Source / JEE Consulting - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Multiple images
Hi, Did you manage to find a solution to this? I am also trying to render multiple chart images into the same page. However, the service renders the same image (the last one). Thanks. Olexandr Yuzikov wrote: Hi, everyone. I have a problem to represent a couple of images stored in database. The page has a property of type List with beans that keeps images in byte arrays. I need to render those images in the iterator on the same page. It seems may be like in tapestry Workbench tutorial with a dynamic chart but with more than one image. I did like in tutorial but service always renders the same image (generally the last in the list). Does anybody have any experience to render more than one image on the page? Thanks for answering. -- View this message in context: http://www.nabble.com/Multiple-images-tp387585p25217486.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Question about SpringModuleDef
Please add an issue to JIRA. On Sat, Aug 29, 2009 at 6:53 PM, Andrey Larionovanlario...@gmail.com wrote: In SpringModuleDef exists private method locateExternalContext. It has return type of ConfigurableWebApplicationContext. But its calls only from contructor where assignment occurs to variable with type of ApplicationContext. It highly limits me on programmaticaly creating server context and passing into it SpringContext without implementing ConfigurableWebApplicationContext. Thanks - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: ValidateForm Event
Thanks for your response. Could you explain what you mean by keeping my validation in the correct callback? Benny Law On Sun, Aug 30, 2009 at 1:40 AM, newtonik newto...@gmail.com wrote: I think you should use the onValidateForm for both field level and cross-field validation to keep your validation in the correct callback. I would just use nested loops to first check for field level validation then if successful, perform cross field validation. Benny Law wrote: Hello, I am new to Tapestry 5 and have a question about the ValidateForm event. I understand that this event is where cross-field validations should be done, but I find that before I can do the validations, I first need to check if there are any field-level validation errors with those fields that I want to cross validate. To avoid this extra work, I end up doing my cross-field validations in the Success event instead. It seems to me that the ValidateForm event would be more useful if it was triggered only when there are no field validation errors, similar to the Success event. Did I miss something, or are there others who share my view? Thanks in advance, Benny Law -- View this message in context: http://www.nabble.com/ValidateForm-Event-tp25205192p25208900.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org