Re: Preventing URL hacking in tapestry 3.0.2

2005-12-18 Thread Paul Cantrell
What mechanism are you using to ensure that the user is logged in when the page is requested? It doesn't magically happen by itself; you need to put a check somewhere in the page. You might put it in your listener method, or you might implement PageAttachListener or some such In any c

Preventing URL hacking in tapestry 3.0.2

2005-12-18 Thread Craig Turner
Within my application I have used DirectLinks in several places. The links appear like this: http://localhost:8080/admin/app?service=direct/1/Situation/bookingById0&sp=480 The system is one where users are required to log in and I have a simple login page. Unfortunately, it it is currently po

Re: Slightly OT - Hibernate Lazy Loading with Spring and Tapestry

2005-12-18 Thread Leonardo Quijano Vincenzi
Cosmin, can you post the article URL again? I think it got garbled while posting: http://www.jroller.com/comments/kbau...ation_with_dao -- Ing. Leonardo Quijano Vincenzi DTQ Software Cosmin Bucur wrote: I've also posted this on the spring forum , as I think it is sort of a mixed problem . I

Re: Slightly OT - Hibernate Lazy Loading with Spring and Tapestry

2005-12-18 Thread Paul Cantrell
open and close the Hibernate session using a servlet filter, keep the session on a ThreadLocal while it's open, and never keep persistent objects in the session (keep their keys instead). Spring already supply a suitable filter that does this, org.springframework.orm.hibernate3.support.OpenSe

Re: Slightly OT - Hibernate Lazy Loading with Spring and Tapestry

2005-12-18 Thread Leonardo Quijano Vincenzi
I don't think storing only primary keys and reloading the object from the database is always the best option: 1) If you need to take a persistent object from a DB and edit it in a series of "wizard" pages, you actually need to keep the modified object state in the session. The most direct appr

Re: Slightly OT - Hibernate Lazy Loading with Spring and Tapestry

2005-12-18 Thread Scott Russell
On Mon 19 December 2005 13:19, Cosmin Bucur wrote: > > It's starting to sound like shaky ground , and problems if i use the > wrong aproach . So basically one approach coculd give me scalability > issues in terms of mixing session data , and the other one is resource > wastefull having to open and

Re: Slightly OT - Hibernate Lazy Loading with Spring and Tapestry

2005-12-18 Thread Cosmin Bucur
Thanks guys ... I'll take some time trying to wrap my head properly arround this and get back to you with questions or success stories . It's starting to sound like shaky ground , and problems if i use the wrong aproach . So basically one approach coculd give me scalability issues in terms of mix

Re: Slightly OT - Hibernate Lazy Loading with Spring and Tapestry

2005-12-18 Thread Scott Russell
On Mon 19 December 2005 12:56, Paul Cantrell wrote: > This has come up on the Tapestry list before. A less radical and > perhaps less convoluted solution -- if your application can handle a > one-db-session-per-request model, which is not true for everyone -- > is to open and close the Hibernate se

Re: Slightly OT - Hibernate Lazy Loading with Spring and Tapestry

2005-12-18 Thread Scott Russell
On Mon 19 December 2005 12:57, Cosmin Bucur wrote: > Hi , > I'm getting most of this , allthogh I've only used hivemind to setup > spring injection , and I didn't get most of what I was dooing but > there was a good example in the Wiki which worked like a charm . > > I'll have to try it out but one

Re: Slightly OT - Hibernate Lazy Loading with Spring and Tapestry

2005-12-18 Thread Cosmin Bucur
Hi , I'm getting most of this , allthogh I've only used hivemind to setup spring injection , and I didn't get most of what I was dooing but there was a good example in the Wiki which worked like a charm . I'll have to try it out but one question I have so far is : what spring integration jar ? Lik

Re: Slightly OT - Hibernate Lazy Loading with Spring and Tapestry

