Re: How to add new entries to the global message catalog

2009-06-25 Thread Peter Stavrinides
I think Peter wants to edit the message catalog programmatically. yes, sorry I see now that may not have been obvious - Original Message - From: Ulrich Stärk u...@spielviel.de To: Tapestry users users@tapestry.apache.org Sent: Wednesday, 24 June, 2009 18:40:47 GMT +02:00 Athens, Beirut,

Access Control for events

2009-06-25 Thread Moritz Gmelin
Hi, I'm on T5.1.0.5. I have installed 2 AccessControlDispatchers in my application. One for PageRendering and one for event handling. Both Dispatchers just redirect to the start page with an error message in the case that e.g. no user was logged in. This works nicely with all pages and

Re: Access Control for events

2009-06-25 Thread donf yang
You can have a component named Reporter with some javascript code, in your ajax case, handle the event and record any helpful Block, return MultiZoneUpdate(reporter.getZone(), reporter). So, you can control any responses in this component, redirect to login page, display a error message or pop a

Re: Tapestry 5 and JSR-303 plans?

2009-06-25 Thread Olle Hallin
Ideally, there should be a pluggability layer here. I started using Hibernate Validator a couple of years ago, but abandoned it since it's not multi-lingual. (see http://opensource.atlassian.com/projects/hibernate/browse/HV-44). Now I use JaValid instead. Similar feature set, but better

Re: [Announce] Tapestry Testify project

2009-06-25 Thread P . Stavrinides
Hi Paul, Thanks for following up on this! Next, I think my documentation is misleading you... try: private static final TapestryTester SHARED_TESTER = new TapestryTester(demo); Tried this with no luck The documentation's example with MyCoreModule.class is meant to show you how to include

Re: Access Control for events

2009-06-25 Thread Moritz Gmelin
Hi, I'm sorry but I don't understand the idea of your proposal. This Reporter component should it be placed on every page? How will it intercept the AJAX communication between the inPlace Grid (or any other AJAX-using-component) and the server and therefore handle the response and finally

Re: [Announce] Tapestry Testify project

2009-06-25 Thread P . Stavrinides
Hi Paul, This is the cause: java.lang.ClassNotFoundException: org.apache.tapestry5.test.TapestryTestConstants bubbles up from from Pagetester line 111: globals.storeContext(new PageTesterContext(contextPath));) from PageTesterContext line 32: this.contextRoot = new

Re: T5: Grid#setupDataSource and GridDataSource

2009-06-25 Thread Przemysław Wojnowski
Dnia 2009-06-24, śro o godzinie 12:19 -0300, Thiago H. de Paula Figueiredo pisze: Why Grid#setupDataSource() is calculating endIndex and not allowing for GridDataSource to do it? Why GridDataSource#prepare method have startIndex and endIndex parameters and not offset/limit pair? As offset

Feedback on application status page

2009-06-25 Thread Hugo Palma
I've created an application status page that it's very similar to the service status that is bunbled with the framework but instead of showing information on services it shows information on the web application itself. You can check out the code for it and a screenshot here

Re: Feedback on application status page

2009-06-25 Thread Ben Gidley
I think this is useful - maybe you should include it as a component so we can add it an appropriately private area of our sites. It is in general a bad idea to leave such pages on in production - but they are handy for development or as protected diagnostic pages. Ben Gidley www.gidley.co.uk

Re: Feedback on application status page

2009-06-25 Thread Hugo Palma
I was thinking of following the same principle that the ServiceStatus page uses, which is to only be displayed when not in production mode. On Thu, Jun 25, 2009 at 10:16, Ben Gidley b...@gidley.co.uk wrote: I think this is useful - maybe you should include it as a component so we can add it an

Re: Feedback on application status page

2009-06-25 Thread Piero Sartini
Hi Hugo! This is very useful! Just gave it a try and found a bug: ${currentSessionAttribute.size} seems to be empty or NULL for SSOs. This leads to a NullPointerException within formatBytes(). Piero Am Donnerstag, 25. Juni 2009 11:04:09 schrieb Hugo Palma: I've created an application

Re: Feedback on application status page

