Re: Hibernate Session in App Module

2012-08-20 Thread ksrijith
Thanks a lot for your help. public static void contributeSecurityConfiguration( Configuration configuration, SecurityFilterChainFactory factory, HibernateSessionSource sessionSource) { Session session = sess

Re: Compiling error returning service interface in service locator method

2012-08-20 Thread Joakim Olsson
Hi George, It sounds like your Parser interface is located in one of Tapestrys blessed packages (pages, components, mixins etc.) /Joakim On Tue, Aug 21, 2012 at 5:27 AM, George Christman wrote: > Hello, in my DMSServiceLocator.class, I have a method called getParser() with > a return type call

Compiling error returning service interface in service locator method

2012-08-20 Thread George Christman
Hello, in my DMSServiceLocator.class, I have a method called getParser() with a return type called Parser. I'm trying to return a service called AutoMateParser with an Impl that extends Parser, however I'm' getting a compiling error saying Parser is required, found AutoMateParser. When I return ne

Re: No 404 error is raised

2012-08-20 Thread Thiago H de Paula Figueiredo
On Mon, 20 Aug 2012 19:18:30 -0300, Howard Lewis Ship wrote: I'm considering a change for Tapestry 5.4 where the ValueEncoder, responsible for converting portions of the URL into the page activation context, will have a new method that defines what it expects to see in its portion of the URL,

Re: datefield onchange

2012-08-20 Thread Paul Stanton
It seems I have to combine a both approaches to achieve what I need - whether or not this should be improved within the tapestry framework is up for debate onchange="alert('1 onchange attribute');" /> $("selectedDateElem").observe("change", function(event) {

Re: No 404 error is raised

2012-08-20 Thread Howard Lewis Ship
I'm considering a change for Tapestry 5.4 where the ValueEncoder, responsible for converting portions of the URL into the page activation context, will have a new method that defines what it expects to see in its portion of the URL, in terms of a regular expression. Thus a URL such as: /account/1

Re: T5: how to catch the exceptions thrown by the event handler?

2012-08-20 Thread Yunhua Sang
Thanks Thiago and Lenny. It's my bad, I messed up the events chain. On Mon, Aug 20, 2012 at 3:18 PM, Lenny Primak wrote: > Tynamo.org has an excellent tapestry-exceptionpage module just for this > purpose as well. > > > > On Aug 20, 2012, at 10:09 AM, Yunhua Sang wrote: > > > Hi there, > > > > T

Re: No 404 error is raised

2012-08-20 Thread RJB III
Well I got it to work by combining Info from here: http://thread.gmane.org/gmane.comp.java.tapestry.user/64654/focus=64655 and here: http://tapestry.apache.org/error-page-recipe.html Index.java pag

Re: DateField appears to use lenient date parser (Bug?)

2012-08-20 Thread trsvax
While I think that would fix the problem having the DateField use the Lenient parser seems wrong to me. Would it make sense for the Integer validator to accept '123!4' as 12314? If the purpose is to validate dates then that's what it should do. So I suppose a different fix is to replace the type c

Re: T5: how to catch the exceptions thrown by the event handler?

2012-08-20 Thread Lenny Primak
Tynamo.org has an excellent tapestry-exceptionpage module just for this purpose as well. On Aug 20, 2012, at 10:09 AM, Yunhua Sang wrote: > Hi there, > > Tapestry version: 5.3.3 > > How to catch the exceptions thrown by the event handler? > > e.g.: >try { >reso

Re: DateField appears to use lenient date parser (Bug?)

2012-08-20 Thread Robert Zeigler
Why not use the format parameter? Although the typical use is to specify the format with a string and allow type-coercion to generate the format for you, the underlying parameter is DateFormat, and you can pass one in directly and have tapestry use it. Just be aware of thread-safety: whichever c

DateField appears to use lenient date parser (Bug?)

2012-08-20 Thread trsvax
I have a DateField for entering Date of Birth. If you enter 00/01/2000 the database ends up with 12/01/1999 which is not at all what I would want since 00/01/2000 is (should be) an invalid date. The Java documentation says this: By default, parsing is lenient: If the input is not in the form used

Re: Question tapestry service

2012-08-20 Thread George Christman
Thanks Thiago. This has really helped me a lot. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Question-tapestry-service-tp5715573p5715628.html Sent from the Tapestry - User mailing list archive at Nabble.com. ---

Re: page instances to particular threads

2012-08-20 Thread zkn
Thanks, I was sure it has to be that way. Otherwise it wouldn't make much sense. But looking at the current code I thought I could be missing something. I read about the changes in 5.2 and 5.3 but for the moment cleaning up the code is a priority. Thanks again, Özkan On 20.08.2012, at 17:37,

Re: T5: how to catch the exceptions thrown by the event handler?

2012-08-20 Thread Thiago H de Paula Figueiredo
On Mon, 20 Aug 2012 15:13:04 -0300, Yunhua Sang wrote: Thanks Thiago. I am a bit confused from the API, it said: * @throws org.apache.tapestry5.runtime.ComponentEventException * if an event handler method throws a checked or unchecked exception but seems it did not g

Re: Question tapestry service

2012-08-20 Thread Thiago H de Paula Figueiredo
On Mon, 20 Aug 2012 14:37:49 -0300, George Christman wrote: Okay Few more minor questions on this and I think I'll be good to go. 1. If I declared ImportTask as a service, could I use it as a list as well? Example @Inject private List importTask; No. You can, however, have something l

Tapestry/Hibernate/Quartz/Perthread scope

2012-08-20 Thread Michael Prescott
Gratefully wondering if someone could validate my hunches about Tapestry. By way of background, I've got a Tapestry app that manages some training data for a machine learning process. The training process is time consuming, so I want to do that outside of the request/response cycle. I intend to

Re: T5: how to catch the exceptions thrown by the event handler?

2012-08-20 Thread Yunhua Sang
Thanks Thiago. I am a bit confused from the API, it said: * @throws org.apache.tapestry5.runtime.ComponentEventException * if an event handler method throws a checked or unchecked exception but seems it did not go this way. On Mon, Aug 20, 2012 at 1:07 PM, Thiago H de Paul

Re: Question tapestry service

2012-08-20 Thread George Christman
On Mon, Aug 20, 2012 at 1:13 PM, Thiago H de Paula Figueiredo [via Tapestry] wrote: > On Mon, 20 Aug 2012 12:36:34 -0300, George Christman > <[hidden email] > > wrote: > > > public static SomeService someServiceBuilder(Service1 service1, Servi

Re: Question tapestry service

2012-08-20 Thread Thiago H de Paula Figueiredo
On Mon, 20 Aug 2012 12:36:34 -0300, George Christman wrote: public static SomeService someServiceBuilder(Service1 service1, Service2 service2) { return new SomeService(service1, service2); } This can be replaced by binder.bind(). and returns a new Class(service1, service2). I wasn't awar

Re: T5: how to catch the exceptions thrown by the event handler?

2012-08-20 Thread Thiago H de Paula Figueiredo
On Mon, 20 Aug 2012 12:09:25 -0300, Yunhua Sang wrote: Hi there, Hi! Tapestry version: 5.3.3 How to catch the exceptions thrown by the event handler? e.g.: try { resources.triggerEvent("anEvent", new Object[]{}, null); } catch (Exception e) {

Re: Question tapestry service

2012-08-20 Thread George Christman
My apology, correcting a few things in my example, was being rushed for lunch. On Mon, Aug 20, 2012 at 11:36 AM, George Christman wrote: > > > On Mon, Aug 20, 2012 at 11:06 AM, Thiago H de Paula Figueiredo [via > Tapestry] wrote: > >> On Mon, 20 Aug 2012 11:16:28 -0300, George Christman >> <[hid

Re: Question tapestry service

2012-08-20 Thread George Christman
On Mon, Aug 20, 2012 at 11:06 AM, Thiago H de Paula Figueiredo [via Tapestry] wrote: > On Mon, 20 Aug 2012 11:16:28 -0300, George Christman > <[hidden email] > > wrote: > > > He say's what I'm calling a factory is actually a service locator an

T5: how to catch the exceptions thrown by the event handler?

2012-08-20 Thread Yunhua Sang
Hi there, Tapestry version: 5.3.3 How to catch the exceptions thrown by the event handler? e.g.: try { resources.triggerEvent("anEvent", new Object[]{}, null); } catch (Exception e) { logger.error("Error occurred.", e); form

Re: Question tapestry service

2012-08-20 Thread Thiago H de Paula Figueiredo
On Mon, 20 Aug 2012 11:16:28 -0300, George Christman wrote: He say's what I'm calling a factory is actually a service locator and that AutoMateParser should be defined as a service in the AppModule. Yep . . . He also stated the objects I use to pass in through the constructor now need t

Re: Setting element value from an attribute

2012-08-20 Thread dkeenan
brilliant! it actually works with outputraw, which means i don't have to supply the format... and it's always going to be a string that I set, so should be fine. Thanks. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Setting-element-value-from-an-attribute-tp5715597p57

Re: page instances to particular threads

2012-08-20 Thread Thiago H de Paula Figueiredo
On Mon, 20 Aug 2012 05:47:42 -0300, ZKN __ wrote: Hi, Hi! this is from the tapestry documentation "By reserving page instances to particular threads, all the difficult, ...". Does it mean that a page is bound to a thread and it will always get executed by the same thread? Nope. Page in

Re: page instances to particular threads

2012-08-20 Thread Michael Gentry
Hi Özkan, "Does it mean that a page is bound to a thread and it will always get executed by the same thread?" No, it means that when the request for a page comes in it is handled by the same thread until the response goes out. A subsequent request for the same page could be handled by a differen

Re: Setting element value from an attribute

2012-08-20 Thread Shing Hing Man
I am making a meal of this. The existing  Output component  should do the job : f...@yahoo.com Shing   - Original Message - From: dkeenan To: users@tapestry.apache.org Cc: Sent: Monday, August 20, 2012 3:25 PM Subject: Re: Setting element value from an attribute Could I extend

Re: Setting element value from an attribute

2012-08-20 Thread dkeenan
Could I extend that a little and create a component that does the following? [hidden email] Then tapestry could replace the dispayed value with thee specified 'property'? I wonder if a comonent like that exists, or how I would write one if it doesn't? Thanks... -- View this message in

Re: javascript component questions

2012-08-20 Thread Chris Cureau
Thanks, François...that might solve the issue. I want to contribute this back to tapestry5-jquery, and the easier I can make it to use the better IMHO. This component is created from fullcalendar (http://arshaw.com/fullcalendar/). It's a javascript utility that displays a calendar in the browser

Re: Hibernate Session in App Module

2012-08-20 Thread Dmitry Gusev
I think you can also inject your DAO here, and the session will be injected into it automatically. On Mon, Aug 20, 2012 at 6:14 PM, Dmitry Gusev wrote: > Hi, > > will this work for you? > > public static void contributeSecurityConfiguration( > Configuration configuration,

Re: Setting element value from an attribute

2012-08-20 Thread Shing Hing Man
A not so elegant solution is to create a RemoveElt component so that the associated  html tag is not generated.  public class RemoveElt {         protected boolean beginRender(){         return false;     }      } Example : testu...@test.com The above will not appear in the generated

Re: javascript component questions

2012-08-20 Thread François Facon
Hi Chris, In order to avoid having so much makup in your tml you can generate a JSon array in java class and pass it as property to your calendar component parameter. By way could you give us more details about the jQuery plugin you are using? Regards François 2012/8/20 Chris Cureau : > I cou

Re: Question tapestry service

2012-08-20 Thread George Christman
So I spent sometime with a fellow coworker this morning, "non tapestry developer, but spring developer" and we discussed these issues I ran into over the weekend. He was able to provide me with some basic info enabling me to overcome the majority of my issues and understandings, but still a little

Re: Hibernate Session in App Module

2012-08-20 Thread Dmitry Gusev
Hi, will this work for you? public static void contributeSecurityConfiguration( Configuration configuration, SecurityFilterChainFactory factory, HibernateSessionSource sessionSource) { Session session = session

Re: datefield onchange

2012-08-20 Thread François Facon
Hi Paul In 5.3 DatePicker (DateField.js) save informations in Tapestry.currentFocusField and fire the Tapestry.FOCUS_CHANGE_EVENT like this document.fire(Tapestry.FOCUS_CHANGE_EVENT, this.field); what about listen to tapestry:focuschange like the Tapestry.FieldEventManager (tapestry.js) do? doc

Setting element value from an attribute

2012-08-20 Thread dkeenan
Hi. When creating dynamic content in a TML template file I normally do something like this: ${user.email} So when running the template in my tapestry app, I get a header with the logged in user's email address. But, when viewing the template outside of tapestry, as a normal file, obviously I ge

Re: javascript component questions

2012-08-20 Thread Chris Cureau
I could do this, yes...I guess I was just trying to avoid having quite so much markup in the tml file... On Mon, Aug 20, 2012 at 8:34 AM, trsvax wrote: > Most jQuery components can be implemented by simply extending the Widget > mixin > > for example > > @Import (library={"your js file"}) > publ

Re: javascript component questions

2012-08-20 Thread Chris Cureau
Sorry...probably do need to be more specific. It was late last night and I was already frustrated with it... Lots of parameters == items that need to be specific to the page being rendered at the time rather than common to all components of type freecalendar. For example, each page will probably

Re: javascript component questions

2012-08-20 Thread trsvax
Most jQuery components can be implemented by simply extending the Widget mixin for example @Import (library={"your js file"}) public Class FreeCalendar extends Widget { } Then in your tml file -- View this message in context: http://tapestry.1045711.n5.nabble.com/javascript-component-ques

Re: datefield onchange

2012-08-20 Thread Paul Stanton
Thanks brian, but i am assuming/hoping that the fix for issue 1844 allows me to do something a little more obvious. if not, i'm sure to use your solution. p. On 20/08/2012 9:16 PM, Bryan Lewis wrote: Ah yes, the problem of not catching changes made by clicking on the little calendar icon. He

Re: javascript component questions

2012-08-20 Thread Ray Nicholus
What is the problem with passing "a lot" of parameters into your javascript in afterRender()? Maybe I'm just not sure what your specific question is. You have several ways to pick up such values in your javascript, such as: 1. Pass them in afterRender using JavascriptSupport. 2. Hardcode

Hibernate Session in App Module

2012-08-20 Thread ksrijith
Hi, I'm using Tapestry 5.3.1 with Tapestry-Hibernate 5.3.1. I'm also using Tapestry-security0.4.6 to provide authentication on some of the admin pages for the application. Since we need to provide the urls in the APP module to provide the authentication as shown below: public static void co

Re: datefield onchange

2012-08-20 Thread Bryan Lewis
Ah yes, the problem of not catching changes made by clicking on the little calendar icon. Here's a crude work-around I'm using in 5.2.6, catching the click event. String scriptlet = "Event.observe('" + dateFieldId + "-trigger', 'click', function() { setChanged(true); });" javaScriptSuppor

Re: datefield onchange

2012-08-20 Thread Paul Stanton
I've just tried that too howard, $("selectedDate").observe("change", function(event) { alert('here'); }); However this is only fired when you type into the input field and the click out (blur) .. not when a date is selected via the

page instances to particular threads

2012-08-20 Thread ZKN __
Hi, this is from the tapestry documentation "By reserving page instances to particular threads, all the difficult, ...". Does it mean that a page is bound to a thread and it will always get executed by the same thread? Also does it mean that this thread will not execute any other type of req