Re: TSS add custom voter & securing non-tapestry methods

2010-05-11 Thread Jonathan Barker
It's really strange that you are seeing the "default" access manager, as well as one you are trying to define. Could you post your web.xml and application.xml files? On Tue, May 11, 2010 at 3:26 AM, Nicolas Gillet - MARKET-IP < nicolas.gil...@market-ip.com> wrote: > Hello, > > Thank you for yo

Re: Ajax event hooks T5 style

2010-05-11 Thread Alex Kotchnev
Can anyone chime in with an opinion on this question ? Thiago - you usually have words of wisdom - would you share your thoughts, how would you approach this ? Regards, Alex K On Sat, May 8, 2010 at 8:58 PM, akochnev_chub wrote: > > I'm working on something that I think is very common functio

Re: GAE 1.3.3.1 dev server & T5.2 : new exception on startup

2010-05-11 Thread Alex Kotchnev
This issue turned out to be my own error - I switched over the local dev server to the 1.3.3.1 SDK; however, I failed to switch the api jars (e.g. appengine-api.jar, my maven project was still using the 1.3.0 jars that were locally installed from the 1.3.0 SDK) that are bundled into the war file to

comet implementation issue

2010-05-11 Thread rajesh sukumaran
Hi, I implemented reverse ajax component that uses long polling technique. Basically what I did was to use JQuery's jQuery.getJSON(...) method to make an ajax call using an action event URL of the component. The action event on the component spawns another event(using resourse.triggerEvent()) whi

Re: Noob problem with Guessing Game tutorial

2010-05-11 Thread Steve Eynon
Hi Phil, Now you've made me do the tutorial... (D'Oh) and yeah, it's not quite as accurate as I expect it once was. But fundamentally, the principles are sound. So again, starting from scratch, I generate the archetype. For the record, I'm using Maven 2.2.1 (as given by mvn -version) and by defa

Re: Noob problem with Guessing Game tutorial

2010-05-11 Thread aibkwik
Steve. thanks, for hangin in there, man. I have had that "ta da" moment each time I have started over from scratch. Each time I re-create my project, I follow the tutorial and actually use the exact command you specified. (Discovered the "create" error in the tutorial (deprecated function) afte

Re: Noob problem with Guessing Game tutorial

2010-05-11 Thread Steve Eynon
Scary that the exception talks about components when it should be looking for a page. What does your web.xml look like? What is your app package set to? It should be: tapestry.app-package org.apache.tapestry5.tutorial See http://tapestry.apache.org/tapestry5.1/guide/conf.html Act

Re: Best way to extend a component?

2010-05-11 Thread Andreas Bohnert
ah, ok. thanks! Thiago H. de Paula Figueiredo wrote: On Tue, 11 May 2010 17:47:46 -0300, Andreas Bohnert wrote: Thank you for that clarification! But what am I supposed to put in that template, if I bound all the parameters already in the java class? Just the t:id. ---

Re: Best way to extend a component?

2010-05-11 Thread Thiago H. de Paula Figueiredo
On Tue, 11 May 2010 17:47:46 -0300, Andreas Bohnert wrote: Thank you for that clarification! But what am I supposed to put in that template, if I bound all the parameters already in the java class? Just the t:id. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and

Re: Best way to extend a component?

2010-05-11 Thread Andreas Bohnert
Thank you for that clarification! But what am I supposed to put in that template, if I bound all the parameters already in the java class? java: @Component(parameters= { "model=myModel", "value=myValue" }) private Select select; and again(?) in the template: On Tue, 11 May 2010 16:0

Re: Noob problem with Guessing Game tutorial

2010-05-11 Thread Thiago H. de Paula Figueiredo
On Tue, 11 May 2010 17:11:10 -0300, aibkwik wrote: Not sure what the current T5 deal is with putting .tml files in the WEB-INF, but I'm certain it's not recommended. Tapestry never looked for template files inside WEB-INF. Instead, it looks in the application root and in the classpath. An

Re: AJAX version of setupRender()

2010-05-11 Thread Thiago H. de Paula Figueiredo
On Tue, 11 May 2010 17:24:04 -0300, Juan Isern wrote: Hi guys, Hi! I was wondering if there's a "version" of setupRender() that works for AJAX events too. onActivate() is invoked in any kind of request. You can use ComponentResources.isRendering() to know if it is a rendering request a

AJAX version of setupRender()

2010-05-11 Thread Juan Isern
Hi guys, I was wondering if there's a "version" of setupRender() that works for AJAX events too. It makes sense totally that setupRender() is not executed because no render takes place... but still I'm unable to find a component cycle method that I cling to in order to perform some initializatio

Re: Noob problem with Guessing Game tutorial

2010-05-11 Thread aibkwik
Not sure what the current T5 deal is with putting .tml files in the WEB-INF, but I'm certain it's not recommended. Again, as Sergey and I have suggested, place your .tml files in the same package as your java / class files. With your current maven setup, that would be: src/main/resources/org/

Re: Noob problem with Guessing Game tutorial

2010-05-11 Thread Steve Eynon
Not sure what the current T5 deal is with putting .tml files in the WEB-INF, but I'm certain it's not recommended. Again, as Sergey and I have suggested, place your .tml files in the same package as your java / class files. With your current maven setup, that would be: src/main/resources/org/apa

Re: [T5.1] Obtaining The Page Name In A MarkupRendererFilter

2010-05-11 Thread Steve Eynon
Yeah, exceptions are expensive to create and throw and never should really be caught as part of the normal flow code (*). The example was really just an ineffective way of pointing out I know the ComponentClassResolver exists and I know it holds map of page names to page class names. The thing is,

Re: Best way to extend a component?

2010-05-11 Thread Thiago H. de Paula Figueiredo
On Tue, 11 May 2010 16:01:56 -0300, Andreas Bohnert wrote: Hi, Hi! 1.) Extend MySelect from Select I found no way to assign my model to the selects privat model. There is a setModel in Select but it seems to be there only for unit tests. Tapestry components weren't meant to be subclas

