Tapestry 5 in Action 50% Off

2011-06-30 Thread Yohan Yudanara
Hi, I got "Deal of the day" email from Manning. All MEAP purchase have 50% discount, including the one and only Tapestry 5 book in English :). This is the link to Tapestry books: http://www.manning.com/drobiazko Manning's "Deal of the Day" email is on attachment. Best regards, Yohan Yudanara --

Re: Want locale to be part of every uri

2011-06-30 Thread Thiago H. de Paula Figueiredo
On Thu, 30 Jun 2011 21:39:27 -0300, Tony Nelson wrote: Is there any suggested reading and examples that will help a new guy with this? http://tapestry.apache.org/request-processing.html, reachable from the documentation page under the "Request Processing" link. ;) -- Thiago H. de Paula

Re: Want locale to be part of every uri

2011-06-30 Thread Thiago H. de Paula Figueiredo
On Thu, 30 Jun 2011 21:54:35 -0300, Nillehammer wrote: Hi Thiago, Hi! The only (slightly) hard part is building a redirect mechanism in handlePageRender(...). I surfed through Tapestry's source code and found out that PageRenderRequestHandlerImpl uses a ComponentEventResultProcessor

Re: Want locale to be part of every uri

2011-06-30 Thread Nillehammer
Hi Thiago, I've never tried a ComponentRequestFilter for doing things that involved redirection, as they are invoked way later in the Tapestry processing pipeline. Please post if it works. ;) It turned out that ComponentRequestFilter has several advandatages over RequestFilter: 1.) If a locale

Re: Want locale to be part of every uri

2011-06-30 Thread Tony Nelson
On Jun 30, 2011, at 6:30 PM, Howard Lewis Ship wrote: > In Tapestry, any time your solution involves creating a base page, you > are probably off on the wrong track. > > The best place to add cross-cutting concerns such as you describe is > by contributing a filter into the ComponentRequestHandl

Re: Optimal Page to List Edit and Create

2011-06-30 Thread Taha Tapestry
Oops wrong link The correct one is https://github.com/tawus/tawus/tree/master/tawus-core Regards Taha On Jul 1, 2011, at 5:00 AM, Taha Hafeez wrote: > Hi Mark, > > You can have a look at github.com/tawus/tawus/tawus-core and > tawus-hibernate. > Checkout the integration tests > The componen

Re: Optimal Page to List Edit and Create

2011-06-30 Thread Taha Hafeez
Hi Mark, You can have a look at github.com/tawus/tawus/tawus-core and tawus-hibernate. Checkout the integration tests The component entitygrid does all this and more and all you have to do is set the column names. It uses table instead of div for rendering forms. This component is an example of th

Re: Want locale to be part of every uri

2011-06-30 Thread Thiago H. de Paula Figueiredo
On Thu, 30 Jun 2011 19:56:20 -0300, Nillehammer wrote: Hi Thiago, Hi! That's what I had already tried before asking: ComponentEvenLinkEncoder.decodeComponentEventRequest() PersistentLocale was still null, even if present in the uri. This would only work in event request, not in page r

Re: Want locale to be part of every uri

2011-06-30 Thread Nillehammer
Hi Thiago, I'd write a RequestFilter that invokes ComponentEvenLinkEncoder.decodePageRenderRequest() and ComponentEvenLinkEncoder.decodeComponentEventRequest() and after that check the PersistentLocale. :) That's what I had already tried before asking: ComponentEvenLinkEncoder.decodeComponentE

Re: Want locale to be part of every uri

2011-06-30 Thread Howard Lewis Ship
On Thu, Jun 30, 2011 at 3:14 PM, Nillehammer wrote: > Hi List, > > if Tapestry recieves a request that does not contain the locale at the > beginning of the uri, it will determine the desired locale from the request > headers and send the respond. The PersistentLocale will not be set. > > In that

Re: Want locale to be part of every uri

2011-06-30 Thread Thiago H. de Paula Figueiredo
On Thu, 30 Jun 2011 19:14:51 -0300, Nillehammer wrote: Hi List, Hi! I dug into Tapestry's source code and found out that PersistentLocale is set in ComponentEventLinkEncoder's decode methods. From that I judged I would only have access to PersistentLocale from within pages or compone

Re: Want locale to be part of every uri

