Re: Default Ordering for BeanEditForm

2011-02-21 Thread Mark
Josh, But it is documented--at least for normal beans. The notes section paragraph of the BeanEditForm documentation discusses the reorder parameter and then says: >You can accomplish the same thing by changing the order of the getter methods >in the bean class. The default order for properties

Re: Default Ordering for BeanEditForm

2011-02-21 Thread Mark
This wasn't using the @Property annotations. I was using getters and setters. The ordering isn't working when using a bean that is injected either. I'm not sure if this is a bug or if it is just something where it is impossible to get the information for ordering. Mark On Mon, Feb 21, 2011 at

Re: Enum or Drop Down

2011-02-21 Thread Taha Hafeez
To add to Thiago's golden words, you can have a simple ListValueEncoder for using index/toString() like this class ListValueEncoder(){ final private List values; public ListValueEncoder(List values){ this.values = values; } public String toClient(T value){ return values.i

Re: RequestFilter not called (sometimes)

2011-02-21 Thread Donny Nadolny
Ah that's why, thanks Josh. I didn't specify any order, so some of the time my filter (and the TimingFilter) would be added before the StaticFilesFilter in which case the timing filter will print out the time, and sometimes it will be placed after, so the static files filter handles the request fir

Re: Global Configuration/Logging/Properties files locations

2011-02-21 Thread Lenny Primak
So basically in my glassfish deployment, there is nothing that needs to be put into resources/ folder, as far as tapestry configuration is concerned, correct? And the logging is controlled through glassfish itself, not through a file in this folder. Thanks for your answer/confirmation On Feb 21,

Re: Global Configuration/Logging/Properties files locations

2011-02-21 Thread Bob Harner
Just a note: http://tapestry.apache.org/localization.html is the newer version of that page. On Mon, Feb 21, 2011 at 3:00 PM, Josh Canfield wrote: >> That's the question, what goes into resources (globally?) >> i.e. resources/app.properties, etc. >> Are there any other properties that goes into r

Re: Global Configuration/Logging/Properties files locations

2011-02-21 Thread Josh Canfield
> That's the question, what goes into resources (globally?) > i.e. resources/app.properties, etc. > Are there any other properties that goes into resources/ root folder? > And how does log4j.properties work in case of glassfish then/? log4j.properties is for log4j and is only included by the tapes

Re: Global Configuration/Logging/Properties files locations

2011-02-21 Thread Lenny Primak
That's the question, what goes into resources (globally?) i.e. resources/app.properties, etc. Are there any other properties that goes into resources/ root folder? And how does log4j.properties work in case of glassfish then/? On Feb 21, 2011, at 2:19 PM, Thiago H. de Paula Figueiredo wrote: > On

Re: Global Configuration/Logging/Properties files locations

2011-02-21 Thread Thiago H. de Paula Figueiredo
On Mon, 21 Feb 2011 16:05:29 -0300, Lenny Primak wrote: Hi guys, So far, I counted two places to put global properties in tapestry: - WEB-INF/app.properties - resources/log4j.properties What is the proper place to put global properties, WEB-INF or resources? What are these properties? If t

Re: Default Ordering for BeanEditForm

2011-02-21 Thread Josh Canfield
> Acutally, Tapestry 5.2 uses Javassist to get at attribute information > for the methods, including the line numbers where available. The getMethods in CtClass is not documented as being ordered, so I peeked at the code and unless I'm looking at the wrong spot it comes from an un-ordered HashMap.

Global Configuration/Logging/Properties files locations

2011-02-21 Thread Lenny Primak
Hi guys, So far, I counted two places to put global properties in tapestry: - WEB-INF/app.properties - resources/log4j.properties What is the proper place to put global properties, WEB-INF or resources? Also, I am deploying on glassfish and I don't think log4j.properties actually works for this.

Re: [T5] Tapestry and Servlet 3.0 web fragments (zero configuration)

2011-02-21 Thread Howard Lewis Ship
That's something that's much more interesting for me ... long running processes that can push updates (such as a progress bar) to a client. On Mon, Feb 21, 2011 at 10:38 AM, Josh Canfield wrote: >> Is Tapestry going to support the Servlet 3.0 and it's specification for web >> fragments? I mean, l

Re: [T5] Tapestry and Servlet 3.0 web fragments (zero configuration)

2011-02-21 Thread Josh Canfield
> Is Tapestry going to support the Servlet 3.0 and it's specification for web > fragments? I mean, load itself without the need for us to speficy it's > filter in the app's web.xml? The other thing that I'd love to get into Tapestry is the support for long running requests using request.startAsync

Re: Tapestry 5 - cache issue when accessed via proxy

