Re: Customized error pages, handling of bad values passed to OnActivate()

2009-04-09 Thread Peter Stavrinides
Hi Daniel, In Tapestry there are so many good features concerning exception handling and reporting, you have the flexibility to deal with them in whatever way suites you best. Look at the onException tapestry event handler, it may be what you want, so something like: Object onException(Throwab

Re: "User" service?

2009-04-09 Thread daniel joyce
So is it using some kind of dynamicproxy-black magic? And inside the proxy, is it using per-thread based storage to keep track of who owns who? Where's the code for that so I can understand it? -Daniel On Thu, Apr 9, 2009 at 11:17 PM, Robert Zeigler wrote: > HttpServletRequest is scoped per-thr

Re: "User" service?

2009-04-09 Thread Robert Zeigler
HttpServletRequest is scoped per-thread. The object that is injected is a proxy around the actual HttpServletRequest object. When you reference it, the methods are called on the "real" request for the current thread. So, yes, it works. :) You can do the same thing with the hibernate Session

Re: "User" service?

2009-04-09 Thread daniel joyce
Also, if I inject a Hibernate Session, and a HttpServletRequest, how does threading work with that? I mean, one thread could be running through the singleton, processing one request against the session, right as another one enters. How do you inject 2 per-thread managed hibernate sessions into a s

Re: More migration issues, 5.0.18 -> 5.1.0.2

2009-04-09 Thread Peter Stavrinides
> This only seems to affect some people ... I suspect it may only occur > when an Apache server is between the browser and the servlet > container. Can you confirm? FYI, if it helps you at all I am running 5.1.0.0 in production Apache 2 -> AJP connector -> Tomcat 6, I get only the occasional Gzip

Re: "User" service?