2011-06-30 Thread Josh Canfield
Seems like a good place for a LinkTransformer? On Thu, Jun 30, 2011 at 3:14 PM, Nillehammer wrote: > Hi List, > > if Tapestry recieves a request that does not contain the locale at the > beginning of the uri, it will determine the desired locale from the request > headers and send the respond. Th

Want locale to be part of every uri

2011-06-30 Thread Nillehammer
Hi List, if Tapestry recieves a request that does not contain the locale at the beginning of the uri, it will determine the desired locale from the request headers and send the respond. The PersistentLocale will not be set. In that case I want to set the PersistentLocale and send a redirect t

Re: Access component via http request

2011-06-30 Thread Thiago H. de Paula Figueiredo
On Thu, 30 Jun 2011 17:55:35 -0300, Joel Halbert wrote: Can I access a component out of the context of a page? No. i.e. does a component have to be bound to a Page to be rendered? Yes. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, develo

Re: confirmation javascript in ajaxformloop

2011-06-30 Thread Ernesto Badillo
Thanks a lot! Very simple workaround. I don't know why it didn't occur to me. On Thu, Jun 30, 2011 at 1:22 PM, Kalle Korhonen wrote: > This has been discussed a few times. The right way would be to use > event propagation as intended, for example: > Remove > > Then add a handler for the nested el

Re: Access component via http request

2011-06-30 Thread Thiago H. de Paula Figueiredo
On Thu, 30 Jun 2011 18:30:56 -0300, Joel Halbert wrote: I could always embed the Component within an empty wrapper Page and access that via http, but I was hoping this wouldn't be necessary. Component instances only exist inside pages and don't have URLs. -- Thiago H. de Paula Figueiredo I

Re: Access component via http request

2011-06-30 Thread Thiago H. de Paula Figueiredo
On Thu, 30 Jun 2011 18:28:14 -0300, Joel Halbert wrote: I don't need to do anything fancy like Page rendering, and infact am just using a Page instance as useful hook for ajax methods. I'd use blocks, single Delegate instance and an onActivate() method to choose the block to be rendered.

Re: Access component via http request

2011-06-30 Thread Joel Halbert
Good question, my rational was that I *might" want need to re-use the template I'm creating inside a Tap Page soon, so I thought I would start off by making the html I need to render a Component (as I could access and render a component directly via an http request). I could always embed the Compo

Re: Access component via http request

2011-06-30 Thread Joel Halbert
hmm, how about using the tapx TemplateAPI and TemplateRenderer within a tapestry app? I don't need to do anything fancy like Page rendering, and infact am just using a Page instance as useful hook for ajax methods. >From this method I just want to return some html rendered with tml, using tap's

Optimal Page to List Edit and Create

2011-06-30 Thread Mark
I commonly create pages with a bean edit form followed by a list of items each with an edit and delete link. Visiting the page will give you a new object that you can save and clicking on the edit link for any object in the list will load it so it can be edited and saved. Below is an example of how

Re: Access component via http request

2011-06-30 Thread Markus Feindler
Then, why don't you use a page at all? Can I access a component out of the context of a page? i.e. does a component have to be bound to a Page to be rendered? I'm trying render a simple html template and fetch it from my JS. On Thu, 2011-06-30 at 17:38 -0300, Thiago H. de Paula Figueiredo wrot

Re: Access component via http request

2011-06-30 Thread Howard Lewis Ship
You can ask any component to generate an event request Link using its component resources. In Tapestry, you don't try to second guess, on the client side, what links will look like ... you ask the server side to generate a link, and then your JavaScript code can send Ajax requests to that componen

Re: Access component via http request

2011-06-30 Thread Joel Halbert
Can I access a component out of the context of a page? i.e. does a component have to be bound to a Page to be rendered? I'm trying render a simple html template and fetch it from my JS. On Thu, 2011-06-30 at 17:38 -0300, Thiago H. de Paula Figueiredo wrote: > On Thu, 30 Jun 2011 17:26:35 -0300,

Re: Access component via http request

2011-06-30 Thread Thiago H. de Paula Figueiredo
On Thu, 30 Jun 2011 17:26:35 -0300, Joel Halbert wrote: Hi, Hi! Is it possible to invoke a component directly via HTTP? E.g given a Tapestry Page: public class MyPage { Object onMyRequest() { return something; } } I can call http://myapp/mypage:myrequest/ to return somethin

Access component via http request

