Antwort: get perthread_scope service from singleton_scope service

2008-04-08 Thread Kristian Marinkovic
pass in a factory service to your ChatCoordinator that will return a new instance on every invocation (eg. create()) g kris Foror <[EMAIL PROTECTED]> 09.04.2008 06:08 Bitte antworten an "Tapestry users" An Tapestry users Kopie Thema get perthread_scope service from singleton_scope se

get perthread_scope service from singleton_scope service

2008-04-08 Thread Foror
// singleton public IChatCoordinator buildChatCoordinator() {...} @Scope(IOCConstants.PERTHREAD_SCOPE) public IPerthredService buildPerthreadService(@Inject IOtherPerthredService) {...} --- // singleton public class ChatCoordinator implements IChatCoordinator { // for every call this metho

Using Upload inside a component

2008-04-08 Thread Imants Firsts
I would like to create a component, which I could add to AppPropertyEditBlocks and would be able to edit entity fields of type MyFile by utilizing tapestry Upload component to upload the file. AppPropertyEditBlocks.tml: AppPropertyEditBlocks.java: @Component(parameters = {"value=context.p

Re: T5: when is a filed with @Retain cleaned?

2008-04-08 Thread Filip S. Adamsen
org.apache.tapestry.annotations Annotation Type Retain Marker annotation placed on fields whose value should be retained past the end of the request. This is most often associated with fields that are lazily loaded. By marking such fields with the Retain annotation, the fields will not be disc

T5: when is a filed with @Retain cleaned?

2008-04-08 Thread DavidWei
I am using T5 for my current application. There are cases when I need to have a field's value retain after the request. I know using @Persist it will work, but I do not want to store so many values in session. I found there are some samples which use @Retain. By definition, it is said as "By marki

Re: T4.1.5 / BeanForm 0.7 - component throws exception during render

2008-04-08 Thread lenards
Thank you Andreas! Quoting Andreas Andreou <[EMAIL PROTECTED]>: beanform has since moved into tacos http://tacos.sourceforge.net/tacos4.1/ http://tacos.sourceforge.net/tacos4.1/beanform/index.html and also into the central maven repo (latest version is 0.9) http://mirrors.ibiblio.org/pub/mirro

Re: T4.1.5 / BeanForm 0.7 - component throws exception during render

2008-04-08 Thread Andreas Andreou
beanform has since moved into tacos http://tacos.sourceforge.net/tacos4.1/ http://tacos.sourceforge.net/tacos4.1/beanform/index.html and also into the central maven repo (latest version is 0.9) http://mirrors.ibiblio.org/pub/mirrors/maven2/net/sf/tacos/beanform-core/0.9/ groupId=net.sf.tacos artif

[T5] Zone within Form (component dynamically adding form components)

2008-04-08 Thread Peter Beshai
I have a component that will be used to edit a list in a form. It has the ability to add/remove items from the list and when it adds one, fields to edit the new item become available. I would like to have the add action be asynchronous so that any other edited fields in the form do not get reset wh

Re: 答复: Why it convert my path

2008-04-08 Thread Thiago HP
On 4/8/08, Chris Lewis <[EMAIL PROTECTED]> wrote: > If I'm understanding you, it seems that your problem is getting the path > (url) for asset files like JS and CSS. DO NOT hard code these in > templates! Use the @IncludeJavaScriptLibrary and @IncludeStylesheet > annotations on the page class, a

BeginRender/etc for zones

2008-04-08 Thread Fernando Padilla
So.. is there such a thing as the render life cycle for the Ajax/Zone/FormZone renderings? (setupRender, beginRender, etc) I am just lucky that I have a Form within my Zone, so I get a "prepareForRender" callback, that I can setup the state for the Zone rendering.. -

T5: PageTester example broken

2008-04-08 Thread Zheng, Xiahong
Example fails to compile due to the missing "Element.getChildText()" method. It's probably removed from 5.0.11 release. What is the replacement for this method? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

T4.1.5 / BeanForm 0.7 - component throws exception during render

2008-04-08 Thread lenards
Hi, I'm working in Tapestry 4.1.5 trying to get some edit pages using BeanForm. I noticed that there seems to be a version 0.8 of BeanForm out there somewhere. But the sourceforge website downloads only has 0.7 available. I followed the walkthrough (provided on the BeanForm's site under 'Compone

Re: How to override a service create with @Marker

2008-04-08 Thread Robin Helgelin
On Tue, Apr 8, 2008 at 7:07 PM, Dave Dombrosky <[EMAIL PROTECTED]> wrote: > Is there still no solution to this problem? I am also trying to > override the default SaltSource, but the tapestry5-acegi package > always wants to use the one it defines. > > I tried using contributions to Alias and A

Re: How to override a service create with @Marker

2008-04-08 Thread Dave Dombrosky
Is there still no solution to this problem? I am also trying to override the default SaltSource, but the tapestry5-acegi package always wants to use the one it defines. I tried using contributions to Alias and AliasOverrides, and also annotating my own buildMySaltSource() method with @Marker(Aceg

RE: [T5] Need AppPropertyEditBlocks to reload page-load values

2008-04-08 Thread Jonathan Barker
pageLoaded() is something that may only happen once for many, many requests. You might want to move it to pageAttached which will move it to per-request. Also, check out the @Cached annotation that you could apply to the getAllCategories() function if it is used more than once in a request. > -

Re: [T5] Need AppPropertyEditBlocks to reload page-load values

2008-04-08 Thread Peter Beshai
Thanks Robert, I was unaware of the Cached annotation. Peter On Tue, Apr 8, 2008 at 11:13 AM, Robert Zeigler <[EMAIL PROTECTED]> wrote: > This is the expected behavior for pageLoaded. See: > > http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/annotations/PageLoaded.h

RE: T5: Using expression language in If component

2008-04-08 Thread Jonathan Barker
There is also a binding for OGNL in tapestry5-components. I did see some odd behavior that may have been caching results that should not be cached, but it has been useful to me. http://213.160.23.119:8080/t5components/t5c-commons/howto_ognlbinding.html It's something I missed from T4. > ---

Re: [T5] Need AppPropertyEditBlocks to reload page-load values

2008-04-08 Thread Robert Zeigler
This is the expected behavior for pageLoaded. See: http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/annotations/PageLoaded.html In particular: "This is useful for one-time component initializations..." How about using the @Cached annotation on the getAllCategories()

T5 : session timeout

2008-04-08 Thread Stephane Decleire
Hi, I would like to know how do you handle session timeout with T5 or if there is a "design pattern" for this case. When a session timeout occurs, a lot of pages won't work because of a lack of data (for example, normaly setted before returning the page). So i need to write a piece of code in

Re: [T5] Need AppPropertyEditBlocks to reload page-load values

2008-04-08 Thread Peter Beshai
My current workaround it to just grab from the database on every getAllCategories() call and get rid of the pageLoaded method. I'd be interested to hear if there are any different approaches. Peter Beshai On Tue, Apr 8, 2008 at 10:51 AM, Peter Beshai <[EMAIL PROTECTED]> wrote: > I have a block i

Re: T5 : Strange exception ...

2008-04-08 Thread Stephane Decleire
Thanks to both of you, i don't know why but i used to see enums more as constants declarations than as "classic" Java classes. Howard Lewis Ship a écrit : If ManagerStates is an enum, it does not belong in the components package. It should be moved out to a more general package, such as com.myc

Re: T5: Base class java.text.Format (super class of my.package.MyFormat) is not in a controlled package

2008-04-08 Thread nille hammer
Hi Jack, >> my.package.tapestry.pages.util.MyFormat Putting a none page class into the page package is a bad idea! Only Page classes should go into the pages package. If you just need a custom Format move it to some other package (excluding pages, components, base and services). If you want to

[T5] Need AppPropertyEditBlocks to reload page-load values

2008-04-08 Thread Peter Beshai
I have a block in my AppPropertyEditBlocks that grabs a list of data from the database, which works fine. The problem happens if I modify what should be in that list (say I add another row to the db), the edit block doesn't update it's list. I currently am populating the list in the pageLoaded meth

T5: Base class java.text.Format (super class of my.package.MyFormat) is not in a controlled package

2008-04-08 Thread Jack Nuzbit
Hi All, I'm trying to use a custom Format object with the output component but I'm getting the following exception: Caused by: java.lang.RuntimeException: Base class java.text.Format (super class of my.package.tapestry.pages.util.MyFormat) is not in a controlled package and is therefore not valid

Re: Page Name Problem

2008-04-08 Thread Adam Zimowski
Not only on/off but ability to contribute some sort of exclusion set would be nice. In this case: set.add("pe"); Or perhaps a regular expression? -adam On Tue, Apr 8, 2008 at 9:01 AM, Marcelo Lotif <[EMAIL PROTECTED]> wrote: > Just a suggestion > I think this feature should have an "on/off" sw

Re: Page Name Problem

2008-04-08 Thread Marcelo Lotif
Just a suggestion I think this feature should have an "on/off" switch somewhere (AppModule?). This is a very nice and useful feature, but it tricks me up sometimes... 2008/4/8, Chris Lewis <[EMAIL PROTECTED]>: > > Unfortunately that's a feature and not a bug. See here: > > http://tapestry.apache.o

Re: T5: Using expression language in If component

2008-04-08 Thread Joshua Jackson
Thanks for the confirmation Igor :) On 4/8/08, Igor Drobiazko <[EMAIL PROTECTED]> wrote: > Nope. But you can try the Tacos Seam integration. There is a binding for EL. > See the last section here: > http://tacos.sourceforge.net/tacos5/tacos-seam/bijection.html > > On Tue, Apr 8, 2008 at 1:55 PM, J

Re: T5: Using expression language in If component

2008-04-08 Thread Igor Drobiazko
Nope. But you can try the Tacos Seam integration. There is a binding for EL. See the last section here: http://tacos.sourceforge.net/tacos5/tacos-seam/bijection.html On Tue, Apr 8, 2008 at 1:55 PM, Joshua Jackson <[EMAIL PROTECTED]> wrote: > Dear all, > > Is it possible to use expression language

RE: 答复: from T5.0.11 to T5.0.6

2008-04-08 Thread Jonathan Barker
Rob, If the world is going to pass you by, you should at least be comfortable. Enjoy that chair! Jonathan > -Original Message- > From: Rob Smeets [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 08, 2008 5:18 AM > To: Tapestry users > Subject: Re: 答复: from T5.0.11 to T5.0.6 > > When I

Re: 答复: from T5.0.11 to T5.0.6

2008-04-08 Thread Ted Steen
Are you aware of the fact that T5 is alpha software? And open source for that matter, feel free to contribute... 2008/4/8, Rob Smeets <[EMAIL PROTECTED]>: > Of course with T5.0.6- even within different versions of T5 there is no > backward compatibility. What a pity! > > Rob > > 2008/4/8 Ted St

Re: T5 : Strange exception ...

2008-04-08 Thread Howard Lewis Ship
If ManagerStates is an enum, it does not belong in the components package. It should be moved out to a more general package, such as com.mycompany.data. Anything under the components package is handled specially by Tapestry. On Tue, Apr 8, 2008 at 6:12 AM, Stephane Decleire <[EMAIL PROTECTED]> wr

Re: 答复: from T5.0.11 to T5.0.6

2008-04-08 Thread Rob Smeets
Of course with T5.0.6- even within different versions of T5 there is no backward compatibility. What a pity! Rob 2008/4/8 Ted Steen <[EMAIL PROTECTED]>: > Good to hear! > With T5.0.6 or T5.0.11? > > 2008/4/8, Natia Gdzelishvili <[EMAIL PROTECTED]>: > > I've made new project and add my classes an

Re: T5 : Strange exception ...

2008-04-08 Thread Stephane Decleire
Sorry Ted but i don't see any non component in my component package ... Ted Steen a écrit : You shouldn't put non components under the components package. If you do that Tapestry will do runtime class instrumentation on the class and you will end up with exceptions like that. Atleast this is wha

Re: 答复: from T5.0.11 to T5.0.6

2008-04-08 Thread Ted Steen
Good to hear! With T5.0.6 or T5.0.11? 2008/4/8, Natia Gdzelishvili <[EMAIL PROTECTED]>: > I've made new project and add my classes and now every thing work > > > 2008/4/8 Natia Gdzelishvili <[EMAIL PROTECTED]>: > > > > i change version because i had problem: > > AddCelebrity.tml > > > > > >

Re: T5 : Strange exception ...

2008-04-08 Thread Ted Steen
You shouldn't put non components under the components package. If you do that Tapestry will do runtime class instrumentation on the class and you will end up with exceptions like that. Atleast this is what I think. Maybe we could check this and show a more human readable error message? Hope it he

Re: tapestry hibernate breakage in Apr 6 5.0.12-SNAPSHOT

2008-04-08 Thread Angelo Chen
that will be a problem to all the tapestry-hibernate apps as we all assumes the transaction will be committed at end of session, now we need to add a commit ourself. however, i welcome this change. Julian Wood wrote: > > Thanks Angelo, that was exactly it. > > J > > On Apr 6, 2008, at 9:59 PM

T5 : Strange exception ...

2008-04-08 Thread Stephane Decleire
Has anybody already get such a strange exception ? org.apache.tapestry.ioc.internal.util.TapestryException : com.mycompany.components.accounts.ManagerStates cannot be cast to com.mycompany.components.accounts.ManagerStates ??? My ManagerStates class is an enum and here is the stack trace :

T5: Using expression language in If component

2008-04-08 Thread Joshua Jackson
Dear all, Is it possible to use expression language with If component as in JSP? Thanks in advance -- Let's show the world what we've got. Blog: http://joshuajava.wordpress.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: T5 Tapestry.onDOMLoaded internet explorer 7

2008-04-08 Thread Riccardo Ruffilli
It seems to be a well known problem: http://dean.edwards.name/weblog/2006/06/again/ cheers -Rick Riccardo Ruffilli wrote: > > > Hi Josh, thanks again for your answer. > Unfortunatly I don't see any kind of js error. > I've noticed this strange things that may be you can clarify to me, > i

Re: T5.0.11 beanEditForm

2008-04-08 Thread Michael Gerzabek
Hi Natia, I'm not an expert here but learning on my own. It looks like T5 complains about the constructor of Celebrity. If you only use the default constructor your classes work. I did it that way: public class AddCelebrity { @Persist private Celebrity celebrity; @Inject p

RE: T5: AJAX Zone updating doesn't work correctly in IE

2008-04-08 Thread Blower, Andy
Thanks for the reply José, but I haven't got a nested zone. Unfortunately my example code has been completely screwed up by submitting it via Nabble so it's really not clear what on earth I'm going on about. I was really hoping to get a reply on this issue before I report on T5 to management at

Re: 答复: from T5.0.11 to T5.0.6

2008-04-08 Thread Rob Smeets
When I see these kinds of issues, all what I do is lean back in my nice, soft and comfortable chair and LOL!!! Welcome to the harsh reality world of Tapestry! Imagine when Tapestry 6 comes out- you'll shed bloody tears :-) Cheers, Rob 2008/4/8 Natia Gdzelishvili <[EMAIL PROTECTED]>: > i change v

Re: T5.0.11 beanEditForm

2008-04-08 Thread Natia Gdzelishvili
Can anyone help? On Mon, Apr 7, 2008 at 1:09 PM, Natia Gdzelishvili <[EMAIL PROTECTED]> wrote: > I am using beanedit form, i have a simple code > > AddCelebrity.tml > > > AddCelebrity.java > public class AddCelebrity { > @Persist > private Celebrity celebrity; > > public Celebrity g

Re: 答复: from T5.0.11 to T5.0.6

2008-04-08 Thread Natia Gdzelishvili
I've made new project and add my classes and now every thing work 2008/4/8 Natia Gdzelishvili <[EMAIL PROTECTED]>: > i change version because i had problem: > AddCelebrity.tml > > > AddCelebrity.java > public class AddCelebrity { > @Persist > private Celebrity celebrity; > > public C

Re: 答复: from T5.0.11 to T5.0.6

2008-04-08 Thread Natia Gdzelishvili
i change version because i had problem: AddCelebrity.tml AddCelebrity.java public class AddCelebrity { @Persist private Celebrity celebrity; public Celebrity getCelebrity() { return celebrity; } public void setCelebrity(Celebrity celebrity) { this.celebrity =

Re: Page Name Problem

2008-04-08 Thread Chris Lewis
Unfortunately that's a feature and not a bug. See here: http://tapestry.apache.org/tapestry5/tapestry-core/guide/component-classes.html, the section named "Sub-Folders / Sub-Packages": "Tapestry performs some simple optimizations of the logical page name (or component type, or mixin type). It chec

Re: 答复: from T5.0.11 to T5.0.6

2008-04-08 Thread Michael Gerzabek
Natia Gdzelishvili schrieb: > can anyone help.. > Try this: 1. *Use T5.0.11*, it's the latest stable release, also voted beta from dev team. There is not a single reason why you would use 5.0.6. You even can continue using the book. There are only very few things that changed from 5.0.6 to 5.0.

Re: from T5.0.11 to T5.0.6

2008-04-08 Thread Chris Lewis
I'm sorry you had problems that no one replied to. I can only suggest trying again. I would offer my input but I am not yet knowledgeable of the BeanEditForm. For documentation, the best thing I've found is this list, the irc channel #tapestry on irc.freenode.net, the wiki, the component reference,

Re: 答复: Why it convert my path

2008-04-08 Thread Chris Lewis
If I'm understanding you, it seems that your problem is getting the path (url) for asset files like JS and CSS. DO NOT hard code these in templates! Use the @IncludeJavaScriptLibrary and @IncludeStylesheet annotations on the page class, and that's it. chris 滕训华 wrote: > Now I hardcode in my progr

Re: Coercion error in grid

2008-04-08 Thread Stephane Decleire
Sorry for the delay of my answer. It seems that Jonathan is right : the data were retrieved by Hibernate as a Set. I have tried this morning to get a trace of this error but our code has come far beyond and i could not reproduce this error anymore. Sorry. If you need it, i can give you more inf

答复: Why it convert my path

2008-04-08 Thread 滕训华
Now I hardcode in my program with the ../securePage ,the program run normally. Before I used a const class and define a static field with securePage as its value, it would occur this problem. -邮件原件- 发件人: 滕训华 [mailto:[EMAIL PROTECTED] 发送时间: 2008年4月8日 15:20 收件人: 'Tapestry users' 主题: 答复:

答复: 答复: from T5.0.11 to T5.0.6

2008-04-08 Thread 滕训华
I think I can not help you, But now I use 5.0.11 and before I encountered this problem as you and I change the location of these template file. -邮件原件- 发件人: Natia Gdzelishvili [mailto:[EMAIL PROTECTED] 发送时间: 2008年4月8日 15:34 收件人: Tapestry users 主题: Re: 答复: from T5.0.11 to T5.0.6 can any

Re: 答复: from T5.0.11 to T5.0.6

2008-04-08 Thread Natia Gdzelishvili
can anyone help.. 2008/4/8 Natia Gdzelishvili <[EMAIL PROTECTED]>: > tamplates are in webcontext, as thy were before > > 2008/4/8 滕训华 <[EMAIL PROTECTED]>: > > You only need to move the template files to up level (Webcontext not > > WEB-INF) and rename their extension as .tml,it will be ok > > > >

Page Name Problem

2008-04-08 Thread Peter Stavrinides
Hi I have a small issue with a page name returning incorrectly... My URL looks like this: http://mysite/myapp/pe/person/34687 @Inject private ComponentResources resources_; String nameRaw = resources_.getPageName(); gives me: "pe/rson" instead of "person" What am I doing wrong here? Thanks P

Re: 答复: from T5.0.11 to T5.0.6

2008-04-08 Thread Natia Gdzelishvili
tamplates are in webcontext, as thy were before 2008/4/8 滕训华 <[EMAIL PROTECTED]>: > You only need to move the template files to up level (Webcontext not > WEB-INF) and rename their extension as .tml,it will be ok > > -邮件原件- > 发件人: Natia Gdzelishvili [mailto:[EMAIL PROTECTED] > 发送时间: 2008年

答复: Why it convert my path

2008-04-08 Thread 滕训华
Thanks for your reply. Yes,it will be ok to read the page whatever the " SecurePage" or " securepage" But because my page need other js file or css file to run normally.I found if I use the "securePage" it will be ok but " securepage" I will get the errors. -邮件原件- 发件人: Chris Lewis [mail

Re: Why it convert my path

2008-04-08 Thread Chris Lewis
I'm not sure what you mean by "which leads to some js or css can not read", but the case change of page names is normal and should be harmless as T5 handles pages in a case-insensitive manner. Therefore it won't matter if a link is made to SecurePage, securepage, securePage, or even SeCuRePaGe - it

答复: from T5.0.11 to T5.0.6

2008-04-08 Thread 滕训华
You only need to move the template files to up level (Webcontext not WEB-INF) and rename their extension as .tml,it will be ok -邮件原件- 发件人: Natia Gdzelishvili [mailto:[EMAIL PROTECTED] 发送时间: 2008年4月8日 15:13 收件人: Tapestry users 主题: Re: from T5.0.11 to T5.0.6 if you dont recomend then which

Re: from T5.0.11 to T5.0.6

2008-04-08 Thread Natia Gdzelishvili
if you dont recomend then which book or tutorial use. i had a problem with BeanEditForm and I wrote about that but no one answered and now what should , i cant run application On Tue, Apr 8, 2008 at 11:02 AM, Chris Lewis <[EMAIL PROTECTED]> wrote: > Perhaps it was the version previous then (it c

Why it convert my path

2008-04-08 Thread 滕训华
I have a form in a page and when the form is submitted,it will open another page which is under the securePage path.But when it turn to this page,the “securePage” is change to “securepage”,which leads to some js or css can not read.why and how to solve this?

Re: from T5.0.11 to T5.0.6

2008-04-08 Thread Chris Lewis
Perhaps it was the version previous then (it changed around that release I think). You say you had problems you couldn't solve - why? Was the code old, or were you trying to use that book (one I wouldn't recommend) for 5.0.11? Natia Gdzelishvili wrote: > and why do i need to change file extentions