hmac sample

2012-10-12 Thread angelochen
Hi, got this error when upgrading to 5.3.6, any sample to set this? ClientDataEncoder The symbol 'tapestry.hmac-passphrase' has not been configured. Thanks, -- View this message in context: http://tapestry.1045711.n5.nabble.com/hmac-sample-tp5716873.html Sent from the Tapestry - User mailin

Re: Generating dynamic Hypertext from a component

2012-10-12 Thread Josh Canfield
If you need to create a link, take a look at PageRenderLinkSource. Then create your component so that it generates the html using the MarkupWriter. Josh On Fri, Oct 12, 2012 at 8:58 AM, Peter Wendorff wrote: > Hi. > I would like to have a component that is able to create arbitrary > hypertext,

RE: strange NPE, really making me nervous

2012-10-12 Thread Ken in Nashua
Thanks Cezary... all good points to note. Sometimes I just like blabbin... Have a great weekend !

Re: Tynamo tapestry-security Instance-Level Access Control?

2012-10-12 Thread Dmitry Gusev
Thanks, Kalle! I've attached another patch to the same issue that does the same thing for component method interceptors. FYI: Here's how my implementation of ILAC looks like. I implemented abstraction layer of permission controllers that allows: - automatically pick right controller by permis

Re: strange NPE, really making me nervous

2012-10-12 Thread Cezary Biernacki
Java's garbage collector never sets any normal reference to null. It is a fundamental property of JVM. This sentence 'in this case the GC was a little late in erasing what was released across the request cycle' is not true. Your problem was not related to the garbage collector at all. 'colle

Grid: 'lean' parameter not bound to GridColumns?

2012-10-12 Thread Pavel Vodenski
Hi Tapestry Users, Does GridColumns respect the 'lean' parameter? In 'lean' mode, a Grid should not add property ids as CSS classes on cells. For example:   Should render a grid wherein the 'someProperty' cells, including the column header, do *not *have the CSS cla

RE: strange NPE, really making me nervous

2012-10-12 Thread Ken in Nashua
yeah... the pointer to the collection wasnt null... it looked like a legitimate allocated collection with a hiberate entity in it. But as soon as i attempted to reference the collection in the event handler... boom... NPE a numega type bounds checker would flush something like this out by flood

RE: strange NPE, really making me nervous

2012-10-12 Thread bhorvat
hm...I am not sure what you are looking at with the debug, but the pointer to the collection should be null regardless of the objects actual state (whether or not it has been garbage collected). It is as everyone has described to you, once page is rendered everything is set to null and when you h

RE: strange NPE, really making me nervous

2012-10-12 Thread Ken in Nashua
Are you saying... that... I maintain a collection on a single initial rendering... I get away with it by loading my collection in setuprender... this works fine and I can see my hibernate entity on my display after the gallery is rendered. On a subsequent event (lastPage)... your claim is that

RE: strange NPE, really making me nervous

2012-10-12 Thread Lance Java
As Cezary said, there are two requests involved in this exception. 1. Request to draw the page initially 2. Request to fire the "lastPage" event Tapestry does NOT maintain state between Request 1 and Request 2 (unless you explicitly tell it to via @Persist). In this case, you should not use @Pers

Generating dynamic Hypertext from a component

2012-10-12 Thread Peter Wendorff
Hi. I would like to have a component that is able to create arbitrary hypertext, and I'm not sure, if there's a better way to do that than I have in mind currently. My database contains spatial geo data from the OpenStreetMap project, and I would like to generate texts as they probably could

Re: Tapestry Problem on Google App Engine in Development

2012-10-12 Thread Lance Java
response.containsHeader("Content-Encoding") ;) -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Problem-on-Google-App-Engine-in-Development-tp5716763p5716859.html Sent from the Tapestry - User mailing list archive at Nabble.com. --

Re: Tapestry Problem on Google App Engine in Development

2012-10-12 Thread Dan Cyr
That also is Servlet spec 3.0... On Fri, Oct 12, 2012 at 11:27 AM, Lance Java wrote: > response.getHeader("Content-Encoding") > > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Tapestry-Problem-on-Google-App-Engine-in-Development-tp5716763p5716857.html > Sent from