2011-02-21 Thread Josh Canfield
> Considering the option you mentioned, am guessing if we can add some dynamic > parameter in url which changes for each request which should resolve the > problem. You should consider putting your search terms in the url either as a path parameter or a query parameter so that you can take advanta

Re: RequestFilter not called (sometimes)

2011-02-21 Thread Josh Canfield
> I've made a RequestFilter that's only loaded in development mode, but the > problem is it isn't always loaded properly - when I start tapestry (maven > jetty:run) about 1/3rd of the time it works, but the rest of the time it > doesn't. Where in the list are you putting your request filter? Reque

Re: Default Ordering for BeanEditForm

2011-02-21 Thread Howard Lewis Ship
Acutally, Tapestry 5.2 uses Javassist to get at attribute information for the methods, including the line numbers where available. However, I'm honestly not sure what happens in a transformed component class. Certainly, if the @Property annotation is used, there is no line number information to be

Re: Default Ordering for BeanEditForm

2011-02-21 Thread Josh Canfield
http://download.oracle.com/javase/6/docs/api/java/lang/Class.html#getDeclaredMethods() "The elements in the array returned are not sorted and are not in any particular order." Java's reflection mechanism doesn't guarantee the order of methods returned so it would be hard for Tapestry to do much a

Re: Enum or Drop Down

2011-02-21 Thread Thiago H. de Paula Figueiredo
On Mon, 21 Feb 2011 14:05:25 -0300, robnangle wrote: I am not using tapestry-hibernate, is there any examples out there because the few I have came across seem to be very complex? There are some examples out there that I consider the wrong approach, specifically implementing both ValueEnco

Re: [T5] Tapestry and Servlet 3.0 web fragments (zero configuration)

2011-02-21 Thread 9902468
Hi, Tomcat 7, Jetty 8, Glassfish 3.0.1 + 3.1, JBOSS AS 6.0 support 3.0 spec. (Just a list from my memory, if I made a mistake please correct me.) If you know more, please add to the list, I really would like to know. :) - Ville -- View this message in context: http://tapestry.1045711.n5.nabbl

Re: Enum or Drop Down

2011-02-21 Thread robnangle
I am not using tapestry-hibernate, is there any examples out there because the few I have came across seem to be very complex? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Enum-or-Drop-Down-tp3394312p3394431.html Sent from the Tapestry - User mailing list archive at Nab

Re: Enum or Drop Down

2011-02-21 Thread Thiago H. de Paula Figueiredo
On Mon, 21 Feb 2011 13:52:46 -0300, Richard Hill wrote: To be honest I never understood value encoder and don't use it. Recommendation: learn it and use it. In software development, ignorance is not bliss. :) When rendering a page all you need are a) the list of options and b) whic

Re: [T5] Tapestry and Servlet 3.0 web fragments (zero configuration)

2011-02-21 Thread Thiago H. de Paula Figueiredo
On Mon, 21 Feb 2011 12:51:31 -0300, Everton Agner wrote: Hey! Hi! Is Tapestry going to support the Servlet 3.0 and it's specification for web fragments? I mean, load itself without the need for us to speficy it's filter in the app's web.xml? I don't know, but there's an issue to be

Re: Enum or Drop Down

2011-02-21 Thread Richard Hill
know how to do that. Anyway, writing your own ValueEncoder is easy. > * What objects will be used as options? There's no way for Tapestry to do > that automatically in a reasonable way even when using tapestry-hibernate. > And SelectModelFactory already does the heavy lifting for you. > To b

Re: Enum or Drop Down

2011-02-21 Thread Thiago H. de Paula Figueiredo
On Mon, 21 Feb 2011 13:36:55 -0300, Richard Hill wrote: I always thought it would be nice if tap could generate a drop down given just a list - it could take the object id and toString() as values for example. There are two problems that you need to solve when writing a : * How do you map

Re: Enum or Drop Down

2011-02-21 Thread robnangle
Richard Hill-7 wrote: > > > I always thought it would be nice if tap could generate a drop down > given just a list - it could take the object id and toString() as values > for example. But sadly this does not exist so you have to build a model, > which as Stefan says is actually pretty simple.

Re: Enum or Drop Down

2011-02-21 Thread Richard Hill
I always thought it would be nice if tap could generate a drop down given just a list - it could take the object id and toString() as values for example. But sadly this does not exist so you have to build a model, which as Stefan says is actually pretty simple. And in fact being forced to supply y

Re: Enum or Drop Down

2011-02-21 Thread Stefan Schuetz
No, because tap needs to know how to remap the values on a form submit. So you need to provide a select model. But it's really easy stuff! Take a look: http://jumpstart.doublenegative.com.au/jumpstart/ - Stefan Am 21.02.2011 um 17:26 schrieb robnangle: > > So there is no way of doing it like