Re: Noob problem with Guessing Game tutorial

2010-05-11 Thread aibkwik
Thanks, guys. Still no joy - Here is the entire 'shootin match'... Here is the error I get when I click on the "start guessing" link... http://old.nabble.com/file/p28528400/Application%2BException.jpeg Here is the project file tree: http://old.nabble.com/file/p28528400/Java%2B-%2Btutorial1

Best way to extend a component?

2010-05-11 Thread Andreas Bohnert
Hi, I want to write my own 'select' component with a build-in model and additional parameters. I tried different ways to achieve this, but none of them worked out for me. Basically I tried: --- 1.) Extend MySelect from Select I found no way to assign my model to the selec

Re: [T5.1] Obtaining The Page Name In A MarkupRendererFilter

2010-05-11 Thread Nicolas Bouillon
Le 11/05/2010 18:48, Steve Eynon a écrit : Hello, Following a suggestion from a fellow T5 user (cheers Nicolas!) I've changed my page name injecting strategy. I now have a ComponentClassTransformWorker which adds a Mixin to every Page component. This Page Mixin (in the afterRender() method) then

Re: 5.2 xsd problem?

2010-05-11 Thread Pierce T. Wetter III
On May 11, 2010, at 10:47 AM, Pierce T. Wetter III wrote: > I'm getting a complaint about my p:else not being in a component after I > refactored some to pull my navigation menus from layout down into a menu > component. > > It works with this header: > > http://tapestry.apache.org/schema/

5.2 xsd problem?

2010-05-11 Thread Pierce T. Wetter III
I'm getting a complaint about my p:else not being in a component after I refactored some to pull my navigation menus from layout down into a menu component. It works with this header: http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"; xmlns:p="tapestry:parameter"> but not with t

Re: [t5] Contribute multiple translators for one type no longer supported

2010-05-11 Thread Howard Lewis Ship
Please read the documentation on TranslatorSource about how to accomplish what you want. On Tue, May 11, 2010 at 4:16 AM, Joost Schouten (ml) wrote: > Hi, > > I just updated to the latest snapshot of T5.2 and can no longer contribute > two translators for the same type [1]. I get an exception due

Re: [T5.1] Obtaining The Page Name In A MarkupRendererFilter

2010-05-11 Thread Steve Eynon
Hello, Following a suggestion from a fellow T5 user (cheers Nicolas!) I've changed my page name injecting strategy. I now have a ComponentClassTransformWorker which adds a Mixin to every Page component. This Page Mixin (in the afterRender() method) then injects the page name as a comment in the Do

Re: How to use a grid with some "null" cells

2010-05-11 Thread Pierce T. Wetter III
On May 11, 2010, at 5:59 AM, Claude Dubois wrote: > > You put me on the right way. > It still didn'twork using the tag, so I tried to add a . > > My tml looks like that : > > > > ${user.shop.shoCode} > > > > Using this method it works well. > > Thanks for your help

Re: Noob problem with Guessing Game tutorial

2010-05-11 Thread Steve Eynon
The XML namespace in your .tml files is fine. The templates have rarely changed but some new features were introduced from 5.0.x.x to 5.1.x.x. It's all backwards compatible though and mentioned here: http://tapestry.apache.org/tapestry5.1/guide/templates.html in Tapestry Namespace. Steve. On 1

Re: [T5]Inject a component not used in a page