2009-04-09 Thread daniel joyce
public MyRequestFilter implements RequestFilter { private final HttpServletRequest servletRequest; public MyRequestFilter(HttpServletRequest request) { servletRequest = request; } public boolean service(Request request, Response response, RequestHandler handler) {

Re: "User" service?

2009-04-09 Thread daniel joyce
Part of the problem is that to grab the user object, I need access to a session, and sessions are not thread safe. So either I have a service that uses a long-lived session with user objects loaded by synchronized methods. Or my requestfilter is made per-thread with a session, or HibernateSessionSo

Re: "User" service?

2009-04-09 Thread daniel joyce
Still confused. So buildMethods allow proxies/per-thread? But using constructor style doesn't? Even if the class passed to autobuilding is annotated per-thread? On Thu, Apr 9, 2009 at 8:58 PM, Robert Zeigler wrote: > Yes, build methods go in the app module. > > RequestFilters: depends on how you

Re: "User" service?

2009-04-09 Thread Robert Zeigler
Yes, build methods go in the app module. RequestFilters: depends on how you build them, but if you construct them as a bonafide service (rather than autobuilding) they will be proxied, and are therefore elligible for "per thread scope". That said, I've never used a per-thread RequestFilter.

Re: "User" service?

2009-04-09 Thread Robert Zeigler
Yes, you can contribute to HttpServletRequestFilter. But that's pretty "barebones"; my preference for filters is to contribute a RequestFilter (a lot of state information is setup by tapestry during and after the HttpServletRequestHandler pipeline; off the cuff, I'm pretty sure ApplicationSt

Re: "User" service?

2009-04-09 Thread daniel joyce
Also, build methods go in the appmodule, right? Guess it wasn't my final question. :) Also, are RequestFilters per-Thread, or Singleton? Can they be per-thread if needed? -Daniel On Thu, Apr 9, 2009 at 7:42 PM, daniel joyce wrote: > I also found a HttpServletRequestFilter. > > Thanks for the r

Re: "User" service?

2009-04-09 Thread daniel joyce
I also found a HttpServletRequestFilter. Thanks for the response, it helps to explain a lot. I am finding my biggest problem is the documentation. I have OReilley safari access, and the Tapestry 5 book there leaves out about half features. What is needed is a tapestry cookbook/recipe style thing.

Re: "User" service?

2009-04-09 Thread Robert Zeigler
Autobuilder vs. builder vs. constructor: Depends on your needs. These aren't mutually exclusive, either. a) Tapestry's ioc container will attempt to use an "ObjectLocator" to fill in the arguments to the constructor; one such object provider is a service injection provider. So, though it us

Re: BeanEditForm / BeanEditor and Validation Events

2009-04-09 Thread Geoffrey Wiseman
On Thu, Apr 9, 2009 at 8:11 PM, Howard Lewis Ship wrote: > The events triggered by the default components used by the BeanEditor > can't be caught: those components are rendered from other pages, they > aren't part of your page hierarchy, so component events bubble up on > the other page hierarch

Re: BeanEditForm / BeanEditor and Validation Events

2009-04-09 Thread Howard Lewis Ship
The events triggered by the default components used by the BeanEditor can't be caught: those components are rendered from other pages, they aren't part of your page hierarchy, so component events bubble up on the other page hierarchy. In addition, the client element ids are documented, but the com

Re: "User" service?

2009-04-09 Thread daniel joyce
How/where do I inject it? It's not obvious from the docs on when/how I should user autobuilder vs builder vs constructor. The docs say you need to inject services explicitely inside the constructor, yet the CayenneRequestFilter has a constructor w/o Inject annotations. Also, the Tapestry 5 Reques

Re: Disable sorting- grid component

2009-04-09 Thread Geoff Callender
Example of turning off an individual column's sorting: http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/tables/gridmodel1 On 07/04/2009, at 5:53 AM, Geoffrey Wiseman wrote: On Mon, Apr 6, 2009 at 1:59 PM, Amit Nithian wrote: Is there a simple way to disable the sorting featur

Re: Customized error pages, handling of bad values passed to OnActivate()

2009-04-09 Thread Carl Crowder
When tapestry throws an excpetion it gets handled by the exception report page - http://wiki.apache.org/tapestry/Tapestry5ExceptionPage You can override that. For other generic errors such as 404, check out http://wiki.apache.org/tapestry/Tapestry5HowToUseTapestryForCustomErrorPages daniel

Customized error pages, handling of bad values passed to OnActivate()

2009-04-09 Thread daniel joyce
Lets say a user bookmarks a path like view/123 This is supposed to allow them to go a tapestry page that will display info on Project 123. ViewProject.java has a onActivate(Integer projectNum) What happens if the user types in view/hshqwueh ? I know Tapestry will balk on trying to convert that

Re: "User" service?

2009-04-09 Thread daniel joyce
Awesome, Thanks! So far, the nice thing about Tapestry has been its very fluid component based nature. I am so used to having to do things in a certain order with other frameworks. Here, things are very orthogonal, and my reasoning about how to use Tapestry keeps improving. -Daniel On Thu, Apr 9

Re: [t5.1.0.2] Migration problem as LinkFactory is no longer present

2009-04-09 Thread Dave Greggory
I wasn't actually aware of the URL rewriting feature was intended for this purpose. I'm gonna check it out. Do you plan to release a 5.1.0.x release of your changes shortly? Dave - Original Message From: Robert Zeigler To: Tapestry users Sent: Thursday, April 9, 2009 3:02:27 PM Su

Re: [t5.1.0.2] Migration problem as LinkFactory is no longer present

2009-04-09 Thread Dave Greggory
Hi Andy, Thanks for the suggestion, but I'm not quite sure what you're doing when you're advising the ComponentEventLinkEncoder. Since the internals are much more different, I'm not sure how to advise the createPageRenderLink method. If you don't mind, can you provide details of what you're do

Re: "User" service?

2009-04-09 Thread Robert Zeigler
Here's a sample request filter that plays with application state objects (which are backed by the http session): http://code.google.com/p/tapestry5-cayenne/source/browse/trunk/tapestry5-cayenne-core/src/main/java/com/googlecode/tapestry5cayenne/services/CayenneRequestFilter.java You can also us

Re: T5 - app.properties using charset "iso-8859-1"

2009-04-09 Thread Fernanda C. Carmo
Roberto, Thanks for the reply. Fernanda. Tapestry Infodea wrote: > > I believe that it's not possible. You can resolve as follows: > > http://wiki.apache.org/tapestry/Tapestry5HowToOverrideTheDefaultErrorMessageBanner > > and converting the original Errors_xx.properties to UTF-8. > > Robe

BeanEditForm / BeanEditor and Validation Events

2009-04-09 Thread Geoffrey Wiseman
Whenever I try and capture validation events for a particular component in beaneditor / beaneditform, I fail. I can catch the whole form, but not the individual components, anyone know why? I've got a form with a beaneditor in it, and I've added a field of my own, 'sponsor', but it also contains

Re: "User" service?

2009-04-09 Thread daniel joyce
What about using a requestfilter? Any better docs on how to implement one? I see bits and pieces here and there, but nothing as coherent as the Dispatcher howto. -Daniel On Thu, Apr 9, 2009 at 11:38 AM, daniel joyce wrote: > I looked at spring security, and it required yet-another annotation, >

Re: [t5.1.0.2] Migration problem as LinkFactory is no longer present

2009-04-09 Thread Robert Zeigler
Hi Dave, I should be committing some changes to the new URL Rewriting support shortly (updating documentation at the moment); I'll be very curious to see if the api changes (note: this is an "alpha" feature, still subject to api change until 5.1 is declared "final") will allow you to do w

RE: [t5.1.0.2] Migration problem as LinkFactory is no longer present

2009-04-09 Thread Blower, Andy
If you want to do the equivalent in 5.1 then you'll need to extend ComponentEventLinkEncoderImpl and override any methods you want to change. Alternatively (since the decoding is now in here rather than in the Dispatcher) you can use service advice which is what I did. Check out the recent threa

Re: "User" service?

2009-04-09 Thread daniel joyce
I looked at spring security, and it required yet-another annotation, and annotating a class to protect it didn't protect the methods as well. This struck me as too hit-or-miss With Tomcat, I can simply protect whole paths or pages, no need to worry about annotating a class, and then annotating eac

[t5.1.0.2] Migration problem as LinkFactory is no longer present

2009-04-09 Thread Dave Greggory
We needed to contribute a custom version of LinkFactory to meet a business need. I realize that it was internal and was subject to change, but now that there is no LinkFactory present in 5.1 I would like some help figuring out how to implement the same functionality. We need to be able to spec

Re: "User" service?

2009-04-09 Thread manuel aldana
Maybe you should look at the tapestry-spring-security plugin (http://www.localhost.nu/java/tapestry-spring-security/index.html). It works great and integrating is also not that difficult. Good thing is that you can both secure by single page or by page folders. Beware that it is not compatible

[bean-grid] master->detail flow with lightbox effect

2009-04-09 Thread manuel aldana
Hi, I am having a bean-grid, and when I click on a list-item I want to change the view to the corresponding bean-edit-form (master-detail view). For that I want to use the lightbox effect (http://www.huddletogether.com/projects/lightbox2/), so for the user the bean-edit-form comes as a modal

Re: Problem with inherit binding in 5.1.0.2

2009-04-09 Thread Howard Lewis Ship
Making my head spin ... I'll try and reason this one out. On Thu, Apr 9, 2009 at 9:41 AM, Blšták Peter wrote: > Hi > > I have a problem with inherit parameter binding in 5.1.0.2 and 5.1.0.1 > release (5.0.18 is OK). > Inherited value is lost if count of inheritance in stack for one component >

Problem with inherit binding in 5.1.0.2

2009-04-09 Thread Blšták Peter
Hi I have a problem with inherit parameter binding in 5.1.0.2 and 5.1.0.1 release (5.0.18 is OK). Inherited value is lost if count of inheritance in stack for one component parameter is more than 1 (not sure if this is good description). Example will be the best description of my problem... Fi

Re: T5: tapestry.page-pool.hard-limit for high traffic websites

2009-04-09 Thread Howard Lewis Ship
You can make the hard-limit very high; it can never exceed the number of request-processing threads configured for your servlet container. That, of course, brings into question why you would even need a hard limit (this may be over-engineered!). I expect that in a later release, probably 5.2, you'

Re: T5: tapestry.page-pool.hard-limit for high traffic websites

2009-04-09 Thread Peter Stavrinides
See http://tapestry.formos.com/nightly/tapestry5/guide/conf.html >Should I then maximize the page-pool.hard-limit to 150? Its difficult to give you numbers, its something you should figure out through monitoring and testing, I ran a number of test to determine my thresholds. I am using: configu

T5: tapestry.page-pool.hard-limit for high traffic websites

2009-04-09 Thread Peter Kanze
Hello The default for the absolute maximum number of page instances is 20. Does this mean 20 users can request the same page at the same time? I am rebuilding a website that has at peaktimes around 100 users per second, requesting the same page (home page).. Should I then maximize the page-pool.

Re: T5 - app.properties using charset "iso-8859-1"

2009-04-09 Thread Tapestry Infodea
I believe that it's not possible. You can resolve as follows: http://wiki.apache.org/tapestry/Tapestry5HowToOverrideTheDefaultErrorMessageBanner and converting the original Errors_xx.properties to UTF-8. Roberto. Fernanda C. Carmo ha scritto: It´s possible to tell Tapestry (5.0.18) to use a

T5 - app.properties using charset "iso-8859-1"

2009-04-09 Thread Fernanda C. Carmo
It´s possible to tell Tapestry (5.0.18) to use a diferent charset (especifically "iso-8859-1") when reading the properties file? How i do it? I put configuration.add(SymbolConstants.CHARSET, "iso-8859-1"); in the contributeApplicationDefaults(MappedConfiguration configuration) method and I

Logging Setup with T5+Spring 2.06

2009-04-09 Thread wesleywj2
hi, i have the project going using T5 and Spring 2, and deploy in tomcat 6.0.18. The problem is how do i configure the logging? 1) In spring 2? or T5? 2) log4j.properties will be placed under classes under WEB-INF, where do i setup the logger in order for me to inject into T5 pages and do the l

Re: Encoding an event context parameter in javascript

2009-04-09 Thread Hugo Palma
Done, i've created an issue with my implementation. For future reference: https://issues.apache.org/jira/browse/TAP5-637 On Thu, Apr 9, 2009 at 1:15 AM, Thiago H. de Paula Figueiredo < thiag...@gmail.com> wrote: > Em Wed, 08 Apr 2009 20:07:41 -0300, Hugo Palma > escreveu: > > Any idea how i ca

Re: Several problems with T5.1.0.2

2009-04-09 Thread serg-l
Thnks Andy, I'm increase memory if it need. But the second thing is more significant. Now I'm just say that something happens with T5.1.0.2 against T5.1.0.1 (I'm do nothing with my sources) and this prevent me to use T5.1.0.2. May be somebody also carefully manually check installed application and

Re: Encoding an event context parameter in javascript

2009-04-09 Thread Hugo Palma
:o) fair enough, i'll give it a try... On Thu, Apr 9, 2009 at 1:15 AM, Thiago H. de Paula Figueiredo < thiag...@gmail.com> wrote: > Em Wed, 08 Apr 2009 20:07:41 -0300, Hugo Palma > escreveu: > > Any idea how i can do this ? >> > > You can write a Javascript counterpart of ContextPathEncoder and

Re: Several problems with T5.1.0.2

2009-04-09 Thread Andy Pahne
serg-l schrieb: Hi! I'm found strange things when try T5.1.0.2... Under mvn jetty:run everything work properly... 1. When I'm perform integration tests (mvn test), after testing of several pages I'm receive java.lang.OutOfMemoryError: Java heap space Yeah, we have two kinds of unit tests i