Gradle o Gradle!
Inspired by HLS condolences to us that are still using Maven I tried Gradle out yesterday. And gosh that seem's like a big leap forward. Awesome product and I was almost there in less then an hour! One small step in the other direction was that the scanning of my entity beans totally disappeared. I have filed a question in the Gradle forum ... http://forums.gradle.org/gradle/topics/context_component_scan_stopped_working_after_move_to_gradle Has anyone in this forum encountered something alike !? Thanks in advance and excuse me for asking Gradle related quest in this forum. /Gunnar
Re: fckeditor for Tapestry 5.3 RC2
I got this error - Caused by: java.lang.NoSuchMethodError: org.apache.tapestry5.ioc.Registry.getService(Ljava/lang/Class;)Ljava/lang/Object; at com.orientimport.easyfck.util.LegacyT5ServiceHelper.getService(LegacyT5ServiceHelper.java:40) at com.orientimport.easyfck.connector.FckEditorConnectorBridge.init(FckEditorConnectorBridge.java:70) at net.fckeditor.connector.Dispatcher.(Dispatcher.java:98) at net.fckeditor.connector.Tapestry5InterceptFckActivityFilter.(Tapestry5InterceptFckActivityFilter.java:40) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.google.appengine.tools.development.agent.runtime.Runtime.newInstance_(Runtime.java:112) at com.google.appengine.tools.development.agent.runtime.Runtime.newInstance(Runtime.java:120) at org.apache.tapestry5.ioc.internal.util.ConstructorInvoker.invoke(ConstructorInvoker.java:45) Does it even work with Tapestry 5.3 RC2? :o -- View this message in context: http://tapestry.1045711.n5.nabble.com/fckeditor-for-Tapestry-5-3-tp4983201p4983235.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: fckeditor for Tapestry 5.3
Hi, Easy FCKeditor comes up first with http://www.google.co.uk/search?q=fckeditor+tapestry (I've used it in the past, seems to work well.) http://kenai.com/projects/t5-easy-fckeditor > I don't use Maven just FYI. Um, can you not just visit the Maven Repo's and download the jars manually? Steve. On 11 November 2011 11:50, TG wrote: > Do we have one? If so, any link to setup and download it? I don't use Maven > just FYI. > > Thanks. > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/fckeditor-for-Tapestry-5-3-tp4983201p4983201.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 > > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: EventLinks and their handlers
Cool, cheers Taha, This took me a while to understand so I'll re-iterate for my sake! You're saying for EventLinks we need to drop the "From" clause because the event isn't acutally raised in the eventLink but the container, so the following should work: @OnEvent(value="postConversationEvent") void valueChosen() { System.out.println("annotated version"); } void onPostConversationEvent() { System.out.println("convention version"); } Steve. On 10 November 2011 12:27, Taha Hafeez Siddiqi wrote: > Hi > > EventLinks have event handlers of the form > > on'EventName' > > and the event name defaults to the component id. > > 'FromComponent' is not going to work as the event is triggered in the > container without reference to the component triggering it. This allows > shorter url > > http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/EventLink.html > > regards > Taha > > On Nov 10, 2011, at 3:43 AM, bogdan_cm wrote: > >> I am stuck on a rather silly operation. I have an eventLink in the tml and >> it's event handler in the class like so: >> >> tml -> < a t:id='postConversationLink'>click the link < / a > >> >> class -> >> >> @Component(parameters = {"event=postConversationEvent"}) >> private EventLink postConversationLink; >> >> @OnEvent(value="postConversationEvent", >> component="postConversationLink") >> void valueChosen() >> { >> System.out.println("annotated version"); >> } >> >> void onPostConversationEventFromPostConversationLink() >> { >> System.out.println("convention version"); >> } >> >> >> To me both the annotated version and the convetion version look correct. >> However, for both i get the error: Request event 'postconversationevent' ... >> was not handled. >> From the message it looks like the link is actually generating the event, >> but somehow it cannot be matched to any of the two handlers. >> >> Thank you, >> Bogdan. >> >> -- >> View this message in context: >> http://tapestry.1045711.n5.nabble.com/EventLinks-and-their-handlers-tp4979300p4979300.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 >> > > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
fckeditor for Tapestry 5.3
Do we have one? If so, any link to setup and download it? I don't use Maven just FYI. Thanks. -- View this message in context: http://tapestry.1045711.n5.nabble.com/fckeditor-for-Tapestry-5-3-tp4983201p4983201.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: Rendering Informal Parameters
'hang on - I just re-read your question... Are you wanting to specifiy on where in your .tml the informals are rendered? If so, the call to : resources.renderInformalParameters(writer); renders them on the current element. (The RenderInformals Mixin calls it on the beginRender() phase event hence the informals are writen to the root element.) You probably want something like this (untested, obviously! But worth a try): void onRenderInformals() { resources.renderInformalParameters(writer); } Steve. On 11 November 2011 11:35, Steve Eynon wrote: > I found you also need to put the > > @SupportsInformalParameters > > on your component. See the RenderInformals mixin for an example (or > just use the RenderInformals mixin!) > > Steve. > > > > > On 10 November 2011 06:22, Michael Prescott > wrote: >> That didn't seem to make a difference, but it sounds prudent. >> >> On 9 November 2011 17:09, Lenny Primak wrote: >> >>> AfterRender, not afterRenderBody and beginRender and it should work. >>> >>> >>> >>> On Nov 9, 2011, at 4:58 PM, Michael Prescott >>> wrote: >>> >>> > I had tried those instructions, but I guess I was a bit too rote (not >>> being >>> > familiar with these events, most of my components have templates); I need >>> > to close the element in afterRenderBody(). Thanks for the encouragement >>> to >>> > continue puzzling it out. >>> > >>> > Michael >>> > >>> > On 9 November 2011 16:28, Lenny Primak wrote: >>> > >>> >> You have to have beginRender/afterRender(MarkupWriter) methods >>> >> in your page, and then write the root element in them, and then it >>> should >>> >> work. >>> >> I followed the InformalParameter documentation page and it worked. >>> >> >>> >> On Nov 9, 2011, at 4:25 PM, Michael Prescott wrote: >>> >> >>> >>> How do you render informal parameters if your component has a template >>> >>> file? I've tried using the RenderInformals mixin, but (somewhat >>> >> bizarrely) >>> >>> it puts the informal parameters on the parent element! >>> >> >>> >> >>> >> - >>> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>> >> For additional commands, e-mail: users-h...@tapestry.apache.org >>> >> >>> >> >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>> For additional commands, e-mail: users-h...@tapestry.apache.org >>> >>> >> > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Rendering Informal Parameters
I found you also need to put the @SupportsInformalParameters on your component. See the RenderInformals mixin for an example (or just use the RenderInformals mixin!) Steve. On 10 November 2011 06:22, Michael Prescott wrote: > That didn't seem to make a difference, but it sounds prudent. > > On 9 November 2011 17:09, Lenny Primak wrote: > >> AfterRender, not afterRenderBody and beginRender and it should work. >> >> >> >> On Nov 9, 2011, at 4:58 PM, Michael Prescott >> wrote: >> >> > I had tried those instructions, but I guess I was a bit too rote (not >> being >> > familiar with these events, most of my components have templates); I need >> > to close the element in afterRenderBody(). Thanks for the encouragement >> to >> > continue puzzling it out. >> > >> > Michael >> > >> > On 9 November 2011 16:28, Lenny Primak wrote: >> > >> >> You have to have beginRender/afterRender(MarkupWriter) methods >> >> in your page, and then write the root element in them, and then it >> should >> >> work. >> >> I followed the InformalParameter documentation page and it worked. >> >> >> >> On Nov 9, 2011, at 4:25 PM, Michael Prescott wrote: >> >> >> >>> How do you render informal parameters if your component has a template >> >>> file? I've tried using the RenderInformals mixin, but (somewhat >> >> bizarrely) >> >>> it puts the informal parameters on the parent element! >> >> >> >> >> >> - >> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> >> >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: lesscss
Yeh I noticed that thread but looked like unfinished business with comments that 5.3 would be able to help. Seemed like lesscss would of been a great addition in the tapestry tool belt. C On Nov 10, 2011, at 5:54 PM, Steve Eynon wrote: > Non myself but I found these threads on Nabble: > > Compiled CSS > http://tapestry.1045711.n5.nabble.com/Compiled-CSS-td4872738.html > > GZip Filter getting in the way of my LessCSS Filter > http://tapestry.1045711.n5.nabble.com/GZip-Filter-getting-in-the-way-of-my-LessCSS-Filter-td4491550.html > > Steve. > > On 11 November 2011 08:33, Chris Collins wrote: >> Anyone have any experiences using lesscss with tapestry? >> >> I am not using it but came highly recommended. >> >> Best >> >> C >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: lesscss
Non myself but I found these threads on Nabble: Compiled CSS http://tapestry.1045711.n5.nabble.com/Compiled-CSS-td4872738.html GZip Filter getting in the way of my LessCSS Filter http://tapestry.1045711.n5.nabble.com/GZip-Filter-getting-in-the-way-of-my-LessCSS-Filter-td4491550.html Steve. On 11 November 2011 08:33, Chris Collins wrote: > Anyone have any experiences using lesscss with tapestry? > > I am not using it but came highly recommended. > > Best > > C > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Clearing form errors problem
Sounds like you want a StreamResponse to be returned AND and a page refresh at the same time - unfortunately HTTP doesn't allow this. A technique would be return the page, then re-direct the user to a different page / event link which returns the CSV. It's also discussed in this thread: http://tapestry.1045711.n5.nabble.com/StreamResponse-on-Success-td2434690.html#a2434692 Steve. On 10 November 2011 19:08, goldenka wrote: > I have something linke: > > t:format="dd/MM/" t:type="DateField" validate="required" /> > > > and validation is server-side (onValidateForm() method) so I think i must > use JavaScript. Can you provide me some simple solution ? I think I must > remove some div's, but don't know how to do this... > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Clearing-form-errors-problem-tp4971307p4980738.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 > > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
lesscss
Anyone have any experiences using lesscss with tapestry? I am not using it but came highly recommended. Best C - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Binding form fields to map elements
Thanks very much, Thiago. On 10 November 2011 13:02, Thiago H. de Paula Figueiredo wrote: > On Thu, 10 Nov 2011 14:58:41 -0200, Michael Prescott < > michael.r.presc...@gmail.com> wrote: > > Can you bind form fields to map elements? >> > > Not directly, but you can create getter and setter methods that read and > write to maps instead of reading and writing fields. > > > In OGNL, you can access map elements as parameters, such as: >> myMap.width >> > > ChenilleKit provides an OGNL binding, so you can use it. > > -- > Thiago H. de Paula Figueiredo > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, > and instructor > Owner, Ars Machina Tecnologia da Informação Ltda. > http://www.arsmachina.com.br >
Re: Binding form fields to map elements
On Thu, 10 Nov 2011 14:58:41 -0200, Michael Prescott wrote: Can you bind form fields to map elements? Not directly, but you can create getter and setter methods that read and write to maps instead of reading and writing fields. In OGNL, you can access map elements as parameters, such as: myMap.width ChenilleKit provides an OGNL binding, so you can use it. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Binding form fields to map elements
Can you bind form fields to map elements? In OGNL, you can access map elements as parameters, such as: myMap.width This is a read/writable property expression that corresponds to myMap.get("width") and .put("width", value ). By way of background - In my domain model, I have a collection of entities, each of which has a bundle of dynamic properties stored by a Map. The entities are rendered a table, with their properties as columns. The fully dynamic implementation is a little scary, and a map-value property expression would save some complexity.
Re: get a value from the select component
Hi The error seems to be in onValidate() Are you using onValidateFromForm() i.e. are you specifying the component otherwise it will be called for each component. Also, if you are using validations in the form e.g. validate='required' etc then you have to check it in onValidate() by using if(form.getHasErrors()){ return; } regards Taha On Nov 10, 2011, at 9:36 PM, walidh wrote: > NullPointer
Re: get a value from the select component
here is the stack trace [ERROR] ioc.Registry org.apache.tapestry5.runtime.ComponentEventException [ERROR] ioc.Registry Operations trace: [ERROR] ioc.Registry [ 1] Triggering event 'action' on Register:registrationform [ERROR] ioc.Registry [ 2] Triggering event 'validate' on Register:street1 [ERROR] TapestryModule.RequestExceptionHandler Processing of request failed with uncaugh exception: org.apache.tapestry5.runtime.ComponentEventException org.apache.tapestry5.runtime.ComponentEventException [at classpath:com/shopff/pages/Regi er.tml, line 10] at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEvent iggering(ComponentPageElementImpl.java:1152) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3000( mponentPageElementImpl.java:72) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$7.invoke(Com nentPageElementImpl.java:1077) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$7.invoke(Com nentPageElementImpl.java:1075) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTracke mpl.java:65) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadO rationTracker.java:68) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1063) at org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl.inv e(ComponentPageElementResourcesImpl.java:141) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerConte Event(ComponentPageElementImpl.java:1073) at org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handl ComponentEventRequestHandlerImpl.java:81) at org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.ha le(ImmediateActionRenderResponseFilter.java:42) at $ComponentEventRequestHandler_1338e00ae0d.handle($ComponentEventRequestHandle 1338e00ae0d.java) at org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42) at $ComponentEventRequestHandler_1338e00ae0d.handle($ComponentEventRequestHandle 1338e00ae0d.java) at org.apache.tapestry5.services.TapestryModule$39.handle(TapestryModule.java:25 ) at $ComponentEventRequestHandler_1338e00ae0d.handle($ComponentEventRequestHandle 1338e00ae0d.java) at $ComponentEventRequestHandler_1338e00aca8.handle($ComponentEventRequestHandle 1338e00aca8.java) at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.hand ComponentEvent(ComponentRequestHandlerTerminator.java:43) at org.apache.tapestry5.services.InitializeActivePageName.handleComponentEvent(I tializeActivePageName.java:39) at $ComponentRequestHandler_1338e00acaa.handleComponentEvent($ComponentRequestHa ler_1338e00acaa.java) at $ComponentRequestHandler_1338e00ac8e.handleComponentEvent($ComponentRequestHa ler_1338e00ac8e.java) at org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(Comp entEventDispatcher.java:46) at $Dispatcher_1338e00ac90.dispatch($Dispatcher_1338e00ac90.java) at $Dispatcher_1338e00ac8b.dispatch($Dispatcher_1338e00ac8b.java) at org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service apestryModule.java:321) at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErro ilter.java:26) at $RequestHandler_1338e00ac8c.service($RequestHandler_1338e00ac8c.java) at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:98 at $RequestHandler_1338e00ac8c.service($RequestHandler_1338e00ac8c.java) at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:97 at $RequestHandler_1338e00ac8c.service($RequestHandler_1338e00ac8c.java) at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesF ter.java:90) at $RequestHandler_1338e00ac8c.service($RequestHandler_1338e00ac8c.java) at com.shopff.services.AppModule$1.service(AppModule.java:93) at $RequestFilter_1338e00ac87.service($RequestFilter_1338e00ac87.java) at $RequestHandler_1338e00ac8c.service($RequestHandler_1338e00ac8c.java) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckFo pdatesFilter.java:90) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckFo pdatesFilter.java:81) at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentB rier.java:85) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckFor datesFilter.java:103) at $RequestHandler_1338e00ac8c.service($RequestHandler_1338e00ac8c.java) at $RequestHandler_1338e00ac81.service($RequestHandler_1338e00ac81.java) at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTermina r.service(Tap
get a value from the select component
Hi, I'm creating a registration form (not using BeanEditForm) and I could display a select component with a list of values using in my .tml : Those values come from a Countries enum type. However in the java file corresponding to the form page (Register.java), I could not get the selected value of the form. I get NullPointerException as soon as I submit the form. I have declared the enum in Register.java like this : @Property @Persist private Countries countries; But I could not get the selected value. I tried many things like declaring the following method in my Enum class. public static void contributeTypeCoercer(Configuration configuration) { configuration.add(new CoercionTuple( String.class, Countries.class, StringToEnumCoercion.create(Countries.class) )); } It should be easy to do but I could not do this, thanks for helping a Tapestry newbie. -- View this message in context: http://tapestry.1045711.n5.nabble.com/get-a-value-from-the-select-component-tp4981399p4981399.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: [ANN] @Exclude for css
Nice one Barry, you made my day... if only it happened every time I made a suggestion that someone else went if and did the work ;o) - Original Message - From: "Barry Books" To: "Tapestry users" Sent: Thursday, 10 November, 2011 15:11:05 GMT +02:00 Athens, Bucharest, Istanbul Subject: [ANN] @Exclude for css I've been following the CSS discussions here and I needed a way to exclude css defaults added by modules. The @Exclude suggestion seemed like the way to go so I wrote one and included it in https://github.com/trsvax/tapestry-bootstrap I also wrote a description of how it works http://trsvax.com/blog/TapestryHasNoStyle I have not done much testing and comments/suggestions are welcome. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[ANN] @Exclude for css
I've been following the CSS discussions here and I needed a way to exclude css defaults added by modules. The @Exclude suggestion seemed like the way to go so I wrote one and included it in https://github.com/trsvax/tapestry-bootstrap I also wrote a description of how it works http://trsvax.com/blog/TapestryHasNoStyle I have not done much testing and comments/suggestions are welcome. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Clearing form errors problem
I have something linke: and validation is server-side (onValidateForm() method) so I think i must use JavaScript. Can you provide me some simple solution ? I think I must remove some div's, but don't know how to do this... -- View this message in context: http://tapestry.1045711.n5.nabble.com/Clearing-form-errors-problem-tp4971307p4980738.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: Clearing form errors problem
On Thu, 10 Nov 2011 08:49:22 -0200, goldenka wrote: Thank you for your response. So can you tell me how to clear those errors because I have no idea how to do this? Are you using client-side validation? It will clear errors automatically. Any other solution will involve JavaScript, as HTTP supports only one response for each request. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Clearing form errors problem
Thank you for your response. So can you tell me how to clear those errors because I have no idea how to do this? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Clearing-form-errors-problem-tp4971307p4980700.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: Clearing form errors problem
On Thu, 10 Nov 2011 08:31:28 -0200, goldenka wrote: Hi, I'm trying to clear errors which happened before - so eg. user inserted invalid date => pressed Download => error void onValidateForm() { if(dateTo == null) { form.recordError("Please insert valid date to!"); return; } } but after that user corrected the date and pressed Download => the file is downloading but the error "Please insert valid date to!" is still in the form. It's still there because you cleared the form errors server-side, not client-side. As you're returning a StreamResponse, no changes are done in the page DOM. In addition, as Steve said, onSuccess() will never be invoked with validation errors. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Clearing form errors problem
Hi, I'm trying to clear errors which happened before - so eg. user inserted invalid date => pressed Download => error void onValidateForm() { if(dateTo == null) { form.recordError("Please insert valid date to!"); return; } } but after that user corrected the date and pressed Download => the file is downloading but the error "Please insert valid date to!" is still in the form. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Clearing-form-errors-problem-tp4971307p4980644.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: Clearing form errors problem
Hi, I'm a bit confused... StreamResponse onSuccess() { form.clearErrors(); ... } OnSuccess() is only called when there are no errors in the form, so what are you trying to clear, and how do you know it's not working? Steve. On 10 November 2011 17:37, goldenka wrote: > StreamResponse onSuccess() { > form.clearErrors(); - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Clearing form errors problem
Ok, I'm returning StreamResponse instead (in onSuccess() method). StreamResponse onSuccess() { form.clearErrors(); return new StreamResponse() { public String getContentType() { return "text/csv;charset=windows-1250"; } public InputStream getStream() throws IOException { return new ByteArrayInputStream(sb.toString().getBytes()); } public void prepareResponse(Response response) { response.setHeader("Content-Disposition", "attachment; filename="+filename); } }; } But again, form.clearErrors() don't work! -- View this message in context: http://tapestry.1045711.n5.nabble.com/Clearing-form-errors-problem-tp4971307p4980522.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: T5.3 rc3 ordering of css
On Nov 9, 2011, at 12:45 PM, Ville wrote: > Thanks for the input again, live and learn :) > > In case anyone comes looking, the easiest way is to set a class "c" to body > and prepend all your styles with .c. or if you have .t-error{color:red;} coming from your default.css you can add BODY .t-error{color:green;} to your own css. This saves you from having to add classes to every page. > > - Ville cheers, Joost > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/T5-3-rc3-ordering-of-css-tp4969412p4977487.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 > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org