2009-06-25 Thread P . Stavrinides
Thanks for sharing, nice idea! I was thinking of following the same principle that the ServiceStatus page uses, which is to only be displayed when not in production mode. +1 that should be good enough, the only consideration is to decide what follow up action to take Peter - Original

Re: Feedback on application status page

2009-06-25 Thread Hugo Palma
Thanks Piero, that is indeed a bug. That happens because your SSO is not serializable. I've updated my post with the fix. On Thu, Jun 25, 2009 at 10:22, Piero Sartini li...@pierosartini.de wrote: Hi Hugo! This is very useful! Just gave it a try and found a bug:

Re: Feedback on application status page

2009-06-25 Thread Hugo Palma
Glad i can be of help :o) On Thu, Jun 25, 2009 at 10:37, p.stavrini...@albourne.com wrote: Thanks for sharing, nice idea! I was thinking of following the same principle that the ServiceStatus page uses, which is to only be displayed when not in production mode. +1 that should be good

SessionState values in url

2009-06-25 Thread shymon
I need to exchange small amount of data (for now one string value) between majority of my app pages, but I want to store this value in the page url. AFAIK SessionState offers only 'session' strategy. Moreover I don't want to handle this single value in each page's onActivate. I thought I could

Re: T5: Grid#setupDataSource and GridDataSource

2009-06-25 Thread Thiago H. de Paula Figueiredo
2009/6/25 Przemysław Wojnowski przemyslaw.wojnow...@nask.pl: My point is that the current implementation of Grid#setupDataSource() uses getAvailableRows() to calculate exact values for start and end indices. Shouldn't this be responsibility of GridDataSource? Nice points in the whole message.

Re: Tapestry 5 and JSR-303 plans?

2009-06-25 Thread Thiago H. de Paula Figueiredo
On Thu, Jun 25, 2009 at 4:21 AM, Olle Hallinolle.hal...@gmail.com wrote: Ideally, there should be a pluggability layer here. As long as the validation is defined by an annotation in a getter or field and it doesn't depend on other properties (@NotNull, @Length, etc), the plugabillity layer is

Re: T5: Grid#setupDataSource and GridDataSource

2009-06-25 Thread Przemysław Wojnowski
2009-06-25 Thiago H. de Paula Figueiredo: 2009/6/25 Przemysław Wojnowski przemyslaw.wojnow...@nask.pl: My point is that the current implementation of Grid#setupDataSource() uses getAvailableRows() to calculate exact values for start and end indices. Shouldn't this be responsibility of

Re: Feedback on application status page

2009-06-25 Thread Igor Drobiazko
Nice!!! BTW see here: https://issues.apache.org/jira/browse/TAP5-570 On Thu, Jun 25, 2009 at 11:04 AM, Hugo Palma hugo.m.pa...@gmail.com wrote: I've created an application status page that it's very similar to the service status that is bunbled with the framework but instead of showing

Re: Tapestry 5 and Event component.

2009-06-25 Thread b...@umd
Thanks for your quick answer. I tried to rename this method ButtonClicked instead, but it did not fix the problem : the request event is still not handled. Any other idea ? Howard Lewis Ship wrote: I suspect Tapestry got confused because your method is both the naming convention

Re: [Announce] Tapestry Testify project

2009-06-25 Thread Paul Field
Hi Peter, This is the cause: java.lang.ClassNotFoundException: org.apache.tapestry5.test. TapestryTestConstants What is TapestryTestConstants its not packaged with the jars? so I don't see how this can possibly work. TapestryTestConstants is an object from org.apache.tapestry5.test:

Re: Feedback on application status page

2009-06-25 Thread Hugo Palma
Hi Igor, thanks for pointing that issue out. Indeed it would be cool if we could be view all session data organized in terms of ASOs and persistent fields. I'll give it a go. On Thu, Jun 25, 2009 at 14:17, Igor Drobiazko igor.drobia...@gmail.comwrote: Nice!!! BTW see here:

Re: Tapestry 5 and Event component.