2010-05-11 Thread Thomas Cucchietti
Ok, Thanks for the suggestions, I'll do that (layout.tml) ! 2010/5/11 Robert Zeigler > Alternatively, if different pages need different blocks, you can declare a > parameter to your layout of type "block": > > Layout.java: > @Parameter(requred=true) > @Property > private Block customBlock; > >

Re: [T5]Inject a component not used in a page

2010-05-11 Thread Robert Zeigler
Alternatively, if different pages need different blocks, you can declare a parameter to your layout of type "block": Layout.java: @Parameter(requred=true) @Property private Block customBlock; Layout.tml Page.tml: http://tapestry.apache.org/schema/tapestry_5_1_0.xsd " xmlns:p="tapestry:par

Re: Noob problem with Guessing Game tutorial

2010-05-11 Thread Sergey Didenko
Hi Phil, how did you setup your project? Try moving your .tml files into the same folder where the corresponding .java files are. Also make sure that first line of java files - "package org.apache.tapestry5.tutorial.pages" corresponds to their location - something/org/apache/tapestry5/tutorial/p

Re: [T5]Inject a component not used in a page

2010-05-11 Thread Thiago H. de Paula Figueiredo
On Tue, 11 May 2010 11:09:29 -0300, Thomas Cucchietti wrote: Hi Thiago, Hi! I can't declare it into my page as I'm using it in the Layout component and not in a page. In this case, you can declare the blocks in Layout itself. Take a look at http://tapestry.apache.org/tapestry5.1/cook

Re: Why can't I return a rendered block via JSON?

2010-05-11 Thread Chuck Kring
I wish it were so easy. BlockImpl toString() prints out useful information such as where the block was defined in the template but it doesn't render. The normal route is to use render() which requires a RenderQueue. At that point the were using internal APIs. Thanks for the suggestion. Chu

Re: [T5]Inject a component not used in a page

