How to get rid of some T5 stack traces ...
Hi ! Our production servers get hitted by our users as well as robots as well as ... The stack trace below appears now and then and I would like to get rid of it. I haven't yet turned on production mode since we thought that bug haunting should be easier if not. So my questiosn are: + Will the trace disappear if PROD mode is enabled. + Is there a smart way to get rid of it without turning on PROD mode. ? How do I best find out what the request is that is causing this trace? Thanks in advance! /Gunnar Eketrapp (from a very cold and snowy Stockholm) 4:09:18.842 [http-8080-Processor14] ERROR o.a.t.s.T.RequestExceptionHandler - Processing of request failed with uncaught exception: Forms require that the request method be POST and that the t:formdata query parameter have values. org.apache.tapestry5.runtime.ComponentEventException: Forms require that the request method be POST and that the t:formdata query parameter have values. at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1098) [tapestry-core-5.1.0.5.jar:na] at org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:75) [tapestry-core-5.1.0.5.jar:na] at org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42) [tapestry-core-5.1.0.5.jar:na] at $ComponentEventRequestHandler_12661a80307.handle($ComponentEventRequestHandler_12661a80307.java) [tapestry-ioc-5.1.0.5.jar:na] at org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42) [tapestry-core-5.1.0.5.jar:na] at $ComponentEventRequestHandler_12661a80307.handle($ComponentEventRequestHandler_12661a80307.java) [tapestry-ioc-5.1.0.5.jar:na] at org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2164) [tapestry-core-5.1.0.5.jar:na] at $ComponentEventRequestHandler_12661a80307.handle($ComponentEventRequestHandler_12661a80307.java) [tapestry-ioc-5.1.0.5.jar:na] at $ComponentEventRequestHandler_12661a801ea.handle($ComponentEventRequestHandler_12661a801ea.java) [tapestry-ioc-5.1.0.5.jar:na] at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43) [tapestry-core-5.1.0.5.jar:na] at $ComponentRequestHandler_12661a8018c.handleComponentEvent($ComponentRequestHandler_12661a8018c.java) [tapestry-ioc-5.1.0.5.jar:na] at org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46) [tapestry-core-5.1.0.5.jar:na] at $Dispatcher_12661a8018e.dispatch($Dispatcher_12661a8018e.java) [tapestry-ioc-5.1.0.5.jar:na] at $Dispatcher_12661a80183.dispatch($Dispatcher_12661a80183.java) [tapestry-ioc-5.1.0.5.jar:na] at org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245) [tapestry-core-5.1.0.5.jar:na] at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) [tapestry-core-5.1.0.5.jar:na] at $RequestHandler_12661a80184.service($RequestHandler_12661a80184.java) [tapestry-ioc-5.1.0.5.jar:na] at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778) [tapestry-core-5.1.0.5.jar:na] at $RequestHandler_12661a80184.service($RequestHandler_12661a80184.java) [tapestry-ioc-5.1.0.5.jar:na] at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767) [tapestry-core-5.1.0.5.jar:na] at $RequestHandler_12661a80184.service($RequestHandler_12661a80184.java) [tapestry-ioc-5.1.0.5.jar:na] at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85) [tapestry-core-5.1.0.5.jar:na] at $RequestHandler_12661a80184.service($RequestHandler_12661a80184.java) [tapestry-ioc-5.1.0.5.jar:na] at com.tellpoker.services.AppModule$1.service(AppModule.java:146) [AppModule$1.class:na] at $RequestFilter_12661a8017f.service($RequestFilter_12661a8017f.java) [tapestry-ioc-5.1.0.5.jar:na] at $RequestHandler_12661a80184.service($RequestHandler_12661a80184.java) [tapestry-ioc-5.1.0.5.jar:na] at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90) [tapestry-core-5.1.0.5.jar:na] at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81) [tapestry-core-5.1.0.5.jar:na] at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85) [tapestry-ioc-5.1.0.5.jar:na] at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103) [tapestry-core-5.1.0.5.jar:na] at $RequestHandler_12661a80184.service($RequestHandler_12661a80184.java)
Re: kaptcha + tapestry5
Alternatively, use Chenillekit's Kaptcha component. It works for me. myPage.tml: t:chenillekit.Kaptcha t:id=kaptcha t:value=kaptchaCorrect/ myPage.java: import org.chenillekit.tapestry.core.components.Kaptcha; ... @Property private boolean _kaptchaCorrect; ... @Component(id = kaptcha) private Kaptcha _kaptchaField; ... void onValidateForm() { ... if (!_kaptchaCorrect) { _form.recordError(_kaptchaField, getMessages().format(Kaptcha_incorrect)); return; } ... } app.properties: Kaptcha_incorrect=The code has not been entered correctly. Please try again. See http://chenillekit.codehaus.org/chenillekit-tapestry/ref/org/chenillekit/tapestry/core/components/Kaptcha.html . If you're using Ant, then here's how to get the jars, where ${maven.repo.root} is typically http://repo1.maven.org/maven2: get dest=${lib.compile.dir}/chenillekit-core-1.2.0.jar usetimestamp=true src=${maven.repo.root}/org/chenillekit/chenillekit-core/1.2.0/chenillekit-core-1.2.0.jar / get dest=${lib.compile.dir}/chenillekit-image-1.2.0.jar usetimestamp=true src=${maven.repo.root}/org/chenillekit/chenillekit-image/1.2.0/chenillekit-image-1.2.0.jar / get dest=${lib.compile.dir}/chenillekit-tapestry-1.2.0.jar usetimestamp=true src=${maven.repo.root}/org/chenillekit/chenillekit-tapestry/1.2.0/chenillekit-tapestry-1.2.0.jar / Cheers, Geoff http://jumpstart.doublenegative.com.au:8080/jumpstart/ On 28/01/2010, at 3:39 AM, Rafa88 wrote: Thiago H. de Paula Figueiredo wrote: On Wed, 27 Jan 2010 14:14:22 -0200, Rafa88 geli...@hotmail.com wrote: HEllo, Hi! I´m trying to insert kaptcha with tapestry with rcaptcha.net but I don´t know how to do... Some help? Take a look at http://tapestryjava.blogspot.com/2009/12/tapestry-and-kaptcha.html. Ok, thanks, I´m trying this example but I don´t understand because it doesn´t work. I have include the jar file, I have created the two classes but it doesn´t work when I call to t:kaptchaimage t:id=kaptcha/ br/ t:kaptchafield image=kaptcha/ in my file.tml, how the file.java would be?? Thanks -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, 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 -- View this message in context: http://old.nabble.com/kaptcha-%2B-tapestry5-tp27342207p27342668.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
Updating a Zone with Actionlink doesn't work (Return type can not be handled)
Hi there, I'm currently writing an application, which uses Tapestry 5.1. So far, I have no problems, but now I try to add some AJAX support. I want to update a Zone on my page, if the user clicks an actionlink. For this, I use the following code: t:zone t:id=catsZone t:actionlink t:id=myActionlink zone=catsZonetext/t:actionlink /t:zone und in der Java Datei @InjectComponent private Zone _catsZone; Object onActionFromMyActionlink(){ return _catsZone.getBody(); } The same problem occures, if I use a Beaneditform in a Zone: t:zone t:id=myZone t:beaneditform object=myUser zone=myZone/ /t:zone In both versions, I get the following error: Return type org.apache.tapestry5.internal.structure.BlockImpl can not be handled. Configured return types are... Could you please help me with this issue? I don't know, where my error is :( A test with request.isXHR() always returns false... Thanks a lot! - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Updating a Zone with Actionlink doesn't work (Return type can not be handled)
Make sure Javascript is enabled and there are no Javascript errors in your page. By the way, when Request.isXHR() returns false, you should return null to refresh the page. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, 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: Updating a Zone with Actionlink doesn't work (Return type can not be handled)
Wow, that was fast, thank you very much... I don't use any custom javascript and other thinks like a autocomplete work, so I don't think, it's a problem with my configuration. To return null is what I do if(request.isXHR) { return zone.getBody(); } else return null; On 28.01.2010 14:13, Thiago H. de Paula Figueiredo wrote: Make sure Javascript is enabled and there are no Javascript errors in your page. By the way, when Request.isXHR() returns false, you should return null to refresh the page. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Updating a Zone with Actionlink doesn't work (Return type can not be handled)
On Thu, 28 Jan 2010 11:36:07 -0200, Alexander Muthmann amuthm...@dev-eth0.de wrote: I don't use any custom javascript and other thinks like a autocomplete work, so I don't think, it's a problem with my configuration. To return null is what I do if(request.isXHR) { return zone.getBody(); } else return null; Use Firebug and/or Web Developer (Firefox addons) to check if anything is going wrong in the Javascript side. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, 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: Updating a Zone with Actionlink doesn't work (Return type can not be handled)
The only error is caused by prototype: Error: throw $continue is deprecated, use return instead { message=throw $continue is deprecated, use return instead, more...} Line: 4159 File: https://localhost/assets/scriptaculous/5.1.0.5/prototype.js Nothing else On 28.01.2010 14:45, Thiago H. de Paula Figueiredo wrote: On Thu, 28 Jan 2010 11:36:07 -0200, Alexander Muthmann amuthm...@dev-eth0.de wrote: I don't use any custom javascript and other thinks like a autocomplete work, so I don't think, it's a problem with my configuration. To return null is what I do if(request.isXHR) { return zone.getBody(); } else return null; Use Firebug and/or Web Developer (Firefox addons) to check if anything is going wrong in the Javascript side.
Easy Way to create a select model?
I feel a little dumb, because for years I have been using Tapestry. Is there an _easy_ way og creating a SelectModel like this one (not so uncommon one): valuelabel - 1 Jan 2 Feb ... I had a look at the documentation. But I cannot believe I have to deal with SelectModel, OptionModel, OptionGroupModel and whatelse for this simple usecase. I also had a look at the Wiki. I found four pages about selects. I cannot believe that I have to use such bloat for my usecase. I surely must be missing something, or not? Andy - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Easy Way to create a select model?
something like this: usage: SelectModel m = SelectModelUtils.toBeanSelectModel(someList, name, id ); explanation: use the value of the property name as label, the value of the id property as value; assuming that the bean within the list contains this properties (RuntimeException otherwise) code: public class SelectModelUtils { private static final BeanUtilsBean beanUtil = BeanUtilsBean. getInstance(); /** * Converts a list of beans to a {...@link SelectModel} using the values of labelField and valueField. */ public static E SelectModel toBeanSelectModel(ListE beanList, String labelField, String valueField) { return new SimpleSelectModel(toBeanOptionModels(beanList, labelField, valueField)); } public static E SelectModel toBeanSelectModel(ListE input, String labelField) { return toBeanSelectModel(input, labelField, null); } /** * Converts a list of beans to a list of {...@link OptionModel}s using getters for label and value. */ private static E ListOptionModel toBeanOptionModels(ListE beanList, String labelField, String valueField) { Defense.notNull(beanList, beanList); ListOptionModel result = newList(); for (E bean : beanList) result.add(toBeanOptionModel(bean, labelField, valueField)); return result; } /** * Converts an bean to an {...@link OptionModel} using getters for label and value. */ private static E OptionModel toBeanOptionModel(E bean, String labelField, String valueField) { if(bean != null) try { String label = beanUtil.getProperty(bean, labelField); Object value = valueField == null ? bean : beanUtil.getPropertyUtils().getProperty(bean, valueField); return new SimpleOptionModelObject(value, label); } catch (Exception e) { throw new RuntimeException(e); } return new SimpleOptionModelE(bean); } } Andy Pahne andy.pa...@gmail.com 28.01.2010 15:14 Bitte antworten an Tapestry users users@tapestry.apache.org An users@tapestry.apache.org Kopie Thema Easy Way to create a select model? I feel a little dumb, because for years I have been using Tapestry. Is there an _easy_ way og creating a SelectModel like this one (not so uncommon one): valuelabel - 1 Jan 2 Feb ... I had a look at the documentation. But I cannot believe I have to deal with SelectModel, OptionModel, OptionGroupModel and whatelse for this simple usecase. I also had a look at the Wiki. I found four pages about selects. I cannot believe that I have to use such bloat for my usecase. I surely must be missing something, or not? Andy - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Easy Way to create a select model?
Hi Kristian. Thanks for the code. It does not compile right now. Do you have the source for SimpleOptionModelT also available? Thnak you, Andy Am 28.01.2010 15:17, schrieb Kristian Marinkovic: something like this: usage: SelectModel m = SelectModelUtils.toBeanSelectModel(someList, name, id ); explanation: use the value of the property name as label, the value of the id property as value; assuming that the bean within the list contains this properties (RuntimeException otherwise) code: public class SelectModelUtils { private static final BeanUtilsBean beanUtil = BeanUtilsBean. getInstance(); /** * Converts a list of beans to a {...@link SelectModel} using the values of labelField and valueField. */ public staticE SelectModel toBeanSelectModel(ListE beanList, String labelField, String valueField) { return new SimpleSelectModel(toBeanOptionModels(beanList, labelField, valueField)); } public staticE SelectModel toBeanSelectModel(ListE input, String labelField) { return toBeanSelectModel(input, labelField, null); } /** * Converts a list of beans to a list of {...@link OptionModel}s using getters for label and value. */ private staticE ListOptionModel toBeanOptionModels(ListE beanList, String labelField, String valueField) { Defense.notNull(beanList, beanList); ListOptionModel result = newList(); for (E bean : beanList) result.add(toBeanOptionModel(bean, labelField, valueField)); return result; } /** * Converts an bean to an {...@link OptionModel} using getters for label and value. */ private staticE OptionModel toBeanOptionModel(E bean, String labelField, String valueField) { if(bean != null) try { String label = beanUtil.getProperty(bean, labelField); Object value = valueField == null ? bean : beanUtil.getPropertyUtils().getProperty(bean, valueField); return new SimpleOptionModelObject(value, label); } catch (Exception e) { throw new RuntimeException(e); } return new SimpleOptionModelE(bean); } } - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Easy Way to create a select model?
It also contains a function call newList(), but this method isn't there. Am 28.01.2010 15:17, schrieb Kristian Marinkovic: something like this: usage: SelectModel m = SelectModelUtils.toBeanSelectModel(someList, name, id ); explanation: use the value of the property name as label, the value of the id property as value; assuming that the bean within the list contains this properties (RuntimeException otherwise) code: public class SelectModelUtils { private static final BeanUtilsBean beanUtil = BeanUtilsBean. getInstance(); /** * Converts a list of beans to a {...@link SelectModel} using the values of labelField and valueField. */ public staticE SelectModel toBeanSelectModel(ListE beanList, String labelField, String valueField) { return new SimpleSelectModel(toBeanOptionModels(beanList, labelField, valueField)); } public staticE SelectModel toBeanSelectModel(ListE input, String labelField) { return toBeanSelectModel(input, labelField, null); } /** * Converts a list of beans to a list of {...@link OptionModel}s using getters for label and value. */ private staticE ListOptionModel toBeanOptionModels(ListE beanList, String labelField, String valueField) { Defense.notNull(beanList, beanList); ListOptionModel result = newList(); for (E bean : beanList) result.add(toBeanOptionModel(bean, labelField, valueField)); return result; } /** * Converts an bean to an {...@link OptionModel} using getters for label and value. */ private staticE OptionModel toBeanOptionModel(E bean, String labelField, String valueField) { if(bean != null) try { String label = beanUtil.getProperty(bean, labelField); Object value = valueField == null ? bean : beanUtil.getPropertyUtils().getProperty(bean, valueField); return new SimpleOptionModelObject(value, label); } catch (Exception e) { throw new RuntimeException(e); } return new SimpleOptionModelE(bean); } } Andy Pahneandy.pa...@gmail.com 28.01.2010 15:14 Bitte antworten an Tapestry usersusers@tapestry.apache.org An users@tapestry.apache.org Kopie Thema Easy Way to create a select model? I feel a little dumb, because for years I have been using Tapestry. Is there an _easy_ way og creating a SelectModel like this one (not so uncommon one): valuelabel - 1 Jan 2 Feb ... I had a look at the documentation. But I cannot believe I have to deal with SelectModel, OptionModel, OptionGroupModel and whatelse for this simple usecase. I also had a look at the Wiki. I found four pages about selects. I cannot believe that I have to use such bloat for my usecase. I surely must be missing something, or not? Andy - 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: Easy Way to create a select model?
just a implementation of the interface with a constructor that accepts the value and the label public class SimpleOptionModelT implements OptionModel { private final T value; private final String label; public SimpleOptionModel(T value, String label) { this.label = label; this.value = value; } .. Telefon +43 (0)662 4670-6676 Fax +43 (0)662 4670-16676 kristian.marinko...@porsche.co.at Porsche Informatik Gesellschaft m.b.H. | A – 5101 Bergheim | Handelszentrum 7 Sitz: Salzburg | FN 72830 d / Landesgericht Salzburg | DVR 88439 | UID ATU 36773309 http://www.porsche-informatik.at Andy Pahne andy.pa...@gmail.com 28.01.2010 15:34 Bitte antworten an Tapestry users users@tapestry.apache.org An Tapestry users users@tapestry.apache.org Kopie Thema Re: Easy Way to create a select model? Hi Kristian. Thanks for the code. It does not compile right now. Do you have the source for SimpleOptionModelT also available? Thnak you, Andy Am 28.01.2010 15:17, schrieb Kristian Marinkovic: something like this: usage: SelectModel m = SelectModelUtils.toBeanSelectModel(someList, name, id ); explanation: use the value of the property name as label, the value of the id property as value; assuming that the bean within the list contains this properties (RuntimeException otherwise) code: public class SelectModelUtils { private static final BeanUtilsBean beanUtil = BeanUtilsBean. getInstance(); /** * Converts a list of beans to a {...@link SelectModel} using the values of labelField and valueField. */ public staticE SelectModel toBeanSelectModel(ListE beanList, String labelField, String valueField) { return new SimpleSelectModel(toBeanOptionModels(beanList, labelField, valueField)); } public staticE SelectModel toBeanSelectModel(ListE input, String labelField) { return toBeanSelectModel(input, labelField, null); } /** * Converts a list of beans to a list of {...@link OptionModel}s using getters for label and value. */ private staticE ListOptionModel toBeanOptionModels(ListE beanList, String labelField, String valueField) { Defense.notNull(beanList, beanList); ListOptionModel result = newList(); for (E bean : beanList) result.add(toBeanOptionModel(bean, labelField, valueField)); return result; } /** * Converts an bean to an {...@link OptionModel} using getters for label and value. */ private staticE OptionModel toBeanOptionModel(E bean, String labelField, String valueField) { if(bean != null) try { String label = beanUtil.getProperty(bean, labelField); Object value = valueField == null ? bean : beanUtil.getPropertyUtils().getProperty(bean, valueField); return new SimpleOptionModelObject(value, label); } catch (Exception e) { throw new RuntimeException(e); } return new SimpleOptionModelE(bean); } } - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Easy Way to create a select model?
import static org.apache.tapestry5.ioc.internal.util.CollectionFactory. newList; Andy Pahne andy.pa...@gmail.com 28.01.2010 15:37 Bitte antworten an Tapestry users users@tapestry.apache.org An Tapestry users users@tapestry.apache.org Kopie Thema Re: Easy Way to create a select model? It also contains a function call newList(), but this method isn't there. Am 28.01.2010 15:17, schrieb Kristian Marinkovic: something like this: usage: SelectModel m = SelectModelUtils.toBeanSelectModel(someList, name, id ); explanation: use the value of the property name as label, the value of the id property as value; assuming that the bean within the list contains this properties (RuntimeException otherwise) code: public class SelectModelUtils { private static final BeanUtilsBean beanUtil = BeanUtilsBean. getInstance(); /** * Converts a list of beans to a {...@link SelectModel} using the values of labelField and valueField. */ public staticE SelectModel toBeanSelectModel(ListE beanList, String labelField, String valueField) { return new SimpleSelectModel(toBeanOptionModels(beanList, labelField, valueField)); } public staticE SelectModel toBeanSelectModel(ListE input, String labelField) { return toBeanSelectModel(input, labelField, null); } /** * Converts a list of beans to a list of {...@link OptionModel}s using getters for label and value. */ private staticE ListOptionModel toBeanOptionModels(ListE beanList, String labelField, String valueField) { Defense.notNull(beanList, beanList); ListOptionModel result = newList(); for (E bean : beanList) result.add(toBeanOptionModel(bean, labelField, valueField)); return result; } /** * Converts an bean to an {...@link OptionModel} using getters for label and value. */ private staticE OptionModel toBeanOptionModel(E bean, String labelField, String valueField) { if(bean != null) try { String label = beanUtil.getProperty(bean, labelField); Object value = valueField == null ? bean : beanUtil.getPropertyUtils().getProperty(bean, valueField); return new SimpleOptionModelObject(value, label); } catch (Exception e) { throw new RuntimeException(e); } return new SimpleOptionModelE(bean); } } Andy Pahneandy.pa...@gmail.com 28.01.2010 15:14 Bitte antworten an Tapestry usersusers@tapestry.apache.org An users@tapestry.apache.org Kopie Thema Easy Way to create a select model? I feel a little dumb, because for years I have been using Tapestry. Is there an _easy_ way og creating a SelectModel like this one (not so uncommon one): valuelabel - 1 Jan 2 Feb ... I had a look at the documentation. But I cannot believe I have to deal with SelectModel, OptionModel, OptionGroupModel and whatelse for this simple usecase. I also had a look at the Wiki. I found four pages about selects. I cannot believe that I have to use such bloat for my usecase. I surely must be missing something, or not? Andy - 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: Easy Way to create a select model?
Am 28.01.2010 15:32, schrieb Kristian Marinkovic: public class SimpleOptionModelT implements OptionModel { private final T value; private final String label; public SimpleOptionModel(T value, String label) { this.label = label; this.value = value; } Unfortunatly this interface has some more functions to implement. My point is: isn't this all a bit to complicated? Just in order to show a model like the one I was referring to in my first mail? @Override public MapString, String getAttributes() { // TODO Auto-generated method stub return null; } @Override public String getLabel() { // TODO Auto-generated method stub return null; } @Override public Object getValue() { // TODO Auto-generated method stub return null; } - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Easy Way to create a select model?
you have to do it only once! should not be too hard :) Andy Pahne andy.pa...@gmail.com 28.01.2010 15:42 Bitte antworten an Tapestry users users@tapestry.apache.org An Tapestry users users@tapestry.apache.org Kopie Thema Re: Easy Way to create a select model? Am 28.01.2010 15:32, schrieb Kristian Marinkovic: public class SimpleOptionModelT implements OptionModel { private final T value; private final String label; public SimpleOptionModel(T value, String label) { this.label = label; this.value = value; } Unfortunatly this interface has some more functions to implement. My point is: isn't this all a bit to complicated? Just in order to show a model like the one I was referring to in my first mail? @Override public MapString, String getAttributes() { // TODO Auto-generated method stub return null; } @Override public String getLabel() { // TODO Auto-generated method stub return null; } @Override public Object getValue() { // TODO Auto-generated method stub return null; } - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Easy Way to create a select model?
You are indeed missing something: http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Select.html t:select t:id=months model=literal:1=Jan,2=Feb,3=Mar,.../ HTH, Uli On 28.01.2010 15:14 schrieb Andy Pahne: I feel a little dumb, because for years I have been using Tapestry. Is there an _easy_ way og creating a SelectModel like this one (not so uncommon one): value label - 1 Jan 2 Feb ... I had a look at the documentation. But I cannot believe I have to deal with SelectModel, OptionModel, OptionGroupModel and whatelse for this simple usecase. I also had a look at the Wiki. I found four pages about selects. I cannot believe that I have to use such bloat for my usecase. I surely must be missing something, or not? Andy - 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: Easy Way to create a select model?
Yeah, that's it. Thanks a lot. Am 28.01.2010 15:50, schrieb Ulrich Stärk: You are indeed missing something: http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Select.html t:select t:id=months model=literal:1=Jan,2=Feb,3=Mar,.../ HTH, Uli - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Easy Way to create a select model?
I feel a little dumb, because for years I have been using Tapestry... Well that makes two of us Andy, from my point of view its nice to see Kristians example, and I am sure for others too. cheers, Peter -- If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail. - Original Message - From: Andy Pahne andy.pa...@gmail.com To: Tapestry users users@tapestry.apache.org Sent: Thursday, 28 January, 2010 17:08:21 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Easy Way to create a select model? Yeah, that's it. Thanks a lot. Am 28.01.2010 15:50, schrieb Ulrich Stärk: You are indeed missing something: http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Select.html t:select t:id=months model=literal:1=Jan,2=Feb,3=Mar,.../ HTH, Uli - 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
[T5.2.0-SNAPSHOT] Block to String without MarkupWriter
Hi, I have Build a GridToCSVExport mixin. This all works great up to the stage where I try render the override parameter blocks like propertyNameCell. I can obtain the Block's, but can see no way to render the block to String without a MarkupWriter. Any pointers would be appreciated. Cheers, Joost - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: How to get rid of some T5 stack traces ...
Hi, One way to prevent this is to contribute a T5 httprequest filter that just redirects to error page if it detects a post url submitted using GET. (And isn't hrx?) This is one of the T5 weaker sides I think. It produces many like these in the production for us for a site that slightly altered url layout, although these errors are rarely made by human. Haven't seen that one on our production servers, however our servers are getting hammered by someone trying to get /index.html which produces there is no such component in page... blah .. the valid components are This can be fixed by implementing a component named html that does absolutely nothing and placing it to the page. - Ville (From f*cking cold and snowy Turku ;)) oakstair wrote: Hi ! Our production servers get hitted by our users as well as robots as well as ... The stack trace below appears now and then and I would like to get rid of it. I haven't yet turned on production mode since we thought that bug haunting should be easier if not. So my questiosn are: + Will the trace disappear if PROD mode is enabled. + Is there a smart way to get rid of it without turning on PROD mode. ? How do I best find out what the request is that is causing this trace? Thanks in advance! /Gunnar Eketrapp (from a very cold and snowy Stockholm) 4:09:18.842 [http-8080-Processor14] ERROR o.a.t.s.T.RequestExceptionHandler - Processing of request failed with uncaught exception: Forms require that the request method be POST and that the t:formdata query parameter have values. org.apache.tapestry5.runtime.ComponentEventException: Forms require that the request method be POST and that the t:formdata query parameter have values. at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1098) [tapestry-core-5.1.0.5.jar:na] at org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:75) [tapestry-core-5.1.0.5.jar:na] at org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42) [tapestry-core-5.1.0.5.jar:na] at $ComponentEventRequestHandler_12661a80307.handle($ComponentEventRequestHandler_12661a80307.java) [tapestry-ioc-5.1.0.5.jar:na] at org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42) [tapestry-core-5.1.0.5.jar:na] at $ComponentEventRequestHandler_12661a80307.handle($ComponentEventRequestHandler_12661a80307.java) [tapestry-ioc-5.1.0.5.jar:na] at org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2164) [tapestry-core-5.1.0.5.jar:na] at $ComponentEventRequestHandler_12661a80307.handle($ComponentEventRequestHandler_12661a80307.java) [tapestry-ioc-5.1.0.5.jar:na] at $ComponentEventRequestHandler_12661a801ea.handle($ComponentEventRequestHandler_12661a801ea.java) [tapestry-ioc-5.1.0.5.jar:na] at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43) [tapestry-core-5.1.0.5.jar:na] at $ComponentRequestHandler_12661a8018c.handleComponentEvent($ComponentRequestHandler_12661a8018c.java) [tapestry-ioc-5.1.0.5.jar:na] at org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46) [tapestry-core-5.1.0.5.jar:na] at $Dispatcher_12661a8018e.dispatch($Dispatcher_12661a8018e.java) [tapestry-ioc-5.1.0.5.jar:na] at $Dispatcher_12661a80183.dispatch($Dispatcher_12661a80183.java) [tapestry-ioc-5.1.0.5.jar:na] at org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245) [tapestry-core-5.1.0.5.jar:na] at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) [tapestry-core-5.1.0.5.jar:na] at $RequestHandler_12661a80184.service($RequestHandler_12661a80184.java) [tapestry-ioc-5.1.0.5.jar:na] at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778) [tapestry-core-5.1.0.5.jar:na] at $RequestHandler_12661a80184.service($RequestHandler_12661a80184.java) [tapestry-ioc-5.1.0.5.jar:na] at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767) [tapestry-core-5.1.0.5.jar:na] at $RequestHandler_12661a80184.service($RequestHandler_12661a80184.java) [tapestry-ioc-5.1.0.5.jar:na] at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85) [tapestry-core-5.1.0.5.jar:na] at $RequestHandler_12661a80184.service($RequestHandler_12661a80184.java) [tapestry-ioc-5.1.0.5.jar:na] at com.tellpoker.services.AppModule$1.service(AppModule.java:146) [AppModule$1.class:na] at
Re: How to get rid of some T5 stack traces ...
On Thu, 28 Jan 2010 14:47:08 -0200, Ville Virtanen ville.virta...@cerion.fi wrote: Hi, Hi! One way to prevent this is to contribute a T5 httprequest filter that just redirects to error page if it detects a post url submitted using GET. Well, Tapestry always submit by POST, so any submission using GET is not an human user. If you want to provide access to robots, I think it's better to have some kind of API linke Twitter has. (And isn't hrx?) hrx? I guess I need some more internet vocabulary . . . hehehe This is one of the T5 weaker sides I think. It produces many like these in the production for us for a site that slightly altered url layout, although these errors are rarely made by human. I think this is an upside, not a downside, as it shows that suspicious requests are being made. Haven't seen that one on our production servers, however our servers are getting hammered by someone trying to get /index.html which produces there is no such component in page... blah .. the valid components are This can be fixed by implementing a component named html that does absolutely nothing and placing it to the page. You could also have an URL rewriter rule to catch that. - Ville (From f*cking cold and snowy Turku ;)) Thiago (from f*cking-but-not-that-much hot Belo Horizonte) ;) -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, 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
Render Block markup without MarkupWriter
Hi, I have build a GridToCSVExporter mixin which works nicely. The one thing I can't quite get up and running is the printing of override blocks (eg propertyNameCell blocks) I can obtain the block if it is available but miss the last step on how to convert it into html from there. Cheers, Joost - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: How to return a t:select component without a form (T5.1.05)
Sorry, it's not true, my mistake. As long as the input doesn't depend on form events, it can be placed in a sub-component. On Thu, Jan 21, 2010 at 4:35 PM, Andreas Andreou andy...@di.uoa.gr wrote: On Thu, Jan 21, 2010 at 16:47, Inge Solvoll inge.tapes...@gmail.com wrote: This limitation has been a blocker for me too. All form components need to be enclosed by a form in the same template. Is that true? Anyone knows if there's a reason for this? Cause otherwise, you should file a bug report - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Render Block markup without MarkupWriter
Appologies for the double post. It didn't go though immediately as I used an incorrect email address and thus tried again. Cheers, Joost JS Portal wrote: Hi, I have build a GridToCSVExporter mixin which works nicely. The one thing I can't quite get up and running is the printing of override blocks (eg propertyNameCell blocks) I can obtain the block if it is available but miss the last step on how to convert it into html from there. Cheers, Joost - 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: Easy Way to create a select model?
And for an example: http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/select/select/$N/$N/$N/$N Cheers, Geoff On 29/01/2010, at 2:08 AM, Andy Pahne wrote: Yeah, that's it. Thanks a lot. Am 28.01.2010 15:50, schrieb Ulrich Stärk: You are indeed missing something: http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Select.html t:select t:id=months model=literal:1=Jan,2=Feb,3=Mar,.../ HTH, Uli - 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
Unable to access www.chenillekit.org
Is the server temporarily down, or is it being hosted elsewhere? If someone knows, please let me know! Thanks. -- View this message in context: http://old.nabble.com/Unable-to-access-www.chenillekit.org-tp27360352p27360352.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: Unable to access www.chenillekit.org
Hi, I can see chenillekit here : http://xircles.codehaus.org/projects/chenillekit On Thu, Jan 28, 2010 at 10:00 PM, mlavannis mlavan...@yahoo.com wrote: Is the server temporarily down, or is it being hosted elsewhere? If someone knows, please let me know! Thanks. -- View this message in context: http://old.nabble.com/Unable-to-access-www.chenillekit.org-tp27360352p27360352.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 -- Christophe DUFOUR http://www.dooapp.com +33 (0)6 99 71 48 86
Re: Unable to access www.chenillekit.org
Yeah, but thats not the official homepage with the demo application and working download links. But chenillekit.org seems to be down currently! Mit freundlichen Grüßen Alexander Muthmann On 28.01.2010, at 22:02, Christophe DUFOUR christo...@dooapp.com wrote: Hi, I can see chenillekit here : http://xircles.codehaus.org/projects/chenillekit On Thu, Jan 28, 2010 at 10:00 PM, mlavannis mlavan...@yahoo.com wrote: Is the server temporarily down, or is it being hosted elsewhere? If someone knows, please let me know! Thanks. -- View this message in context: http://old.nabble.com/Unable-to-access-www.chenillekit.org-tp27360352p27360352.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 -- Christophe DUFOUR http://www.dooapp.com +33 (0)6 99 71 48 86 - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Unable to access www.chenillekit.org
the chenillekit site is online again. with regards Sven Homburg Founder of the Chenille Kit Project http://chenillekit.codehaus.org 2010/1/28 Alexander Muthmann amuthm...@dev-eth0.de Yeah, but thats not the official homepage with the demo application and working download links. But chenillekit.org seems to be down currently! Mit freundlichen Grüßen Alexander Muthmann On 28.01.2010, at 22:02, Christophe DUFOUR christo...@dooapp.com wrote: Hi, I can see chenillekit here : http://xircles.codehaus.org/projects/chenillekit On Thu, Jan 28, 2010 at 10:00 PM, mlavannis mlavan...@yahoo.com wrote: Is the server temporarily down, or is it being hosted elsewhere? If someone knows, please let me know! Thanks. -- View this message in context: http://old.nabble.com/Unable-to-access-www.chenillekit.org-tp27360352p27360352.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 -- Christophe DUFOUR http://www.dooapp.com +33 (0)6 99 71 48 86 - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org