T5: Troubles editing a list of objects

2007-09-12 Thread lasitha
some validation, add/delete use cases and the simple list may not hold up. I haven't used a Grid myself, but i hear good things :) Cheers, lasitha public class TestList { private DefaultPrimaryKeyEncoder encoder; private Value value;// current loop variable private Value

Re: T5: Troubles editing a list of objects

2007-09-12 Thread lasitha
Woah, sorry, i messed up that subject line (missed the RE: ), so if you're looking for the original post, its: http://mail-archives.apache.org/mod_mbox/tapestry-users/200709.mbox/[EMAIL PROTECTED] On 9/12/07, lasitha <[EMAIL PROTECTED]> wrote: > Marcus, you mentioned offline you&#x

Re: T5 - Inject an Application State Object into a Service

2007-09-12 Thread lasitha
Sorry to ask the obvious, but is there some reason you can't just pass the ASO into the relevant service method: class Page { @ASO aso; @Inject service; void onAction() { service.doSomethingWith(aso); } } I'm sure your situation's more complicated - just had to get the obvious out of

Re: wiki profile creation

2007-09-12 Thread lasitha
http://www.apache.org/ On 9/13/07, Angelo Chen <[EMAIL PROTECTED]> wrote: > > Hi, > I'd like to register in the Tapestrywiki so I can contribute something, but > failed to setup my anncount, it's asking:Question: President of ASF = ? > forgive my ignorance, what's ASF? and who is the president? I

T5: tapestry-hibernate commits even after an exception

2007-09-18 Thread lasitha
ion to the RequestHandlerPipeline to do the commit / rollback / cleanup (instead of listening for thread cleanup). This is how i've seen the OSIV pattern implemented in other places (eg spring), typically with a filter. Thoughts?

T5: HibernateSessionManagerImpl should close session on thread cleanup?

2007-09-18 Thread lasitha
gal attempt...' exceptions! Any insight appreciated. Thanks, lasitha. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: T5: HibernateSessionManagerImpl should close session on thread cleanup?

2007-09-19 Thread lasitha
Hate to bump my own thread, but i'd really like some feedback before i post a bug on jira. If i'm not mistaken, this will be a problem for anyone using tapestry-hibernate. Summary: I think HibernateSessionManagerImpl needs to be closing sessions on thread cleanup. On 9/18/07, lasit

Re: t5: @Inject hibernate Session into a service?

2007-09-22 Thread lasitha
method and have this injected into your dispatcher. Your dispatcher and shadow service remain singletons. I'm afraid i don't have time to test it out, but it seems to work in my head :) Cheers, lasitha. [1] http://mail-archives.apache.org/mod_mbox/tapestry-users/200709.mbox/[EMAIL PRO

Re: t5: @Inject hibernate Session into a service?

2007-09-22 Thread lasitha
hread from your service (see my previous post). Cheers. On 9/22/07, lasitha <[EMAIL PROTECTED]> wrote: > AFAIK, @Inject only works on pages and components. Services are > injected into via their constructors, without need of any annotations. > > Services are singletons by

Re: t5: @Inject hibernate Session into a service?

2007-09-22 Thread lasitha
Your logic is fine with regard to the ApplicationStateManager. I wanted to mention the difference with the HibernateSessionManager for the sake of anyone else that happens upon this thread. All the best, lasitha. On 9/23/07, Chris Lewis <[EMAIL PROTECTED]> wrote: > Let me restate -

Re: [T5] - Layout and Templating in T5, how to ?

2007-09-23 Thread lasitha
Please search the archives of this mailing list - there have been several threads about layout. http://wiki.apache.org/tapestry/Tapestry5HowToSearchTheMailingLists Cheers. On 9/23/07, Mohammad Shamsi <[EMAIL PROTECTED]> wrote: > Dear friends, > > I looked all pages and tutorials related to T5, but

Re: T5: tapestry-hibernate redirect before commit

2007-09-26 Thread lasitha
running into. In a (somewhat) related thread[1], Thiago mentioned his own hibernate integration project that you might look into. I haven't had time to look into it yet, nor to work on a patch to go with the feature request :(. Cheers, lasitha. [1] Sep 18th - T5: HibernateSessionManagerImp