2009-06-25 Thread Thiago H. de Paula Figueiredo
On Wed, Jun 24, 2009 at 5:26 PM, b...@umdbben...@umd.edu wrote: gentoo.tml : t:button type=button t:id=button value=search event=clicked / You haven't used the ck/OnEvent mixin in the button, so the event is not fired. Try t:button type=button t:id=button value=search mixins=ck/OnEvent

Re: Feedback on application status page

2009-06-25 Thread P . Stavrinides
Indeed it would be cool if we could be view all session data organized in terms of ASOs and persistent fields. I'll give it a go. If I am reading this right, you are trying to view this data for 'all sessions'... Hopefully it saves you some time, but the HttpSessionContext interface was the

Re: Feedback on application status page

2009-06-25 Thread Hugo Palma
This page only shows information about the current session. The only way to show this infomation about all sessions with recent servlet implementations AFAIK is to use a session filter that stores every created session in a static manner. But as this solution would be more intrusive in your

Re: [Announce] Tapestry Testify project

2009-06-25 Thread P . Stavrinides
So, you need to add a dependency on the tapestry-test module (and I need to check what's going on in the Testify POM because you should've got that automatically... ). Thanks Paul, up and running now! please keep me posted once you have the pom sorted. Cheers Peter Testify POM because you

Environmental annotation

2009-06-25 Thread Sergey Didenko
Hi, is it ok, that @Environmental does not work for user defined classes? I expected it to work after reading http://tapestry.apache.org/tapestry5.1/guide/env.html. But it does not. I use environment.peek() instead. Regards, Sergey.

Re: Tapestry 5 and Event component.

2009-06-25 Thread b...@umd
Actually I did. I first tried to use it with the OnEvent mixins, but the problem was the same. Then by checking on the ck component reference, I noticed that the component t:button has already a parameter named event. That's why I removed the parameter mixins. I have just tried again with Try

parent rendering phases: must be called explicitly

2009-06-25 Thread Sergey Didenko
Is it ok that parent render phases must be called explicitly from my components? I.e. I must create DerivedComponent.java: protected void beginRender() { super.beginRender(); } otherwise BaseComponent beginRender() is not called. This behaviour seems to

Re: Environmental annotation

2009-06-25 Thread Howard Lewis Ship
@Environmental only works for component classes. On Thu, Jun 25, 2009 at 7:51 AM, Sergey Didenko sergey.dide...@gmail.comwrote: Hi, is it ok, that @Environmental does not work for user defined classes? I expected it to work after reading

Re: parent rendering phases: must be called explicitly

2009-06-25 Thread Thiago H. de Paula Figueiredo
On Thu, Jun 25, 2009 at 12:26 PM, Sergey Didenkosergey.dide...@gmail.com wrote: This behaviour seems to contradict http://tapestry.apache.org/tapestry5.1/guide/rendering.html, Parents before Child It doesn't: When a sub-class overrides an render phase method of a base class, the method is

Re: Environmental annotation

2009-06-25 Thread Onno Scheffers
is it ok, that @Environmental does not work for user defined classes? I expected it to work after reading http://tapestry.apache.org/tapestry5.1/guide/env.html. But it does not. I use environment.peek() instead. The answer should be in the very last paragraph of that page. regards,

Re: Tapestry 5 and Event component.

2009-06-25 Thread ningdh
I don't have source of ck lib. What about removing the parameter 'value' of the method? BTW what does the parameter mean? DH - Original Message - From: b...@umd To: users@tapestry.apache.org Sent: Thursday, June 25, 2009 11:11 PM Subject: Re: Tapestry 5 and Event component.

Re: parent rendering phases: must be called explicitly

2009-06-25 Thread Sergey Didenko
Sorry, that was the other bug. It works as it is documented. On Thu, Jun 25, 2009 at 6:34 PM, Thiago H. de Paula Figueiredothiag...@gmail.com wrote: On Thu, Jun 25, 2009 at 12:26 PM, Sergey Didenkosergey.dide...@gmail.com wrote: This behaviour seems to contradict

Re: Tapestry 5 and Event component.

