problem with mvn jetty:run from T5 tutorial
I'm also have a problem trying to run mvn jetty:run. I get: : Unable to download the artifact from any repository org.apache.maven.plugins:maven-plugins:pom:8 from the specified remote repositories: central (http://repo1.maven.org/maven2), codehaus.snapshots (http://snapshots.repository.codehaus.org), codehaus (http://repository.codehaus.org), apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository/), mortbay-repo (http://www.mortbay.org/maven2/snapshot), howardlewisship.com (http://howardlewisship.com/repository) Am I wrong in my thinking that it is in the cetral repo right here? http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugins/8/ -Steve Maring - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5 - Cancelling a form
What is the recommended way to handle a Cancel button on a form? The expected behaviour would be to clear the internal state, bypass validation and move to a different page. I tried: @OnEvent(component=Cancel) String onCancel() { surveySession.setSurvey(null); return Start; } where Cancel is the id of the submit component but Tapestry complains that this method cannot return a String: Event 'selected' from org.byteberry.survey.pages.SurveyDetail:cancel received an event handler method return value of Start from org.byteberry.survey.pages.SurveyDetail.onCancel() (at SurveyDetail.java:46). This type of event does not support return values from event handler methods. On the other hand, if I try do do it on the form events I don't know which button was pressed and I cannot bypass validation. Is there a straightforward way to do it? Thanks, Bogdan Calmac. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 - Cancelling a form
There was a discussion last week on the same topic. Howard said that the best way was to keep a flag like cancelSelected and turn it on on the selected event. Then in the form submit event look to it and do what it needs to do. I think that it is very incovenient, it's a common use case having a lot of buttons, there should be a way to make events from submits button act like listeners in tap4, so they are called at last, when all the form has been processed, so it can redirect to another page. On 3/24/07, Bogdan Calmac [EMAIL PROTECTED] wrote: What is the recommended way to handle a Cancel button on a form? The expected behaviour would be to clear the internal state, bypass validation and move to a different page. I tried: @OnEvent(component=Cancel) String onCancel() { surveySession.setSurvey(null); return Start; } where Cancel is the id of the submit component but Tapestry complains that this method cannot return a String: Event 'selected' from org.byteberry.survey.pages.SurveyDetail:cancel received an event handler method return value of Start from org.byteberry.survey.pages.SurveyDetail.onCancel() (at SurveyDetail.java:46). This type of event does not support return values from event handler methods. On the other hand, if I try do do it on the form events I don't know which button was pressed and I cannot bypass validation. Is there a straightforward way to do it? Thanks, Bogdan Calmac. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with mvn jetty:run from T5 tutorial
Perhaps I am wrong in my thinking, the jar itself is not in the directory on the repo. Anybody know of a repo that WOULD have it? Thanks, Steve Maring Steve Maring wrote: I'm also have a problem trying to run mvn jetty:run. I get: : Unable to download the artifact from any repository org.apache.maven.plugins:maven-plugins:pom:8 from the specified remote repositories: central (http://repo1.maven.org/maven2), codehaus.snapshots (http://snapshots.repository.codehaus.org), codehaus (http://repository.codehaus.org), apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository/), mortbay-repo (http://www.mortbay.org/maven2/snapshot), howardlewisship.com (http://howardlewisship.com/repository) Am I wrong in my thinking that it is in the cetral repo right here? http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugins/8/ -Steve Maring - 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: T5 - Cancelling a form
Pablo Ruggia wrote: There was a discussion last week on the same topic. Howard said that the best way was to keep a flag like cancelSelected and turn it on on the selected event. Then in the form submit event look to it and do what it needs to do. I think that it is very incovenient, it's a common use case having a lot of buttons, there should be a way to make events from submits button act like listeners in tap4, so they are called at last, when all the form has been processed, so it can redirect to another page. In my opinion forms should be as simple as possible. From a UI design perspective that helps to avoid user confusion. So either you leave a form to save the input or you want to abandon it. Leads to only two submit buttons. If you need additional buttons to do additional processing while you are in the form, you can always be notified via the OnSelect... callbacks, but you should stay in the form and not leave it. Stephan -- http://www.stephan-schwab.com -- View this message in context: http://www.nabble.com/T5---Cancelling-a-form-tf3458631.html#a9651520 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with new operator in ognl 2.7
I am using the latest Tap 4.1.2 snapshot. The following ognl expression used to worked with ognl 2.6. binding name=source value=ognl:new int[nToDefaultBean.basketSize]/ But I have the following exception when I used ognl 2.7. Unable to parse OGNL expression 'new int[nToDefaultBean.basketSize]': Error compiling expression on object [EMAIL PROTECTED]/creditDer/NToDefault] with expression node new int[] nToDefaultBean.basketSize getter body: { return ($w) (new int[.getNToDefaultBean().getBasketSize()]);} setter body: null Has anyone enountered the same problem ? Shing Home page : http://uk.geocities.com/matmsh/index.html ___ Inbox full of unwanted email? Get leading protection and 1GB storage with All New Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Empty Double TextField causes NPE
I have a TextField on a Form which is bound to a Double property. This field is not required so it is OK for the user to leave it empty. But when Tapestry updates the property, a NullPointerException is thrown: Caused by: java.lang.RuntimeException: Coercion of null to type java.lang.Double (via null -- String, String -- Double) failed: java.lang.NullPointerException at org.apache.tapestry.ioc.internal.services.TypeCoercerImpl.coerce(TypeCoercerImpl.java:154) at $TypeCoercer_11183ff0378.coerce($TypeCoercer_11183ff0378.java) at org.apache.tapestry.internal.structure.InternalComponentResourcesImpl.writeParameter(InternalComponentResourcesImpl.java:217) Thanks, Bogdan Calmac. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 Action link
I've never thought of this combination; I'm honestly not sure what the web browser does in this situation. Clarification there would be a good idea before guessing what Tapestry should do. On 3/22/07, Anjana Gopinath [EMAIL PROTECTED] wrote: Hi, If i add an action link to a plain html button, it looks like the event method is getting called twice. was wondering whether this is a bug or we are not supposed to put an actionlink around a button? a t:type=actionlink t:id=select1input type=button value=Add//a @OnEvent(value = action,component=select1) void addApps(){ System.out.println(---here ); } Thanks Anjana Gopinath True North Technology 11465 John's Creek Parkway, Suite 300 Duluth, GA 30079 [EMAIL PROTECTED] -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache 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: problem with mvn jetty:run from T5 tutorial
This issue has been driving me crazy, right when I've started with a new client and don't have spare cycles to look into it. I suspect there's an alpha version of some critical Maven plugin that Tapestry is picking up by mistake. The right solution is probably to go find the offending plugin and nail down the version to something stable, rather than latest snapshot. On 3/24/07, Steve Maring [EMAIL PROTECTED] wrote: Perhaps I am wrong in my thinking, the jar itself is not in the directory on the repo. Anybody know of a repo that WOULD have it? Thanks, Steve Maring Steve Maring wrote: I'm also have a problem trying to run mvn jetty:run. I get: : Unable to download the artifact from any repository org.apache.maven.plugins:maven-plugins:pom:8 from the specified remote repositories: central (http://repo1.maven.org/maven2), codehaus.snapshots (http://snapshots.repository.codehaus.org), codehaus (http://repository.codehaus.org), apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository/), mortbay-repo (http://www.mortbay.org/maven2/snapshot), howardlewisship.com (http://howardlewisship.com/repository) Am I wrong in my thinking that it is in the cetral repo right here? http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugins/8/ -Steve Maring - 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] -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache 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: T5 - Cancelling a form
How about a:actionlink t:id=cancelcancel/a ? Why should it be necessary to do a form submission, just to discard all the data in the form? If you want, you can use CSS to dress up the link to look like a form submit button. I think having this cancel feature in T4 was a mistake that caused more problems than it solved. On 3/24/07, Stephan Schwab [EMAIL PROTECTED] wrote: Pablo Ruggia wrote: There was a discussion last week on the same topic. Howard said that the best way was to keep a flag like cancelSelected and turn it on on the selected event. Then in the form submit event look to it and do what it needs to do. I think that it is very incovenient, it's a common use case having a lot of buttons, there should be a way to make events from submits button act like listeners in tap4, so they are called at last, when all the form has been processed, so it can redirect to another page. In my opinion forms should be as simple as possible. From a UI design perspective that helps to avoid user confusion. So either you leave a form to save the input or you want to abandon it. Leads to only two submit buttons. If you need additional buttons to do additional processing while you are in the form, you can always be notified via the OnSelect... callbacks, but you should stay in the form and not leave it. Stephan -- http://www.stephan-schwab.com -- View this message in context: http://www.nabble.com/T5---Cancelling-a-form-tf3458631.html#a9651520 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache 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: T5: Customizing generation of client id from component id
Have you thought about using a specialized class value for links etc. that are going to be involved in the test suite, and then selecting by class instead of id? Just an idea ... On 3/23/07, Doug Hauge [EMAIL PROTECTED] wrote: Thanks for the response. We are in the process of migrating our application to Tapestry, and in the process making it more easily customizable and testable. The solution we are looking for seems to be a reasonable way to satisfy the following constraints: 1) Within a component, identifiers given to sub-components should be as simple as possible while being descriptive. For most components, little thought should be required about what other components might appear in the page. 2) Within a page, components should be able to be rearranged, added, and removed without affecting the identifier given to the associated element(s) in the rendered HTML. Such an immutable identifier is useful for Selenium tests that are valid across such page modifications. 3) In keeping with the DRY principle, we would like to avoid requiring a mixin or other boilerplate code to be included in all our components in order to construct unique identifiers. The problem is that (1) can easily lead to a case where multiple components specify the same component id for their children, because the component writer has no knowledge of what other components may be placed in the page, and in order to keep the component id simple we don't want to require the component writer to always apply a prefix to increase the likelihood of uniqueness. All that we want to require of the component writer is that within the component, all the identifiers are unique. There might also be cases where the same component is included multiple times within a page, either directly or indirectly. Note that an ideal solution for us would also allow us to similarly transform id attributes on HTML elements in the template. If we can't, we either have to avoid specifying identifiers on raw HTML elements or to make sure that all components that may ever be placed on a page choose identifiers that are unique among those components. We have a temporary solution now that uses a mixin that traverses the DOM and adjusts identifiers in its 'afterRender' method, but this violates (3) and is a bit of a kludge. Thanks, Doug -Original Message- From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] Sent: Friday, March 23, 2007 3:56 PM To: Tapestry users Subject: Re: T5: Customizing generation of client id from component id I'm afraid that's a use case that wasn't foremost in my mind when coding this stuff up for T5. Still, if you explicitly set component ids, it's highly unlikely that they'll change dramatically from one build to the next ... could you elaborate on the situation that drove you towards this kind of solution? On 3/23/07, Doug Hauge [EMAIL PROTECTED] wrote: Is there a way to customize the generation of a unique client id from a component id? We would like to generate the unique id in such a way that it would not change across most modifications to a page, mainly so Selenium tests can be written that will work across page redesign. The current method of appending a suffix to a component id does not seem to allow this, so we would like to be able to generate a unique id by prepending the component ids of ancestral components. We could potentially implement our own PageRenderSupport service, but the 'allocateClientId' method only takes a string parameter, so we don't have the context we would need (in particular, the ComponentResources of the component for which we are generating the id). Thanks, Doug -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache 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: T5 - Cancelling a form
Howard Lewis Ship wrote: How about a:actionlink t:id=cancelcancel ? Why should it be necessary to do a form submission, just to discard all the data in the form? If you want, you can use CSS to dress up the link to look like a form submit button. Right. Actually that's pretty smart and more in compliance with the original idea of the reset in pure HTML. Stephan -- http://www.stephan-schwab.com -- View this message in context: http://www.nabble.com/T5---Cancelling-a-form-tf3458631.html#a9652893 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 - Cancelling a form
Thanks Howard, The CSS hack would problably work but I'd rather consider other options. I could for instance use some image buttons which have the same look and feel for both Submit and Cancel. Does tapestry provide the equivalent of input type=image for form submission? Bogdan. On 3/24/07, Stephan Schwab [EMAIL PROTECTED] wrote: Howard Lewis Ship wrote: How about a:actionlink t:id=cancelcancel ? Why should it be necessary to do a form submission, just to discard all the data in the form? If you want, you can use CSS to dress up the link to look like a form submit button. Right. Actually that's pretty smart and more in compliance with the original idea of the reset in pure HTML. Stephan -- http://www.stephan-schwab.com -- View this message in context: http://www.nabble.com/T5---Cancelling-a-form-tf3458631.html#a9652893 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: No /option tag rendered when using enum
This is correct behavior for rendering HTML (as opposed to XHTML). Unlike T4, T5 knows the difference. HTML is a SGML language where open tags are not necessarly balanced with close tags. What's coming is the ability for Tapestry to render XML/XHTML correctly and choose the correct strategy (HTML vs. XML/XHTML) automatically. On 3/22/07, Erik Johansson [EMAIL PROTECTED] wrote: Hi, when using the Select component with an Enum the options within the select tag wont render the /option tag. Example: The enum public enum TestEnum { ONE,TWO,THREE; } will render the select select id=selected name=selected option value=ONEOne option value=TWOTwo option selected=selected value=THREEThree /select Is this a known bug? (I'm not familiar with JIRA so I dont know how to post this or if it has been noticed) regards -Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache 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: Re: Session
Don't we already? ;) http://tapestry.apache.org/tapestry4.1/tapestry-contrib/componentreference/timeout.html On 3/24/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: That's useful enough that someone should add a JIRA issue suggesting we supply that as a standard component. On 3/22/07, Kristian Marinkovic [EMAIL PROTECTED] wrote: i think a better strategy is to reduce the sesion-timeout in the web.xml to lets say 2mins and to implement a javascript function that issues periodic keep-alive requests every 1.5mins or so. thus preventing the session from expiring... and when someone closes his browser the session will not stay in memory for too long :) g, kris Tim Sawyer [EMAIL PROTECTED] 22.03.2007 11:10 Bitte antworten an Tapestry users users@tapestry.apache.org An users@tapestry.apache.org Kopie James Sherwood [EMAIL PROTECTED] Thema Re: Session I believe the timeout for this is configured through web.xml session-config session-timeout30/session-timeout !-- minutes -- /session-config Tim. On Tuesday 20 March 2007 17:16, James Sherwood wrote: Hello, We have an admin side with a user login etc. The problem is, the session times out after soo many minutes(we run under tomcat) of being idle and they user has to log back in. Is there any way to make this indefinate and if so, is there any impact on resources etc? Thanks, James - 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] -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache 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] -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: required fields formatting BEFORE validation
Yep. On 3/23/07, Martino Piccinato [EMAIL PROTECTED] wrote: Ok, I reply to myself hoping this would be of any help for somebody else. Is as simple as to make your own IValidationDelegate and override (exemple) this method: public void writeAttributes(IMarkupWriter writer, IRequestCycle cycle, IFormComponent component, IValidator validator) { // If the form component represents a required field // it adds the required field class super.writeAttributes(writer, cycle,component, validator); if (component.isRequired()) { writer.appendAttribute(class, requiredField); } } obviously then you have to use your IValidationDelegate in your pages/components. On 3/23/07, Martino Piccinato [EMAIL PROTECTED] wrote: Hi, is there a standard way to define common formatting for required fields BEFORE client/server side validation happens? It's always a good thing for users to know compulsory fields before starting data insertion. I know the issue is easy to solve just by adding few things but it would be good to have this in componentes that accept required validator. Martino -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with new operator in ognl 2.7
It probably works now. On 3/24/07, Shing Hing Man [EMAIL PROTECTED] wrote: I am using the latest Tap 4.1.2 snapshot. The following ognl expression used to worked with ognl 2.6. binding name=source value=ognl:new int[nToDefaultBean.basketSize]/ But I have the following exception when I used ognl 2.7. Unable to parse OGNL expression 'new int[nToDefaultBean.basketSize]': Error compiling expression on object [EMAIL PROTECTED]/creditDer/NToDefault] with expression node new int[] nToDefaultBean.basketSize getter body: { return ($w) (new int[.getNToDefaultBean().getBasketSize()]);} setter body: null Has anyone enountered the same problem ? Shing Home page : http://uk.geocities.com/matmsh/index.html ___ Inbox full of unwanted email? Get leading protection and 1GB storage with All New Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tapestry 4.1.1 / dojo broken on IE? - IE freezing!
Sounds un-fun. If you capture a sample request via fiddler / wireshark (plugins / dev utilities for ie) I can at least tell you what is going wrong. I'm less sure I can tell you how to fix it. I'm semi familiar with squid - but this doesn't sound like the same kind of situation. On 3/23/07, Maximilian Wei?bock [EMAIL PROTECTED] wrote: Andreas, sadly I have to say that your page still has errors, the very fierst error I get if I clean ally my browser chache and than go to http://www.fsbutiken.se/ is: Could not load 'tapestry.form'; last tried '__package__.is' BUT: We have a caching proxy to connect to the internet! If I disable the caching proxy, your site works without JavaScript errors! This at least gives some hints where the problem is. Sadly we are no IE experts, has anyone a hint what we can do to make Tapestry 4.1.1 / dojo / IE work with caching? Cause we can not control if customers have a chahing proxy or not... Thanks, Max -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]