Re: T5: Upgrade to 5.0.6-SNAPSHOT

2007-09-27 Thread lasitha
Is it possible you're past any quickstart or log4j issues and are now running into this?: https://issues.apache.org/jira/browse/TAPESTRY-1345 Cheers, lasitha. On 9/28/07, Marcus <[EMAIL PROTECTED]> wrote: > Hi Josh, > > Thanks for your help. I'm doing this way.

Re: T5 form field validation, component injection

2007-09-29 Thread lasitha
A good starting point for basic form validation is probably the 'Input Validation' page of the online documentation[2]. It comes with a simple example and a lot of useful info. As an aside, you can use Form.recordError() as a convenience around getDefaultTracker().getErrors().add(). HTH. Ch

Re: [T5] Access table values from html

2007-10-02 Thread lasitha
ere is a single object that contains all the data to be presented on one table, then your problem is reduced to a simple loop. I could be completely misunderstanding the problem, but i thought i'd throw this out and see if i hit anything :) Cheers, lasitha. ---

Re: Antwort: Re: Tapestry 5 IoC container

2007-10-08 Thread lasitha
since it's easily confused with service scopes in tapestry-ioc, which is an altogether different concept: http://tapestry.apache.org/tapestry5/tapestry-ioc/service.html (see section 'Defining Service Scope') Cheers, lasitha. On 10/8/07, Peter Stavrinides <[EMAIL PROTECTED]>

Re: Antwort: Re: Tapestry 5 IoC container

2007-10-09 Thread lasitha
marize, i think your options are: * Don't bind UserData if its to be an ASO, * If you really want it in the registry, define it as a contribution to the ASM, * I guess if you're adventurous, you could contribute your own service lifecycle [1]. Apologies if all that was obvious - just wanted to

Re: how to use ioc of t5 ?

2007-10-10 Thread lasitha
he mailing list archives: http://wiki.apache.org/tapestry/Tapestry5HowToSearchTheMailingLists Let us know if those don't help, Cheers, lasitha. On 10/11/07, MavenMan <[EMAIL PROTECTED]> wrote: > > hello all : > > I write a page class : > > package com.myspacc

Re: T5: any simple code for this select?

2007-10-10 Thread lasitha
If you really want your values to be different from the labels ('S' instead of 'Student'), you can use a Map for your model. The value submitted back into your 'profile' variable will be the corresponding map key (T or S). Cheers, lasitha. On 10/10/07, Josh Canf

Re: how to use ioc of t5 ?

2007-10-11 Thread lasitha
esn't seem to mention a cause... Lastly, i have a vague recollection of a past thread in this list about contributing packages to tapestry-hibernate... did you happen to run across anything in the archives? Cheers, lasitha. On 10/11/07, MavenMan <[EMAIL PROTECTED]> wrote: > >

Re: T5: the relation of pojo

2007-10-11 Thread lasitha
://hibernate.org/5.html#A7 It assumes a working knowledge of hibernate: http://hibernate.org/5.html#A3 Cheers, lasitha. On 10/12/07, MavenMan <[EMAIL PROTECTED]> wrote: > > but how to specify the relation of the pojo using relationships ? > can you give me examples of one to many

Re: T5: User validation

2007-10-11 Thread lasitha
Hello Michael, you may find this thread useful: http://www.nabble.com/-T5--Restricting-Page-Access-tf4325658.html tapestry5-acegi uses a combination of annotations and contributions to the RequestHandler pipeline[1]. You may actually only need the latter. Cheers, lasitha. [1] http

Re: [T5] Got a wrong uri from createActionLink!

2007-10-11 Thread lasitha
ndicate an action as opposed to a nested component (designated by the period (.)). What problems are you having with the generated link? Cheers, lasitha. [1] http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/ComponentResourcesCommon.html#createActionLink(java.la

Re: [T5] Got a wrong uri from createActionLink!

2007-10-11 Thread lasitha
t a uri, > how could i get a "/index.updatemsg"? > > 2007/10/12, lasitha <[EMAIL PROTECTED]>: > > > > Umm, looks fine to me... > > > > According to the createActionLink javadoc[1], it creates "... a > > component action request link as a callb