2009-06-25 Thread b...@umd
Here is the component reference : http://www.chenillekit.org/chenillekit-tapestry/ref/org/chenillekit/tapestry/core/components/Button.html Indeed the parameter value is useless. So I remove it. But it does not work. DH-14 wrote: I don't have source of ck lib. What about removing the

Re: Environmental annotation

2009-06-25 Thread Howard Lewis Ship
Inner classes are not component classes and are not transformed (component class transformation is the hook that allows @Environmental to work). On Thu, Jun 25, 2009 at 9:48 AM, Sergey Didenko sergey.dide...@gmail.comwrote: Sure, I talk about component classes. Sorry for the unclear message.

Re: Tapestry 5 and Event component.

2009-06-25 Thread ningdh
I just tried t5commons component's Button component, it works. I think the Button in t5commons should be the same as CK lib because CK originates from T5commons. t:commons.button type=button t:id=button value=search event=clicked / void onClicked() { System.out.println(I can get it.); }

Re: Environmental annotation

2009-06-25 Thread Sergey Didenko
Sure, I talk about component classes. Sorry for the unclear message. I played with the bug and reproduced it in the simple form. It happens when I put an inner class of the page into environment and use @Environmental. It does not happen when I refactor that inner class out of the page. It does

Re: Environmental annotation

2009-06-25 Thread Sergey Didenko
Well, I don't use @Environmental inside the inner class. Ok, then why @Environmental works for OuterClass which is placed outside .base, .page, .component packages? To reproduce just replace InnerClass for OuterClass in the previous example. And add OuterClass.java: package mytapp; public

Re: Feedback on application status page

2009-06-25 Thread Hugo Palma
Ok, i think i got it working. Check out the new screenshot and code on the blog http://hugopalma.wordpress.com/2009/06/24/tapestry-application-status-page/ On Thu, Jun 25, 2009 at 14:36, Hugo Palma hugo.m.pa...@gmail.com wrote: Hi Igor, thanks for pointing that issue out. Indeed it would be

Re: Tapestry 5 and Event component.

2009-06-25 Thread b...@umd
Ok, it seems to come from the parameter String value in my onButtonClicked statement. I removed it and the event is now handled. However it appears that I am not allowed to return a JSONObject from the OnButtonClicked method. May be is it not possible with this kind of component. But perhaps you

Re: matriz

2009-06-25 Thread Shing Hing Man
I have written a component to input a matrix. The following page has an example to input a square matrix. (The component can input a non-square matrix as well.) http://lombok.demon.co.uk/mathToolkit/algebra/linear/eigenvalue If you like, I can email you the component source files. Shing

creating a component event link for another page...

2009-06-25 Thread Tom Zurkan
i have an admin page that creates a link that would reside on another page and refer to a component on that other page. i implemented it by injecting the page loader and the link source and creating the link that way. however, both the page loader and link source are internal services which

Re: creating a component event link for another page...

2009-06-25 Thread Howard Lewis Ship
Create the event link for your own page, and then obtain the target page and invoke a method on it. On Thu, Jun 25, 2009 at 1:40 PM, Tom Zurkan tzur...@citizensportsinc.comwrote: i have an admin page that creates a link that would reside on another page and refer to a component on that other

Re: Environmental annotation

2009-06-25 Thread Howard Lewis Ship
@Environmental only works on component classes, period. If you are finding otherwise, there's something wrong with your tests or observations. On Thu, Jun 25, 2009 at 10:19 AM, Sergey Didenko sergey.dide...@gmail.comwrote: Well, I don't use @Environmental inside the inner class. Ok, then why

Re: Feedback on application status page

2009-06-25 Thread Jason Lotz
I implemented this code as a component that could be used on any page (or in my case, at the bottom of Layout.tml). This component also checks the Tapestry mode to determine whether or not to show itself. The other primary change that I made is that I'm using in-line styles so that it is

Re: Feedback on application status page

2009-06-25 Thread Kalle Korhonen
Yes, very useful and would make sense to have this data/page available in non-production mode out-of-the-box. Kalle On Thu, Jun 25, 2009 at 2:18 AM, Hugo Palmahugo.m.pa...@gmail.com wrote: I was thinking of following the same principle that the ServiceStatus page uses, which is to only be