Re: Tapestry Problem on Google App Engine in Development

2012-10-12 Thread Lance Java
response.getHeader("Content-Encoding") -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Problem-on-Google-App-Engine-in-Development-tp5716763p5716857.html Sent from the Tapestry - User mailing list archive at Nabble.com. --

Re: Tapestry Problem on Google App Engine in Development

2012-10-12 Thread Dan Cyr
Hmm..Where is my mind, of course.. But it seems response.getHeaderNames() is in Servlet Spec 3.0.Seems like GAE gwt-2.4.0/gwt-user.jar is 1.5 and doesn't have that call available? Another way to check? Anyway, I'm convinced it's a GAE 1.7.1 -> 1.7.2 upgrade problemPerhaps GAE is not worth

RE: strange NPE, really making me nervous

2012-10-12 Thread Ken in Nashua
if it means anything here is the last stack trace... but it looks the same 127.0.0.1 - - [12/Oct/2012:15:17:56 +] "GET /tynamo/blob/adminlayout/1/header HTTP/1.1" 200 223753 "http://localhost:8080/Home"; "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1" [INFO]

RE: strange NPE, really making me nervous

2012-10-12 Thread Ken in Nashua
Well i got rid of Integer usage with this variable itemsPerPage within the page and component as well as any initializations and modeled initialization in the setuprender Gallery.JAVA @SetupRender public void setupRender() { itemsPerPage = 50; try {

Re: strange NPE, really making me nervous

2012-10-12 Thread Cezary Biernacki
It does not matter that you it is loaded in setupRender(). Rending events happen only during page rendering. Your exception happens during a separate HTTP request for event handling (see request URL in your logs). Such events do not trigger page rendering in Tapestry 5. So setupRender() is not exec

RE: strange NPE, really making me nervous

2012-10-12 Thread Ken in Nashua
Guys, I appreciate the help... is it possible collection is getting clobbered in between somewhere the event ? I mean I walked thru debugger and logged a statement too and saw with my eyes that collection is loaded and allocated and established in @SetupRender public void setupRender()

Re: strange NPE, really making me nervous

2012-10-12 Thread Cezary Biernacki
On Fri, Oct 12, 2012 at 4:01 PM, Ken in Nashua wrote: > > Thanks Cezary, > > collection is an allocated collection housing a single hibernate entity. > my login page comes up > i get authenticated > it launches the Home.ml and Layout.tml > and my Gallery.tml gets rendered for the very first time

RE: strange NPE, really making me nervous

2012-10-12 Thread Lance Java
NB. When you fire an event on a component, the component rendering lifecycle is NOT fired. Anything configured in setupRender() and beginRender() etc will be null (unless using @Persist). Only your @Parameter values will be populated. You may need to have a common method that you call in setupRende

RE: strange NPE, really making me nervous

2012-10-12 Thread Ken in Nashua
Thanks Cezary, collection is an allocated collection housing a single hibernate entity. my login page comes up i get authenticated it launches the Home.ml and Layout.tml and my Gallery.tml gets rendered for the very first time I can see the hibernate entity on the screen... the photo is rendered

Re: strange NPE, really making me nervous

2012-10-12 Thread Cezary Biernacki
Ah, OK. Missed that. However by judging source code from other emails, it is clear that @Parameter for itemsPerPage was used in 'Galery' component, not on Home.java. But I guess it is to be confused by incomplete examples. Best regards, Cezary On Fri, Oct 12, 2012 at 2:42 PM, Robert Zeigler wrot

Re: strange NPE, really making me nervous

2012-10-12 Thread Robert Zeigler
On Oct 12, 2012, at 10/126:33 AM , Cezary Biernacki wrote: > On Fri, Oct 12, 2012 at 6:29 AM, Robert Zeigler > wrote: > >> Since itemsPerPage is a property of a page, the @Parameter bit won't work. >> > > That is not true. @Property just adds get and setter, and @Parameter can be > a property.

Re: strange NPE, really making me nervous

2012-10-12 Thread Cezary Biernacki
Hi, Have you really confirmed that collection is not null? E.g. by actually debugging that code or putting a logging statement? I strongly believe it is null, because you set it only on SetupRender event, and rendering events when page is not rendered. Cezary

RE: Tapestry & hibernate session - without tapestry-hibernate module

2012-10-12 Thread Wechsung, Wulf
> Mr. Wulf (shit this sounds cool!) :) Well, the available T5 session scopes are singleton and per-thread. Singleton means that the service will be built only once and then shared for all threads and therefore requests. Per-thread means that the service will be built for every single request.

RE: Tapestry & hibernate session - without tapestry-hibernate module

2012-10-12 Thread esper
Mr. Wulf (shit this sounds cool!) i didn't even know this could be done! but there is a questions that comes to mind: can injected objects be built on demand (runtime) or is it only once per application session? once per thread basically. you see, there is a reason why I decided to remove tapestr

Re: strange NPE, really making me nervous

2012-10-12 Thread Cezary Biernacki
On Fri, Oct 12, 2012 at 6:29 AM, Robert Zeigler wrote: > Since itemsPerPage is a property of a page, the @Parameter bit won't work. > That is not true. @Property just adds get and setter, and @Parameter can be a property. Tapestry standard components often have parameters that are also propertie

RE: Tapestry & hibernate session - without tapestry-hibernate module

2012-10-12 Thread Wechsung, Wulf
Hi, The awesome thing is that everything in Tapestry can be a service! All you need is a service builder method and the @Inject annotation in your Services, Pages and Components. So for a hibernate session you could (not saying this is a good solution, but it's a start) a service builder meth

Re: Tapestry & hibernate session - without tapestry-hibernate module

2012-10-12 Thread Lance Java
https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=blob;f=tapestry-hibernate-core/src/main/java/org/apache/tapestry5/hibernate/HibernateCoreModule.java -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-hibernate-session-without-tapestry-hibernate-module-tp5

Re: Tapestry & hibernate session - without tapestry-hibernate module

2012-10-12 Thread Lance Java
Download the source code for tapestry-hibernate and take a look at how it works. The session will end up being a proxy to a per-thread value. If you want two different db connections, you might want to consider giving each session a marker annotation to differentiate them. -- View this message i

Re: Tapestry & hibernate session - without tapestry-hibernate module

2012-10-12 Thread esper
One possible solution would be to create a HibernateUtils class for example to hold a session object. I could then persist that object on application state lavel like this: class HibernateUtils { ... @Persist(PersistenceConstants.SESSION) private Session session = ... ... } is this a way to go? i

Tapestry & hibernate session - without tapestry-hibernate module

2012-10-12 Thread esper
Hi good people, i'm trying to get tapestry working with pure hibernate (no tapestry-hibernate module involved). With tapestry-hibernate you just inject a session into your components but how does it work without the module? Where do I initialize my session object? I don't want to do this heavy ope

Re: Gallery for each article using hibernate

2012-10-12 Thread Lance Java
Rather than tying yourself to hibernate, your gallery component should accept a parameter of type AssetProvider (or similar name) public interface AssetProvider { public List getAssets(int startIndex, int maxResults); public int getAssetCount(); } I'd probably wrap the component in a zone a

Re: Tynamo tapestry-security Instance-Level Access Control?

2012-10-12 Thread Kalle Korhonen
Applied, excellent patch thanks! Kalle On Thu, Oct 11, 2012 at 3:35 PM, Dmitry Gusev wrote: > Done: > > http://jira.codehaus.org/browse/TYNAMO-183 > > > On Fri, Oct 12, 2012 at 1:46 AM, Dmitry Gusev wrote: > >> Using @Core annotation helped: >> >> @Match("*") >> >> @Order("before:*") >> >> publ

Re: Tapestry Problem on Google App Engine in Development

2012-10-12 Thread Lance Java
> logger.error(name + " " + request.getHeader(name)); I meant you to log the response headers, not the request headers. This way we can check if it's tapestry's fault for not including the header or GAE's. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Proble