Re: Enum or Drop Down

2011-02-21 Thread robnangle
So there is no way of doing it like a grid: //players being a list populated from a database.. You have to create a model ect... -- View this message in context: http://tapestry.1045711.n5.nabble.com/Enum-or-Drop-Down-tp3394312p3394364.html Sent from the Tapestry - User mailing list archive

Re: Exciting opportunity in Berlin

2011-02-21 Thread Gutemberg Albuquerque Da Silva
hi, I'd like this position. 2011/2/21 Stefan Schuetz > Hi guys, > > are here any tapestry pros which will mind about to take a really exciting > offer as a tapestry developer in a permanent position here in > Berlin/Germany? > > Please feel free to contact me! > > > - Stefan > > > > -- *Gutem

Re: Enum or Drop Down

2011-02-21 Thread Thiago H. de Paula Figueiredo
On Mon, 21 Feb 2011 12:55:59 -0300, Richard Hill wrote: You want to take a look at the t:select component. It takes a select model but tap can provide one automatically for an enum Plus see the SelectModelFactory interface to generate the select model easily. -- Thiago H. de Paula Figue

Re: Enum or Drop Down

2011-02-21 Thread Richard Hill
You want to take a look at the t:select component. It takes a select model but tap can provide one automatically for an enum On Mon, 2011-02-21 at 07:45 -0800, robnangle wrote: > Hi all, > Is it possible to populate an enum class with data from a database or what > component acts like a drop dow

[T5] Tapestry and Servlet 3.0 web fragments (zero configuration)

2011-02-21 Thread Everton Agner
Hey! Is Tapestry going to support the Servlet 3.0 and it's specification for web fragments? I mean, load itself without the need for us to speficy it's filter in the app's web.xml? I'm anxious to see it trully "zero configuration"! I guess this is the only thing left for it, even though it's far

Re: Tapestry app using JDBC

2011-02-21 Thread robnangle
Cheers got that sorted.. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-app-using-JDBC-tp3390993p3394313.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe,

Enum or Drop Down

2011-02-21 Thread robnangle
Hi all, Is it possible to populate an enum class with data from a database or what component acts like a drop down box in tapestry? Cheers -- View this message in context: http://tapestry.1045711.n5.nabble.com/Enum-or-Drop-Down-tp3394312p3394312.html Sent from the Tapestry - User mailing list a

Exciting opportunity in Berlin

2011-02-21 Thread Stefan Schuetz
Hi guys, are here any tapestry pros which will mind about to take a really exciting offer as a tapestry developer in a permanent position here in Berlin/Germany? Please feel free to contact me! - Stefan smime.p7s Description: S/MIME cryptographic signature

Re: 10 Minute Web Application Demo

2011-02-21 Thread Mark
Thanks, and I appreciate your suggestions. There is probably a big difference between the pacing necessary to actually teach Tapestry (what this mailing list audience may be more interested in) and the pacing to get people interested in learning Tapestry (what this video was really designed for).

Re: Tapestry 5.1.0.5 and HTML 5 Doctype

2011-02-21 Thread Bob Harner
Correction, the URL should be: http://tapestry.apache.org/component-templates.html (once the change propagates in an hour or two, and the apache site comes back up) On Mon, Feb 21, 2011 at 9:21 AM, Bob Harner wrote: > By the way, I have added Nille Hammer's work-around (for emitting the > HTML5 d

Re: Tapestry 5.1.0.5 and HTML 5 Doctype

2011-02-21 Thread Bob Harner
By the way, I have added Nille Hammer's work-around (for emitting the HTML5 doctype) to the documentation, at https://cwiki.apache.org/confluence/display/TAPESTRY/Component+Templates On Sun, Feb 20, 2011 at 3:13 PM, Christian Riedel wrote: > Hi François, > > the central template parser class is

Re: Tapestry 5 - cache issue when accessed via proxy