Re: [T5] Got a wrong uri from createActionLink!

2007-10-12 Thread lasitha
equest - hence you're return just '/index'. Solution (perhaps): If i understand what you're trying to do, i think you can just change: onActionFromUpdateMsg() to onUpdateMsg() in Index.java. If you do this and keep the createActionLink() code the same, the URI will

Re: T5: Looping list of objects

2007-10-12 Thread lasitha
Just out of curiosity, any reason you're not using the select component ? Cheers, lasitha. On 10/13/07, Jean-Philippe Steinmetz <[EMAIL PROTECTED]> wrote: > Thanks, that fixed it. > > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] &

Re: T5: Looping list of objects

2007-10-12 Thread lasitha
Oops, please ignore my last entry - i see this has already been covered in a subsequent thread. Apologies for the noise, lasitha. On 10/13/07, lasitha <[EMAIL PROTECTED]> wrote: > Just out of curiosity, any reason you're not using the select component ? > Cheers, lasitha. >

Re: T5: Tapestry, Hibernate and Underscores.

2007-10-13 Thread lasitha
Hi oliver, hibernate is pretty well documented... :) http://www.hibernate.org/hib_docs/v3/reference/en/html/session-configuration.html#configuration-namingstrategy Cheers, lasitha. On 10/13/07, Olivier <[EMAIL PROTECTED]> wrote: > > But that would mean I have to map each and every c

Re: [T5] Recommended naming of configurations

2007-10-14 Thread lasitha
ters :) In any case, +1 for not leaving it as is. Cheers, lasitha Oh, p.s - immeasurable thanks for T5! On 10/14/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote: > Where I dropped the ball here, in a minor way, is that it should be > "contributeTo" as a prefix, or perha

Re: [T5] Recommended naming of configurations

2007-10-14 Thread lasitha
ut protocol: once an issue has been logged on jira, do y'all prefer to move discussions there? I'm (a few months) new to the community so would appreciate direction. Thanks, lasitha. On 10/15/07, Nick Westgate <[EMAIL PROTECTED]> wrote: > Tapestry-ioc already calls the &qu

Re: Tapestry 5 service configuration

2007-10-15 Thread lasitha
Actually, it may be easier to contribute to the ApplicationStateManager instead of having it injected and getting/setting from it yourself. See the section on 'Configuring ASOs' here: http://tapestry.apache.org/tapestry5/tapestry-core/guide/appstate.html Cheers, lasitha. On 10/15

Re: T5: any simple code for this select?

2007-10-16 Thread lasitha
On 10/16/07, Angelo Chen <[EMAIL PROTECTED]> wrote: > > lasitha wrote: > > > > If you really want your values to be different from the labels ('S' > > instead of 'Student'), you can use a Map... > > > > Now I really need something like

Re: T5 - t:label component.

2007-10-17 Thread lasitha
On 10/17/07, Mohammad Shamsi <[EMAIL PROTECTED]> wrote: > > Label component in T5, just have a parameter named "for". > Tapestry use this value with some changes as a label text. > this value also used for validation messages. > but : > 1 - for example my textfield component id is "item.firstName".

Re: Information Please...OK pretty please

2007-10-17 Thread lasitha
ons, T5 ships with some example apps that are worth looking over: http://wiki.apache.org/tapestry/Tapestry5CheckOutTheSourceCode Cheers, lasitha. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: T5: PropertyAccess service not injecting?

2007-10-17 Thread lasitha
emember where i read about injected properties being private, but i've certianly run across it several times, at least on 5.0.5. Cheers, lasitha On 10/18/07, Christian Gruber <[EMAIL PROTECTED]> wrote: > Hi, > > So I was working with the "select model from obje

Re: T5: how to use a detached hibernate object in a form?

2007-10-22 Thread lasitha
http://thread.gmane.org/gmane.comp.java.tapestry.user/53095/focus=53170 Cheers, lasitha. On 10/22/07, Angelo Chen <[EMAIL PROTECTED]> wrote: > > Hi, > > I have code like following, but it generate an exception when form submits, > i thought there is only one Session open

Re: T5: how to use a detached hibernate object in a form?