2011-06-30 Thread Joel Halbert
Hi, Is it possible to invoke a component directly via HTTP? E.g given a Tapestry Page: public class MyPage { Object onMyRequest() { return something; } } I can call http://myapp/mypage:myrequest/ to return something. Can I do the same for a component? Cheers, Joel --

Re: Database based localization

2011-06-30 Thread diogoeag
Hi, thanks, meanwhile I had also found that link. Thanks anyway. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Database-based-localization-tp4538988p4539938.html Sent from the Tapestry - User mailing list archive at Nabble.com. --

Re: Tapestry + servlet 3.0 spec

2011-06-30 Thread Julien Martin
thanks. 2011/6/30 Christian Köberl > On 2011-06-30 16:23, Julien Martin wrote: > >> Hello, >> I am new to Tapestry and I am just wondering what would be the very >> minimal >> web.xml configuration bearing in mind I am going to use the servlet 3.0 >> spec. >> > > Take the version generate by the

Re: Database based localization

2011-06-30 Thread Christian Köberl
On 2011-06-30 16:13, diogoeag wrote: I'm using tapestry 5.2.5 and trying to override the a service to get database based localization. I've searched in the forum and the solutions present here don't work. Did you try "T5 : Expanding Messages Catalog for localization from arbitrary source" (htt

Re: Tapestry + servlet 3.0 spec

2011-06-30 Thread Christian Köberl
On 2011-06-30 16:23, Julien Martin wrote: Hello, I am new to Tapestry and I am just wondering what would be the very minimal web.xml configuration bearing in mind I am going to use the servlet 3.0 spec. Take the version generate by the quickstart archetype and change the header to 3.0: http:/

Re: confirmation javascript in ajaxformloop

2011-06-30 Thread Kalle Korhonen
This has been discussed a few times. The right way would be to use event propagation as intended, for example: Remove Then add a handler for the nested element: Event.observe($('confirmRemoval'), 'click', function(event) {if (!confirm('are you sure to want to remove?')) event.stop();}); to stop th

Re: How can I 'force' Tapestry to use HTTPS if the page was loaded via HTTPS?

2011-06-30 Thread Jonathan Barker
Perhaps, but it wasn't immediately obvious at the time how that would happen, and I haven't thought about it lately. If so, it would be nice to have an alternate implementation of BaseURLSource included in T5 that could be turned on with a switch. I wanted the same behaviour as existed in T4. O

Re: Approximative estimate for release date of Tapestry 5.3??

2011-06-30 Thread Howard Lewis Ship
Well, we just shipped our first alpha; however, our goal is to progress through some alpha and beta releases, and ship a final release in the fall. On Thu, Jun 30, 2011 at 7:23 AM, Julien Martin wrote: > Hello, > Can anyone please give me an approximative release date for Tapestry 5.3? > Regards,

confirmation javascript in ajaxformloop

2011-06-30 Thread Ernesto Badillo
Hi, I was trying to add a small script asking for confirmation before removing an element contained in the ajaxformloop component. The first thing I tried was the following: Remove This doesn't work becasue this component's onclick handler is called first and thus it is not possible to stop the

Re: Struggling with Ajax

2011-06-30 Thread Josh Canfield
> By moving the textfield outside the zone, I managed to avoid the error on > zone redisplay.. I still can't seem to pass a value into the component when I > click the action link.. You aren't getting the value because you aren't posting the form. Your "newAlias" context is going to populate the

[ANNOUNCE] Tapestry 5.2.6

2011-06-30 Thread Howard Lewis Ship
A new stable version of Tapestry is available for download, Tapestry 5.2.6. We can recommend that all Tapestry 5.2 applications upgrade to version 5.2.6. This new version addresses some client-side JavaScript issues, upgrading the built-in copy of Prototype to the latest version (1.7). Tapestry 5

Re: T5 Select Menu with Other Option