2010-05-11 Thread Thomas Cucchietti
Hi Thiago, I can't declare it into my page as I'm using it in the Layout component and not in a page. Here is the Layout.java : @Inject private ComponentSource componentSource; @Inject private ComponentResources componentResources; /** The page title, for the element and t

Re: [T5]Inject a component not used in a page

2010-05-11 Thread Thiago H. de Paula Figueiredo
On Tue, 11 May 2010 10:34:52 -0300, Thomas Cucchietti wrote: So, I have to create a page only for internal use in order to follow this philosophy. You don't need to create a page just for holding your component. Just create a Block inside your page and declare you component there. Then yo

Re: [T5]Inject a component not used in a page

2010-05-11 Thread Thomas Cucchietti
Hi Kristian, Thanks for you answer : it confirms what I understood. So, I have to create a page only for internal use in order to follow this philosophy. How can I prevent user to access this page ? Is it based on package name ? ("internal" ?) Should I use a service based on URL to block users at

Re: TSS add custom voter & securing non-tapestry methods

2010-05-11 Thread Alex Kotchnev
Nicolas, the article I had in mind is this : http://wiki.apache.org/tapestry/Tapestry5AcegiNoAnnotations It does talk about Acegi but most of things in there are still applicable. Regards, Alex K On Tue, May 11, 2010 at 7:25 AM, Nicolas Gillet - MARKET-IP < nicolas.gil...@market-ip.com> w

Re: How to use a grid with some "null" cells

2010-05-11 Thread Claude Dubois
You put me on the right way. It still didn'twork using the tag, so I tried to add a . My tml looks like that : ${user.shop.shoCode} Using this method it works well. Thanks for your help Joost Schouten (ml) wrote: > > Hi, > > What problem do you experience (except

Re: How to use a grid with some "null" cells

2010-05-11 Thread Thiago H. de Paula Figueiredo
On Tue, 11 May 2010 06:24:43 -0300, Claude Dubois wrote: Hi everybody, Hi! Does anyone know a solution to make possible to display a row even if one of its fields is null? This is strange, as Grid always create a table row for each object, regardless of its property values. -- Thia

Re: [T5]Inject a component not used in a page

2010-05-11 Thread Kristian Marinkovic
hi thomas, tapestry 5 follows the "static structure, dynamic behaviour" philoshophy. essentially this means that you cant use a component that is not declared anywhere. in your case i'd create a block with the component inside and display this block if necessary. please see the mailing list for

Re: Noob problem with Guessing Game tutorial

2010-05-11 Thread aibkwik
Thank you, Steve! Well that's somewhat disconcerting that the tutorial is wrong ouch. So I'm unclear on how to check which "package" my .tml files are in since none of the source files in the tutorial have a "package <>" statement in them. My two .class files are both in the same director

[T5]Inject a component not used in a page

2010-05-11 Thread Thomas Cucchietti
Hi everybody! I'm getting a silly problem while trying to get a component from the componentSource. For dynamic layout purposes, i'm trying to recover a component that is not used in any page but it seems impossible as the getComponent method of the componentSource requires a completeId in which

Re: How to use a grid with some "null" cells

2010-05-11 Thread Joost Schouten (ml)
Hi, What problem do you experience (exception/stacktrace)? You should just see an empty cell if your null value is of a type recognized by the BeanModel. You can override every cell by using this: display whatever you want eg: ${row.yourPropertyName} or ${computedValueInTheComponent}

RE: TSS add custom voter & securing non-tapestry methods

2010-05-11 Thread Nicolas Gillet - MARKET-IP
Thank you Alex for your answer. I am using Tapestry 5.1.0.5. So about beans I think they should be accessible too but and another bean (ProviderManager) declared in the same SecurityModule class actually is used inside XML. I don’t understand why the AccessDecisionManager can't ... About spring

[t5] Contribute multiple translators for one type no longer supported

2010-05-11 Thread Joost Schouten (ml)
Hi, I just updated to the latest snapshot of T5.2 and can no longer contribute two translators for the same type [1]. I get an exception due to the fact that the TranslatorSource now only accepts a MappedConfiguration which disallows two contributions on the same type [2]. Two translators on

Re: TSS add custom voter & securing non-tapestry methods

2010-05-11 Thread Alex Kotchnev
Nicolas, which T5 version are you using? AFAIK, w/ T5.1 and later your T5 services should indeed be accessible as Spring beans. I think before 5.1, they aren't. Regarding T-S-S : it's set up to handle Tapestry component security (that is, securing whole components or methods within the compo

Re: Why can't I return a rendered block via JSON?

2010-05-11 Thread Alex Kotchnev
Chuck, I think you already know more than I do on the subject, but here's what came to mind : 1. The documentation of Block ( http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/Block.html) indicates that they should be easily convertible to Strings (e.g. via BlockImpl.toString()

Re: How tell T5 to return HTML page (not JSON) on AJAX call

2010-05-11 Thread Radek Terber
No, the grid is not zone-enabled. When I tried to use zone-enabled grid in this environment, the grid did not refresh at all. Dne 11.5.2010 9:55, Inge Solvoll napsal(a): I'm guessing that the grid links are zone-enabled, so clicking them triggers AJAX calls rather than direct links. On Tue, Ma

GAE 1.3.3.1 dev server & T5.2 : new exception on startup

2010-05-11 Thread Alex Kotchnev
I just picked up the latest SDK (1.3.3.1, I figured I upgraded most of my platform to latest 5.2 Spring & Spring Security 3.0.2.RELEASE) and tried to run my app on the dev server. On startup, when the applicaiton is running my initialization routine, I get the error message below. I get the same

How to use a grid with some "null" cells

2010-05-11 Thread Claude Dubois
Hi everybody, I am developping an application on Tapestry 5 with JPA/Hibernate persistence. I am using the grid component, which is very powerful, but I encounter a problem while trying to display some data whose one field contains a "null" value. Does anyone know a solution to make possible to

Tapestry 4 contrib table header issue

2010-05-11 Thread UABajwah
Hello, I am using tapestry 4 contrib table. I want to align its column header text to right. i define a css class but tapestry overrides it. i tried columnsClass attribute but it alings all the headers. Anyone knows the solution please help. Thanks, UABajwah -- View this message in context:

Re: How tell T5 to return HTML page (not JSON) on AJAX call

2010-05-11 Thread Inge Solvoll
I'm guessing that the grid links are zone-enabled, so clicking them triggers AJAX calls rather than direct links. On Tue, May 11, 2010 at 9:17 AM, Radek Terber wrote: > The behavoior of combination of JQ tabs and T5 is quite strange. Tabs are > loaded dynamically using it's links like this: > >

RE: TSS add custom voter & securing non-tapestry methods

2010-05-11 Thread Nicolas Gillet - MARKET-IP
Hello, Thank you for your answer Jonathan. I have never tried the instance-based security so I don't know which solution would suit the best. BTW my investigation lead me to wonder if the way I enabled the security on method was right. I tried to use a new voter of mine to secure a page and this

Re: How tell T5 to return HTML page (not JSON) on AJAX call

2010-05-11 Thread Radek Terber
The behavoior of combination of JQ tabs and T5 is quite strange. Tabs are loaded dynamically using it's links like this: t:context="literal:actual">Aktuálne( Archív ...etc... In case the tab content is loaded firt time, all is OK, tab content is loaded sucesfully, T5 server returns con

Re: Noob problem with Guessing Game tutorial

2010-05-11 Thread Steve Eynon
1. It seems the tutorial is out of date, the class should be called Index.java. ("Start" is a hangover from older days). 2. Make sure your compiled class file and your .tml file are in the same package on the classpath. It's how Tapestry matches the two up (same name in the same package). And as t