2007-10-22 Thread lasitha
only have to do this temporarily. Of course you may just stick with merge() in the meantime - i just wanted to give you my understanding of the problem. Cheers, lasitha. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: T5.07 SNAPSHOT! Where is the Inject Annotation??

2007-10-23 Thread lasitha
https://issues.apache.org/jira/browse/TAPESTRY-1800 Its a good idea to keep an eye on jira or the developer mailing list for some forewarning of such chanages :). On 10/24/07, Donyee <[EMAIL PROTECTED]> wrote: > I tried the t5.07 snapshot today, the Inject Annotation is not found in the > src. >

Re: T5 / Spring / Hibernate Lazy Loading

2007-10-24 Thread lasitha
ource interface[1] is trivial to implement, and Aliasing[2] is equally simple. Cheers, lasitha. [1] http://tapestry.apache.org/tapestry5/tapestry-hibernate/apidocs/ [2] http://tapestry.apache.org/tapestry5/tapestry-core/guide/alias.html On 10/25/07, trekmbikes <[EMAIL PROTECTED]> wrote: >

Re: T5: Tapestry-Hibernate, do we have to save()?

2007-10-30 Thread lasitha
test this and look around the lists a bit but am throwing this out in case others have thoughts. Cheers, lasitha. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: T5: disable javascript

2007-11-05 Thread lasitha
ng but couldn't you just set clientValidation="false" ? http://tapestry.apache.org/tapestry5/tapestry-core/component-parameters.html#orgapachetapestrycorelibcomponentsform Cheers, lasitha. - To unsubscribe, e-mail: [EMAIL

Re: [T5] Simple question about select and enum

2007-11-15 Thread lasitha
Tom, try it without specifing a select model. The following is working for me: Where the page class has just the report property and accessors. Also note that you don't need to use expansions (the ${..}s) on these. Cheers, lasitha. On Nov 15, 2007 10:00 PM, Michael Courcy <[EMAIL P

Re: T5.0.6 about Tapestry ioc

2007-11-16 Thread lasitha
stry/services/Request.html Don't know if any of that helps - we may need a little more context to understand your question. Cheers, lasitha - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: T5: Tapestry-Hibernate, do we have to save()?

2007-11-19 Thread lasitha
-mine.sourceforge.net/hibertapestry/ > > The source is Apache 2-licensed and was not released yet, but I'll do it > soon. Thiago, any chance you'll be releasing the source soon? I'm looking forward to trying it out but am hesitant

Re: T5 How to difine dynamic path for image

2007-11-19 Thread lasitha
"context:/images/" + calculateWeatherPath(), null); } It actually may work with just null for the first parameter (the resource base) too. Cheers, lasitha - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: T5: Tapestry-Hibernate, do we have to save()?

2007-11-19 Thread lasitha
On Nov 19, 2007 5:42 PM, Thiago H de Paula Figueiredo <[EMAIL PROTECTED]> wrote: > > Hi, Lasitha! (By the way, where are you from?) Oh, the beautiful town of kandy, sri lanka :) > I'm planning to release the sources until this weekend. Great, thanks! Will be looking fo

Re: T5: Tapestry-Hibernate, do we have to save()?

2007-11-19 Thread lasitha
for the duration of an explicitly declared transaction) - the way the spring folks do it. Cheers, lasitha. P.S. I goofed up the link to the spring OSIV interceptor in my previous post. Here's the correct one: http://static.springframework.org/spring/docs/2.0.x/api/org/

Re: T5 How to difine dynamic path for image

2007-11-19 Thread lasitha
gt; > runtime... > > > > On Nov 19, 2007 5:34 AM, Chris Lewis <[EMAIL PROTECTED]> wrote: > > > > > I've not seen AssetResource - what is the advantage to using it like > > > this as opposed simply to injecting the asset? AssetSource (not AssetRe

Re: How to initialize a session variable in a page render request?

2007-11-19 Thread lasitha
quot;Page Lifecycle" guide. > http://tapestry.apache.org/tapestry5/tapestry-core/guide/lifecycle.html Is it not sufficient to have it here?: http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html Perhaps a reference from lifecycle t

Re: T5: Tapestry-Hibernate, do we have to save()?