2011-06-30 Thread George Christman
After playing with the value encoder, I found this method to be slightly better since it will handle newly created session objects / existing objects and other. @SuppressWarnings("unchecked") public ValueEncoder getSelectEncoder() { return new ValueEncoder() { public S

Re: Tapestry 5.25 with Tynamo 0.4.0 onActionFromLogout not redirecting to index page.

2011-06-30 Thread cablepuff
Thanks it works. logout It would be cool if a.) I can specify and configure the post logout page as either a parameter or configuration (don't know how). b.) Fix the session issue during logout. http://tapestry.1045711.n5.nabble.com/Error-after-logout-td3389686.h

Re: Struggling with Ajax

2011-06-30 Thread Tony Nelson
By moving the textfield outside the zone, I managed to avoid the error on zone redisplay.. I still can't seem to pass a value into the component when I click the action link.. On Jun 30, 2011, at 11:00 AM, Tony Nelson wrote: > I'm trying to build a simple component that will be used on 2 pages

Struggling with Ajax

2011-06-30 Thread Tony Nelson
I'm trying to build a simple component that will be used on 2 pages. It seems like it should be simple enough. I want an unordered list of existing items, a text field that I can type a new name in, and then a link/button that adds the new name to the list. The component will be used in the co

Re: How can I 'force' Tapestry to use HTTPS if the page was loaded via HTTPS?

2011-06-30 Thread Josh Canfield
> https://issues.apache.org/jira/browse/TAP5-167 Couldn't logic in the base url source solve that case as well? On Jun 30, 2011 6:30 AM, "Jonathan Barker" wrote: > Take a look at: > > https://issues.apache.org/jira/browse/TAP5-167 > > Is this what you are looking for? > > Regards, > Jonathan > >

Tapestry + servlet 3.0 spec

2011-06-30 Thread Julien Martin
Hello, I am new to Tapestry and I am just wondering what would be the very minimal web.xml configuration bearing in mind I am going to use the servlet 3.0 spec. Regards, Julien.

Approximative estimate for release date of Tapestry 5.3??

2011-06-30 Thread Julien Martin
Hello, Can anyone please give me an approximative release date for Tapestry 5.3? Regards, Julien.

Database based localization

2011-06-30 Thread diogoeag
Hi, I'm using tapestry 5.2.5 and trying to override the a service to get database based localization. I've searched in the forum and the solutions present here don't work. What service should I override? ComponentMessagesSource.class or Messages.class? I've tried to do as in the manual: @Cont

Re: How can I 'force' Tapestry to use HTTPS if the page was loaded via HTTPS?

2011-06-30 Thread Jonathan Barker
Take a look at: https://issues.apache.org/jira/browse/TAP5-167 Is this what you are looking for? Regards, Jonathan On Thu, Jun 30, 2011 at 4:53 AM, martijn.list wrote: > I have a page which can be loaded via http or https. I don't want to > enforce https using @Secure. When the user enters th

Re: 5.3.0 java.lang.IncompatibleClassChangeError: Implementing class

2011-06-30 Thread George Christman
Thanks everyone, I haven't had a chance to get back to trying to resolve this issue with my test project, I do however know I am not using Tapestry Jquery and I tried upgrading our main project to 5.3 yesterday afternoon which seemed to work flawlessly. I'm using the same environment with both proj

Re: How can I 'force' Tapestry to use HTTPS if the page was loaded via HTTPS?

2011-06-30 Thread Josh Canfield
Implement BaseURLSource and ignore the secure flag, instead base it on whether the current request is secure. On Jun 30, 2011 1:54 AM, "martijn.list" wrote: > I have a page which can be loaded via http or https. I don't want to > enforce https using @Secure. When the user enters the page via https

Re: Tapestry 5.25 with Tynamo 0.4.0 onActionFromLogout not redirecting to index page.

2011-06-30 Thread Alejandro Scandroli
That's what I thought. If you wan't to handle the logout yourself you need to manually create the logout link in the same component. Add this to your Layout.tml custom-logout Cheers. Alejandro. On Thu, Jun 30, 2011 at 7:56 AM, cablepuff wrote: > >            

Request parameter is lost when redirecting from http to https

2011-06-30 Thread martijn.list
I have enabled https globally for all pages by setting MetaDataConstants.SECURE_PAGE to true. Now if I access a page with a URL containing a request parameter, the request parameter is lost when redirecting: http://example.com/activate?key=13094257801800ogbw2aci47q36c7okl477kxf6m GET /activate?ke

How can I 'force' Tapestry to use HTTPS if the page was loaded via HTTPS?

2011-06-30 Thread martijn.list
I have a page which can be loaded via http or https. I don't want to enforce https using @Secure. When the user enters the page via https, all form postings should be done with https (i.e., relative URLs) and when the user enters the page via http, all form postings should be done with http. In oth