2005-12-18 Thread Paul Cantrell
This has come up on the Tapestry list before. A less radical and perhaps less convoluted solution -- if your application can handle a one-db-session-per-request model, which is not true for everyone -- is to open and close the Hibernate session using a servlet filter, keep the session on a

Re: Slightly OT - Hibernate Lazy Loading with Spring and Tapestry

2005-12-18 Thread Scott Russell
Part of the problem is that if you store a Hibernate lazy POJO in your page as a persistent property, then the sesison will have been closed by the time you go to later use it (in a later request-response cycle). One trick I use is to have a special property persistence strategy source that rea

Slightly OT - Hibernate Lazy Loading with Spring and Tapestry

2005-12-18 Thread Cosmin Bucur
I've also posted this on the spring forum , as I think it is sort of a mixed problem . I figured that maybe other tapestry/spring/hibernate users here might have some insight : I am using latest spring , hibernate 3 and tap 4 . I have the default true setting for lazy loading in hibernate . I woul

Re: Validate max length of non single byte string (eg. Chinese characters)

2005-12-18 Thread Chihpeng Lin
Thank you very much. I've created a validator to check the byte length of a string. It's not too difficult to create a validator in server side. I haven't figured out how to create a client side validator. Don't know how to integrate javascript into the validator yet. But I have a pr

Re: ASOs vs services

2005-12-18 Thread Howard Lewis Ship
The difference is that you can change the ASO on the fly ... just create a new instance and store it into a property that is injecting the ASO itself. On 12/18/05, Martin Strand <[EMAIL PROTECTED]> wrote: > I'm still not sure I get it... Can't I just use a Hivemind service as if > it were an ASO?

Re: ASOs vs services

2005-12-18 Thread Martin Strand
I'm still not sure I get it... Can't I just use a Hivemind service as if it were an ASO? As I understand it, the service object is only created once, so any changes I make to it will be visible to any part of my app that uses that same service, right? Or perhaps ASOs are distributed in a clus

Re: ASOs vs services

2005-12-18 Thread Ron Piterman
If your object is there to maintain the state of the application, then its an ASO, if its there to give a service (do something with method arguments, or without them) then its a service... Technically AFAIK you can differ them also in that an ASO is a standalone, whereas a service may depend

ASOs vs services

2005-12-18 Thread Martin Strand
Hi. :) I want a Settings class to be visible to most parts of my app and I find one thing somewhat confusing... Could someone please explain what the difference is between a HiveMind service and an ASO with scope="application"? Thanks, Martin --

[ANNOUNCE] Tapestry 4.0-rc-2

2005-12-18 Thread Howard Lewis Ship
The second release candidate for Tapestry 4.0 is now available. Tapestry is a component based web application framework that provides lots of functionality with minimal Java coding, and creates an environment that supports high levels of reuse. This release supplies some missing documentation, inc

Re: disable an element in a propertyselection.

2005-12-18 Thread Ted Steen
Oh, you are right. I just thought that I have seen a disabled option in an optiongroup somewhere.. maybe that was some javascript magic. On 12/17/05, Patrick Casey <[EMAIL PROTECTED]> wrote: > > Does the html spec even allow you to selectively disable one option > in an optiongroup? My cop

Re: How to replace the "submitOnChange" parameter of PropertySelection ?

2005-12-18 Thread Leonardo Quijano Vincenzi
Or you can use AjaxEventSubmit in the new release of Tacos (releasing soon) ;). That will allow you to submit the form with no page refresh. -- Ing. Leonardo Quijano Vincenzi DTQ Software Shing Hing Man wrote: You need to do something like the following. onchange="javascript:this.form.subm

Re: How to replace the "submitOnChange" parameter of PropertySelection ?

2005-12-18 Thread Shing Hing Man
You need to do something like the following. Shing --- Alan Chandler <[EMAIL PROTECTED]> wrote: > The PropertySelection component has a submitOnChange > parameter. But the docs > say it is depreciated. > > I do not understand the comment in the "Description" > section of this table. > Wh