2007-11-19 Thread lasitha
On Nov 20, 2007 12:31 AM, Thiago H de Paula Figueiredo <[EMAIL PROTECTED]> wrote: > On Mon, 19 Nov 2007 16:34:46 -0200, lasitha <[EMAIL PROTECTED]> > wrote: > > HiberTapestry does not work like tapestry-hibernate*, just opening a > transaction when a transactional met

Re: T5: Tapestry-Hibernate, do we have to save()?

2007-11-19 Thread lasitha
since we could easily not be testing for this odd case[1] and the save could easily go through without error. Anyway, it appears i have some work to do! Cheers, lasitha. [1] I'd probably test that validation kicks in and my mock dao isn't called upon to save, but not that hibernate's

Re: T5: Tapestry-Hibernate, do we have to save()?

2007-11-21 Thread lasitha
On Nov 20, 2007 9:32 AM, lasitha <[EMAIL PROTECTED]> wrote: > ... In previous versions of hibernate, just > closing a session automatically triggered a flush. A follow up for anyone keeping score: i've just verified that hibernate does _not_ automatically flush a Session when

Re: T5: Tapestry-Hibernate, do we have to save()?

2007-11-22 Thread lasitha
On Nov 22, 2007 1:20 PM, Massimo Lusetti <[EMAIL PROTECTED]> wrote: > On Nov 22, 2007 8:37 AM, lasitha <[EMAIL PROTECTED]> wrote: > > > A follow up for anyone keeping score: i've just verified that > > hibernate does _not_ automatically flush a Session

Re: T5: Tapestry-Hibernate, do we have to save()?

2007-11-22 Thread lasitha
been too slow. Oh, and if you do stay with @Persist, consider using flash persistence instead of the default. Cheers, lasitha. Notes: [1] http://www.hibernate.org/hib_docs/core/api/org/hibernate/Session.html#lock(java.lang.Object,%20org.hibernate.LockMode) [2] merge() does have the advantage

Re: [T5] A Hibernate question?

2007-11-23 Thread lasitha
dedManager) { configuration.add( AliasContribution.create( HibernateSessionManager.class, extendedManager)); } Cheers, lasitha. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: T5: Tapestry-Hibernate, do we have to save()?

2007-11-23 Thread lasitha
On Nov 23, 2007 4:29 AM, Angelo Chen <[EMAIL PROTECTED]> wrote: > > lasitha wrote: > > > > Since the above events fire on both the original request and the one > > from the redirect, you'll probably need a null check to differentiate: > > can you explai

Re: [T5] A Hibernate question?

2007-11-23 Thread lasitha
On Nov 23, 2007 1:57 PM, lasitha <[EMAIL PROTECTED]> wrote: > On Nov 23, 2007 1:18 PM, Donyee <[EMAIL PROTECTED]> wrote: > > > > when i submit the editpage, i got a error: > > Illegal attempt to associate a collection with two open sessions > > Related

Re: T5: Edit page best practice?

2007-11-26 Thread lasitha
t call findPerson(...). The _person > isn't refreshed at all! Thoughts? Using flash persistence should solve both those issues, yeah? Ok, so it seems most of my comments boil down to: don't persist, and use flash/client strategies if you must :) Let m

Re: T5: Tapestry-Hibernate, do we have to save()?

2007-11-28 Thread lasitha
omatically. The latter is a setting that disables object snapshots at the Hibernate persistence context level." I'm not using spring currently so haven't verified any of this. Just thought you might like to know. Cheers, lasitha. ---

Re: T5: Tapestry-Hibernate, do we have to save()?

2007-12-01 Thread lasitha
On Nov 19, 2007 5:42 PM, Thiago H de Paula Figueiredo <[EMAIL PROTECTED]> wrote: > On Mon, 19 Nov 2007 07:17:32 -0200, lasitha <[EMAIL PROTECTED]> > wrote: > > [ a long descpription on the 'unintended save' problem ...] > > > On Oct 31, 2007, Thi

Re: T5: Testing - PageTester reworked... How do I use mock services now?

2007-10-16 Thread lasitha ranatunga
structor arg or a method on PageTester for specifying additional > modules. Just noticed that - as of revision 584927 - the PageTester constructor now accepts optional module classes to load. So mocking services will be easy in 5.0.