2011-02-21 Thread Pablo dos Reis
If your problem occurs in multiple pages I recommend put the cache configuration in your AppModule. public RequestFilter cacheFilter() { return new RequestFilter() { public boolean service(Request request, Response response, RequestHandler handler) throws I

Re: Access displayed rows of grid component in page

2011-02-21 Thread Joost Schouten (ml)
I have a few places where I do this sort of thing. Preferable I wrap the original value obtained from my DAO in the GridDataSource right after obtaining it. Where the wrapper does the further initilization required. If that is not an option, you can always do the wrapping in @SetupRender and p

Java based spring configuration

2011-02-21 Thread Bård Magnus Kvalheim
Hi all, Versions Tapestry: 5.2.4 Spring: 3.1.0.M1 We're using java based container configuration with spring - so no xml files are used for configuring beanfactories. With tapestry-spring this is currently unsupported as TapestryApplicationContext extends from XmlWebApplicationContext. As a wor

Re: Tapestry app using JDBC

2011-02-21 Thread Richard Hill
Yes, sorry, was thinking of @Persists there. SSO's are keyed by class: stateManager.get(User.class) so for SSOs you can only have one of each class type. On Mon, 2011-02-21 at 08:33 -0300, Thiago H. de Paula Figueiredo wrote: > On Mon, 21 Feb 2011 07:40:42 -0300, Richard Hill > wrote: > >

Re: Tapestry app using JDBC

2011-02-21 Thread Thiago H. de Paula Figueiredo
On Mon, 21 Feb 2011 07:40:42 -0300, Richard Hill wrote: This just puts the retrieved user object into the session as an SSO. This means it is accessible from all pages/components, unlike say @Persist'd quantities which are scoped to individual pages/components. You can stick whatever you like

Re: Tapestry app using JDBC

2011-02-21 Thread Richard Hill
On Mon, 2011-02-21 at 03:07 -0800, robnangle wrote: > What if I have created the Login as a form component? Sure, that's fine. It'll work with a page or component - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org F

Re: Tapestry app using JDBC

2011-02-21 Thread robnangle
What if I have created the Login as a form component? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-app-using-JDBC-tp3390993p3393999.html Sent from the Tapestry - User mailing list archive at Nabble.com. -

Re: Tapestry app using JDBC

2011-02-21 Thread Richard Hill
Assuming Login is a tapestry page then yes, exactly. (although you can skip the last line: User user = stateManager.get(User.class); as user is already defined here.) On Mon, 2011-02-21 at 02:57 -0800, robnangle wrote: > So I have a 'User' entity class and then my Login class. So in my login I

Re: Tapestry app using JDBC

2011-02-21 Thread robnangle
So I have a 'User' entity class and then my Login class. So in my login I should have: private String username; private String password; @Inject private ApplicationStateManager stateManager; private Object userDao; User

Re: Access displayed rows of grid component in page

2011-02-21 Thread Timo Westkämper
Hi. I have my own GridDataSource for that, but I want to extend the data fetched by the GridDataSource. I can see the following options for that. * lazily init reference data by using the objects return from dataSource.getRowValue(0) to dataSource.getRowValue(grid.getRowsPerPage() -1) * a

Re: Tapestry app using JDBC

2011-02-21 Thread Richard Hill
On Mon, 2011-02-21 at 02:27 -0800, robnangle wrote: > User user = userDao.get(loginName); > > The above line, is the user entity class? And what is the userDao doing? User could be an entity, depends on whether you are using an ORM or not. Generally though your DAO is going to return an object of

Re: Tapestry app using JDBC

2011-02-21 Thread robnangle
User user = userDao.get(loginName); The above line, is the user entity class? And what is the userDao doing? stateManager.set(User.class, user); This is setting the user as the current state? User user = stateManager.get(User.class); And the above is just returning the current user? -- Vie

Re: [Bulk] Re: 10 Minute Web Application Demo

2011-02-21 Thread onj888-tapestry
good point 於 2011/2/18 4:06, Howard Lewis Ship 提到: > I spend a lot of time when teaching Tapestry getting people to do One > Small Step at a time. Everyone feels the need to jump from a blank > page to the final solution in one go, and that's really hard. I do a > lot of "placeholder goes here",

Re: Access displayed rows of grid component in page

2011-02-21 Thread Joost Schouten (ml)
Hi, I assume that I can use Grid.getCurrentPage() and Grid.getRowsPerPage() for that. Correct, but even better would be to implement your own GridDataSource since then you can do all the data fetching and preperations in one go. Your own GridDataSource forms the source @Parameter for the Gri

Access displayed rows of grid component in page

2011-02-21 Thread Timo Westkämper
Hi. Is there a standard pattern in Tapestry to access the displayed rows of a grid component in a Tapestry page? My use case is that I want to preload reference data for the displayed rows in the page. I don't want to load the reference data per row, as this is much slower. I assume that I

Re: How to pass parameters from a Page to another Page in java code?

2011-02-21 Thread leon
It works! Thanks a lot! On Mon, Feb 21, 2011 at 3:18 PM, Taha Hafeez wrote: > On Mon, Feb 21, 2011 at 9:50 AM, leon wrote: > > > Hi All, > > > > Hi > > > > I know that we can pass a parameter through context attribute of tag in > > template, but how to achieve it in java code? like this: > > > >