Re: 5.0.5-SNAPSHOTS
On 5/17/07, sun <[EMAIL PROTECTED]> wrote: Howard Lewis Ship gmail.com> writes: > > I've been making a number of important T5 bug fixes; I've just uploaded the > latest snapshots to http://people.apache.org/~hlship/tapestry-repository/ > > Feedback is always welcome! > T5.0.5 did not solve the problem of Chinese First of all, this is not the final 5.0.5 release, it's a snapshot. Second, give it a rest, Howard is working hard on T5, he will fix your issue sooner or later. If it's really that important maybe should give it a try yourself? The code is available. -- regards, Robin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 Templating and alternate css files based on current page
I thought that if a directory in the context didn't conflict with a tapestry page name (like 'start'), then the url to that directory would reference it ok. For example, I have a context dir (named 'webapp' under src/main) that looks like this: /src/main/webapp: - css - main_style.css - images - js - WEB-INF If I direct my browser to http://localhost:8080/css/main_style.css, I get a raw dump of the css file to the browser screen as I would expect. This .css file also gets properly injected if I use @Inject @Path ("context:css/main_style.css") private Asset _mainStyle; This is all properly working code (under Jetty at least :) Bill On 5/18/07, Martin Reurings <[EMAIL PROTECTED]> wrote: Hmmm, but that would generate a path to the webserver ('/static/') root and not to the root of the context ('[appContext]/static/...'), plus it would bypass internationalization. Now I admit for css files the internationalization wouldn't matter but for skin-related images it might matter a lot and I would like to work it out within the @Inject method if possible. However, this idea has created a work-around for me, I'm now using the @inject @path combo to create to url's to the separate skins and I'm switching between them based on the value of the property 'skin'. I think it could be improved upon: public class SiteDesign { public final static String SKIN_PUBLISHER = "publisher"; public final static String SKIN_ADVERTISER = "advertiser"; @Parameter private String skin = "publisher"; @Inject @Path("context:static/css/advertiser/skin.css") private Asset skin1CSS; @Inject @Path("context:static/css/publisher/skin.css") private Asset skin2CSS; public Asset getSkinCSS() { if (skin.equalsIgnoreCase(SKIN_PUBLISHER)) return skin2CSS; return skin1CSS; } public String getSkin() { return skin; } } Bill Holloway wrote: > If "skin" is a component property that's properly evaluated for you, > you can return the evaluated path as a page property to an Any > component in the template for the : > > In TheComponent.java > > private String _skin // perhaps a parameter or resolved in onActivate? > > public String getStylesheetPath () > { > return "/static/css/" + _skin + "/color-scheme.css"; > } > > In TheComponent.html: > > ... > href="prop:stylesheetPath" /> > ... > > Bill > > On 5/17/07, Martin Reurings <[EMAIL PROTECTED]> wrote: >> We've created a simple template component to render the generic html >> layout >> of the page and handle things like the navigation in the near future. >> Since >> we've just started to use tapestry I am still trying to get my head >> around >> some of the things that would probably seem obvious to anybody else. >> >> I will have several CSS files linked in the head of my html file, >> since the >> url to a specific page is unknown and may be nested in a directory >> structure >> these files need to be absolute and should have the context root >> included. >> >> Now I've figured out how to do that using this: >> @Inject >> @Path("context:static/css/layout.css") >> private Asset layoutCSS; >> >> The layout doesn't change, this is fine with me, but the color-scheme >> will >> change depending on which section of the site a user is browsing in >> and this >> introduces a variable in the directory structure. Now I've figured >> out how >> to use a property to pass that value on to my template component: >> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> >> >> However, I have spent some time trying to figure out how to get this >> value >> injected into my accual url, as this doesn't work: >> @Inject >> @Path("context:static/css/${skin}/color-scheme.css") >> private Asset skinCSS; >> >> Can anybody tell me what the preferred way of solving this issue >> would be? >> >> Thanx, >> >> Martin >> >> -- >> ( /' _/_ __ _ _ >> |/|///)(/(/(//_(-/ >> _/ >> Website: http://www.windgazer.nl >> > > -- ( /' _/_ __ _ _ |/|///)(/(/(//_(-/ _/ E-mail: [EMAIL PROTECTED] Website: http://www.windgazer.nl "The trouble with doing something right the first time, is nobody appreciates how difficult it was." -- Unknown Artist - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- "The future is here. It's just not evenly distributed yet." -- Traditional - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 Templating and alternate css files based on current page
Hmmm, but that would generate a path to the webserver ('/static/') root and not to the root of the context ('[appContext]/static/...'), plus it would bypass internationalization. Now I admit for css files the internationalization wouldn't matter but for skin-related images it might matter a lot and I would like to work it out within the @Inject method if possible. However, this idea has created a work-around for me, I'm now using the @inject @path combo to create to url's to the separate skins and I'm switching between them based on the value of the property 'skin'. I think it could be improved upon: public class SiteDesign { public final static String SKIN_PUBLISHER = "publisher"; public final static String SKIN_ADVERTISER = "advertiser"; @Parameter private String skin = "publisher"; @Inject @Path("context:static/css/advertiser/skin.css") private Asset skin1CSS; @Inject @Path("context:static/css/publisher/skin.css") private Asset skin2CSS; public Asset getSkinCSS() { if (skin.equalsIgnoreCase(SKIN_PUBLISHER)) return skin2CSS; return skin1CSS; } public String getSkin() { return skin; } } Bill Holloway wrote: If "skin" is a component property that's properly evaluated for you, you can return the evaluated path as a page property to an Any component in the template for the : In TheComponent.java private String _skin // perhaps a parameter or resolved in onActivate? public String getStylesheetPath () { return "/static/css/" + _skin + "/color-scheme.css"; } In TheComponent.html: ... ... Bill On 5/17/07, Martin Reurings <[EMAIL PROTECTED]> wrote: We've created a simple template component to render the generic html layout of the page and handle things like the navigation in the near future. Since we've just started to use tapestry I am still trying to get my head around some of the things that would probably seem obvious to anybody else. I will have several CSS files linked in the head of my html file, since the url to a specific page is unknown and may be nested in a directory structure these files need to be absolute and should have the context root included. Now I've figured out how to do that using this: @Inject @Path("context:static/css/layout.css") private Asset layoutCSS; The layout doesn't change, this is fine with me, but the color-scheme will change depending on which section of the site a user is browsing in and this introduces a variable in the directory structure. Now I've figured out how to use a property to pass that value on to my template component: http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> However, I have spent some time trying to figure out how to get this value injected into my accual url, as this doesn't work: @Inject @Path("context:static/css/${skin}/color-scheme.css") private Asset skinCSS; Can anybody tell me what the preferred way of solving this issue would be? Thanx, Martin -- ( /' _/_ __ _ _ |/|///)(/(/(//_(-/ _/ Website: http://www.windgazer.nl -- ( /' _/_ __ _ _ |/|///)(/(/(//_(-/ _/ E-mail: [EMAIL PROTECTED] Website: http://www.windgazer.nl "The trouble with doing something right the first time, is nobody appreciates how difficult it was." -- Unknown Artist - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 Templating and alternate css files based on current page
If "skin" is a component property that's properly evaluated for you, you can return the evaluated path as a page property to an Any component in the template for the : In TheComponent.java private String _skin // perhaps a parameter or resolved in onActivate? public String getStylesheetPath () { return "/static/css/" + _skin + "/color-scheme.css"; } In TheComponent.html: ... ... Bill On 5/17/07, Martin Reurings <[EMAIL PROTECTED]> wrote: We've created a simple template component to render the generic html layout of the page and handle things like the navigation in the near future. Since we've just started to use tapestry I am still trying to get my head around some of the things that would probably seem obvious to anybody else. I will have several CSS files linked in the head of my html file, since the url to a specific page is unknown and may be nested in a directory structure these files need to be absolute and should have the context root included. Now I've figured out how to do that using this: @Inject @Path("context:static/css/layout.css") private Asset layoutCSS; The layout doesn't change, this is fine with me, but the color-scheme will change depending on which section of the site a user is browsing in and this introduces a variable in the directory structure. Now I've figured out how to use a property to pass that value on to my template component: http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> However, I have spent some time trying to figure out how to get this value injected into my accual url, as this doesn't work: @Inject @Path("context:static/css/${skin}/color-scheme.css") private Asset skinCSS; Can anybody tell me what the preferred way of solving this issue would be? Thanx, Martin -- ( /' _/_ __ _ _ |/|///)(/(/(//_(-/ _/ Website: http://www.windgazer.nl -- "The future is here. It's just not evenly distributed yet." -- Traditional - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Is onActivate a robust place for authentication?
I'm not sure yet how to integrate ACEGI, but I can look at an ASO in onActivate for a page. Is returning a page name from onActivate() a robust solution for basic user authentication? Bill -- "The future is here. It's just not evenly distributed yet." -- Traditional - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Tap 4.1.2] Problem with repeated calls to an If component
It's something that will happen to all ognl expressions for the next week or two. After that they will be resolved as per normal in development mode and jit'ed in production. On 5/17/07, Daniel Jue <[EMAIL PROTECTED]> wrote: Jesse, I stepped away from the computer for a bit, and I had just now submitted the JIRA before updating this conversation. https://issues.apache.org/jira/browse/TAPESTRY-1477 I am happy to know it is something that happens on purpose, and for developmental issues. I would hate to have my DAO's get called 3 times in production though, so if similar ensurances are left in, I hope there would be a way to turn it off via a flag, etc. Does this "ensuring" feature only apply to IF components, or to others as well? (i.e. are expressions for other components being evaluated multiple times?) I have one dynamic form component that can make use of up to 40 other core components based on multiple if/else components. I also feel assured now that this isn't some ill procedure that would potentially break something down the line. Daniel On 5/17/07, Jesse Kuhnert <[EMAIL PROTECTED]> wrote: > No need for JIRA issues - I know exactly why it's doing it and intentionally > have it running this way. > > Unfortunately it's the only sane way I know to make sure 4.1.2 is > releasable. There's no actual need for OGNL expressions to be compiled in > dev mode but otherwise I'd have no way of ensuring that your happily > developed app didn't work quite the same way in production. ...Would you > rather be annoyed for another week or two until the release or get a phone > call at 2am that the app is blowing up and wtf have you done we're totally > screwed? =p > > On 5/17/07, Andreas Andreou <[EMAIL PROTECTED]> wrote: > > > > Add a JIRA please. > > At least since 4.1.2-20070501.233137-64, i can see the first If getting > > called 3 times! > > And it's probably the first @If after an app reset that gets evaluated 3 > > times and not > > the first @If of a page. > > > > An old 4.1.2-20070215.051249-15 worked correctly, i cant test other (in > > between) > > versions right now due to dependencies incompatibilities. > > > > > > > > On 5/17/07, Daniel Jue <[EMAIL PROTECTED]> wrote: > > > > > > Ugh. This is a big pain now. I have a huge dynamic form that has > > > lots of IFs, and I can see the same queries being called 3 times or > > > more. =( > > > Everything still works, it's just about 3 times slower. > > > > > > If anyone has solved this problem please let me know! > > > > > > On 5/17/07, Daniel Jue <[EMAIL PROTECTED]> wrote: > > > > Here is another example when more than one IF component is used. > > > > > > > > It seems the conditional for the first IF gets called 3 times, then > > > > the others just get called once. > > > > > > > > plain.java: > > > > > > > > package com.phy6.app; > > > > > > > > import org.apache.tapestry.IComponent; > > > > import org.apache.tapestry.annotations.Component; > > > > import org.apache.tapestry.annotations.InitialValue; > > > > import org.apache.tapestry.html.BasePage; > > > > > > > > public abstract class plain extends BasePage { > > > > > > > > public boolean getDoStuff() { > > > > this.setNumber(this.getNumber() + 1); > > > > System.out.println("plain: getDoStuff() " + > > > this.getNumber()); > > > > return false; > > > > } > > > > > > > > @Component(type = "If", id = "ifXYZ", bindings = { > > > "condition=getDoStuff()" }) > > > > public abstract IComponent getIfXYZ(); > > > > > > > > @Component(type = "If", id = "ifABC", bindings = { > > > "condition=getDoStuff()" }) > > > > public abstract IComponent getIfABC(); > > > > > > > > @Component(type = "If", id = "ifDEF", bindings = { > > > "condition=getDoStuff()" }) > > > > public abstract IComponent getIfDEF(); > > > > > > > > @Component(type = "If", id = "ifGHI", bindings = { > > > "condition=getDoStuff()" }) > > > > public abstract IComponent getIfGHI(); > > > > > > > > @InitialValue("0") > > > > public abstract int getNumber(); > > > > > > > > @Component(type = "Insert", id = "wtfisgoingon", bindings = { > > > > "value=getNumber()" }) > > > > public abstract IComponent getWTFisgoingon(); > > > > > > > > public abstract void setNumber(int n); > > > > } > > > > > > > > > > > > > > > > plain.html > > > > > > > > > > > > > > > > Hi XYZ > > > > Hi ABC > > > > Hi DEF > > > > Hi GHI > > > > > > > > > > > > > > > > > > > > > > > > plain.page is an empty page spec. > > > > > > > > Output: > > > > INFO: Server startup in 3645 ms > > > > plain: getDoStuff() 1 > > > > plain: getDoStuff() 2 > > > > plain: getDoStuff() 3 > > > > plain: getDoStuff() 4 > > > > plain: getDoStuff() 5 > > > > plain: getDoStuff() 6 > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > >
Re: [Tap 4.1.2] Problem with repeated calls to an If component
Jesse, I stepped away from the computer for a bit, and I had just now submitted the JIRA before updating this conversation. https://issues.apache.org/jira/browse/TAPESTRY-1477 I am happy to know it is something that happens on purpose, and for developmental issues. I would hate to have my DAO's get called 3 times in production though, so if similar ensurances are left in, I hope there would be a way to turn it off via a flag, etc. Does this "ensuring" feature only apply to IF components, or to others as well? (i.e. are expressions for other components being evaluated multiple times?) I have one dynamic form component that can make use of up to 40 other core components based on multiple if/else components. I also feel assured now that this isn't some ill procedure that would potentially break something down the line. Daniel On 5/17/07, Jesse Kuhnert <[EMAIL PROTECTED]> wrote: No need for JIRA issues - I know exactly why it's doing it and intentionally have it running this way. Unfortunately it's the only sane way I know to make sure 4.1.2 is releasable. There's no actual need for OGNL expressions to be compiled in dev mode but otherwise I'd have no way of ensuring that your happily developed app didn't work quite the same way in production. ...Would you rather be annoyed for another week or two until the release or get a phone call at 2am that the app is blowing up and wtf have you done we're totally screwed? =p On 5/17/07, Andreas Andreou <[EMAIL PROTECTED]> wrote: > > Add a JIRA please. > At least since 4.1.2-20070501.233137-64, i can see the first If getting > called 3 times! > And it's probably the first @If after an app reset that gets evaluated 3 > times and not > the first @If of a page. > > An old 4.1.2-20070215.051249-15 worked correctly, i cant test other (in > between) > versions right now due to dependencies incompatibilities. > > > > On 5/17/07, Daniel Jue <[EMAIL PROTECTED]> wrote: > > > > Ugh. This is a big pain now. I have a huge dynamic form that has > > lots of IFs, and I can see the same queries being called 3 times or > > more. =( > > Everything still works, it's just about 3 times slower. > > > > If anyone has solved this problem please let me know! > > > > On 5/17/07, Daniel Jue <[EMAIL PROTECTED]> wrote: > > > Here is another example when more than one IF component is used. > > > > > > It seems the conditional for the first IF gets called 3 times, then > > > the others just get called once. > > > > > > plain.java: > > > > > > package com.phy6.app; > > > > > > import org.apache.tapestry.IComponent; > > > import org.apache.tapestry.annotations.Component; > > > import org.apache.tapestry.annotations.InitialValue; > > > import org.apache.tapestry.html.BasePage; > > > > > > public abstract class plain extends BasePage { > > > > > > public boolean getDoStuff() { > > > this.setNumber(this.getNumber() + 1); > > > System.out.println("plain: getDoStuff() " + > > this.getNumber()); > > > return false; > > > } > > > > > > @Component(type = "If", id = "ifXYZ", bindings = { > > "condition=getDoStuff()" }) > > > public abstract IComponent getIfXYZ(); > > > > > > @Component(type = "If", id = "ifABC", bindings = { > > "condition=getDoStuff()" }) > > > public abstract IComponent getIfABC(); > > > > > > @Component(type = "If", id = "ifDEF", bindings = { > > "condition=getDoStuff()" }) > > > public abstract IComponent getIfDEF(); > > > > > > @Component(type = "If", id = "ifGHI", bindings = { > > "condition=getDoStuff()" }) > > > public abstract IComponent getIfGHI(); > > > > > > @InitialValue("0") > > > public abstract int getNumber(); > > > > > > @Component(type = "Insert", id = "wtfisgoingon", bindings = { > > > "value=getNumber()" }) > > > public abstract IComponent getWTFisgoingon(); > > > > > > public abstract void setNumber(int n); > > > } > > > > > > > > > > > > plain.html > > > > > > > > > > > > Hi XYZ > > > Hi ABC > > > Hi DEF > > > Hi GHI > > > > > > > > > > > > > > > > > > plain.page is an empty page spec. > > > > > > Output: > > > INFO: Server startup in 3645 ms > > > plain: getDoStuff() 1 > > > plain: getDoStuff() 2 > > > plain: getDoStuff() 3 > > > plain: getDoStuff() 4 > > > plain: getDoStuff() 5 > > > plain: getDoStuff() 6 > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr > Tapestry / Tacos developer > Open Source / JEE Consulting > -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-m
T5 Templating and alternate css files based on current page
We've created a simple template component to render the generic html layout of the page and handle things like the navigation in the near future. Since we've just started to use tapestry I am still trying to get my head around some of the things that would probably seem obvious to anybody else. I will have several CSS files linked in the head of my html file, since the url to a specific page is unknown and may be nested in a directory structure these files need to be absolute and should have the context root included. Now I've figured out how to do that using this: @Inject @Path("context:static/css/layout.css") private Asset layoutCSS; The layout doesn't change, this is fine with me, but the color-scheme will change depending on which section of the site a user is browsing in and this introduces a variable in the directory structure. Now I've figured out how to use a property to pass that value on to my template component: http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> However, I have spent some time trying to figure out how to get this value injected into my accual url, as this doesn't work: @Inject @Path("context:static/css/${skin}/color-scheme.css") private Asset skinCSS; Can anybody tell me what the preferred way of solving this issue would be? Thanx, Martin -- ( /' _/_ __ _ _ |/|///)(/(/(//_(-/ _/ Website: http://www.windgazer.nl
Re: [Tap 4.1.2] Problem with repeated calls to an If component
No need for JIRA issues - I know exactly why it's doing it and intentionally have it running this way. Unfortunately it's the only sane way I know to make sure 4.1.2 is releasable. There's no actual need for OGNL expressions to be compiled in dev mode but otherwise I'd have no way of ensuring that your happily developed app didn't work quite the same way in production. ...Would you rather be annoyed for another week or two until the release or get a phone call at 2am that the app is blowing up and wtf have you done we're totally screwed? =p On 5/17/07, Andreas Andreou <[EMAIL PROTECTED]> wrote: Add a JIRA please. At least since 4.1.2-20070501.233137-64, i can see the first If getting called 3 times! And it's probably the first @If after an app reset that gets evaluated 3 times and not the first @If of a page. An old 4.1.2-20070215.051249-15 worked correctly, i cant test other (in between) versions right now due to dependencies incompatibilities. On 5/17/07, Daniel Jue <[EMAIL PROTECTED]> wrote: > > Ugh. This is a big pain now. I have a huge dynamic form that has > lots of IFs, and I can see the same queries being called 3 times or > more. =( > Everything still works, it's just about 3 times slower. > > If anyone has solved this problem please let me know! > > On 5/17/07, Daniel Jue <[EMAIL PROTECTED]> wrote: > > Here is another example when more than one IF component is used. > > > > It seems the conditional for the first IF gets called 3 times, then > > the others just get called once. > > > > plain.java: > > > > package com.phy6.app; > > > > import org.apache.tapestry.IComponent; > > import org.apache.tapestry.annotations.Component; > > import org.apache.tapestry.annotations.InitialValue; > > import org.apache.tapestry.html.BasePage; > > > > public abstract class plain extends BasePage { > > > > public boolean getDoStuff() { > > this.setNumber(this.getNumber() + 1); > > System.out.println("plain: getDoStuff() " + > this.getNumber()); > > return false; > > } > > > > @Component(type = "If", id = "ifXYZ", bindings = { > "condition=getDoStuff()" }) > > public abstract IComponent getIfXYZ(); > > > > @Component(type = "If", id = "ifABC", bindings = { > "condition=getDoStuff()" }) > > public abstract IComponent getIfABC(); > > > > @Component(type = "If", id = "ifDEF", bindings = { > "condition=getDoStuff()" }) > > public abstract IComponent getIfDEF(); > > > > @Component(type = "If", id = "ifGHI", bindings = { > "condition=getDoStuff()" }) > > public abstract IComponent getIfGHI(); > > > > @InitialValue("0") > > public abstract int getNumber(); > > > > @Component(type = "Insert", id = "wtfisgoingon", bindings = { > > "value=getNumber()" }) > > public abstract IComponent getWTFisgoingon(); > > > > public abstract void setNumber(int n); > > } > > > > > > > > plain.html > > > > > > > > Hi XYZ > > Hi ABC > > Hi DEF > > Hi GHI > > > > > > > > > > > > plain.page is an empty page spec. > > > > Output: > > INFO: Server startup in 3645 ms > > plain: getDoStuff() 1 > > plain: getDoStuff() 2 > > plain: getDoStuff() 3 > > plain: getDoStuff() 4 > > plain: getDoStuff() 5 > > plain: getDoStuff() 6 > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / JEE Consulting -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
Re: 5.0.5-SNAPSHOTS
2007/5/17, petros <[EMAIL PROTECTED]>: I found what was my problem. I was using the filter org.apache.tapestry.TapestryFilter instead of org.apache.tapestry.spring.TapestrySpringFilter I am now getting this exception which is the same problem reported by Nick Westgate java.lang.RuntimeException: Exception constructing service 'ServletApplicationInitializer': Unable to instantiate class org.apache.tapestry.services.TapestryModule as a module builder: Error creating bean with name 'txProxyTemplate': Bean definition is abstract To avoid the exception,two solutions: 1) use spring 2.x,(test on Spring 2.0.5) 2) write an object provider and a annotation (via @Spring),I use @Inject @Spring("mySpringService") private EntityService _entityService; Jun Tsai -- Welcome to China Java Users Group(CNJUG). http://cnjug.dev.java.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
General Tapestry Question - File permissions
guys, this is a general java question, but since i am using tapestry i thought i will raise it here. i am using tap3. now whats happening is, that i am running a postgres backup command from within my tapestry web app. the user enters a folder location in a form, which i grab and run the postgres backup command and backup this backedup file at that location. so its a general tapestry form implementation and java io. now when the user submits the location, i check if the location exists using .exists() and only then perform the backup. now my concern is that i can backup files to folders the user does not have access to. i mean if using windows explorer, i set the access permissions to a set folder, as full control deny all (read, write etc) by me, and then if i click on it it says the folder is inaccessible, access denied. now if i enter this location in my tapestry form, the system performs a backup and generates the required backup file in that folder, even though i do not have access rights to that folder and cant access it. so i guess my question is, this a bug in java, postgres or its actually meant to happen. and how can i tell the user that the system cannot write to the folder as you dont have access permissions to it. any help please. thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using registry in a factory
I tried injecting an ObjectProvider into my AppModule buildService method, but it doesn't work. Tapestry reports that Service id "ObjectLocator" isn't defined by any module. I see that the MasterObjectProvider is available, but I don't think that's what I want. Here's my code: static public ServiceFactory buildServiceFactory(@InjectService("ObjectLocator") ObjectLocator objectLocator) throws Exception { } Any suggestions? - Original Message From: Howard Lewis Ship <[EMAIL PROTECTED]> To: Tapestry users Sent: Wednesday, May 16, 2007 2:55:44 PM Subject: Re: Using registry in a factory You can't get the Registry, but you can get an ObjectLocator, which includes all the key methods of Registry. This can be injected into your ServiceFactory implementation. On 5/16/07, Mark Addleman <[EMAIL PROTECTED]> wrote: > > I'd like to use tapestry-ioc outside the context of a web app but I'm > running into a conceptual problem. I need to create and destroy objects in > response to asynchronous events, so I've defined the following interface: > > public interface ServiceFactory > { >public Service createService(Registry registry); > } > > I pass the registry object so the service factory can look up all the > necessary services in order to construct the particular service. > > I'd like the event publisher to be in the Tapestry Registry with the > following interface: > > public interface EventPublisher > { > public void addServiceFactory(ServiceFactory factory); > } > > The problem is, I don't know how to get the registry object into the > EventPublisher's implementation. Ideally, I'd like to inject the Registry > into the EventPublisherImpl's constructor, but I know that's impossible > under 5.0.4's implementation. What do you think about enhancing injection > to support this kind of bootstrapping? > -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com
Re: Tapestry5 ready for use in a new project?
I think client persistence was just committed today by Howard. On 5/16/07, Juan Maya <[EMAIL PROTECTED]> wrote: I miss right now tacos library and other ajax components. However i think they are a lot easier to implement in T5 and according to the road map i have seen on the web page the ajax support will be ready soon. Also, i would really like to have client side persistence . Right now Session and Flash are available. (although flash is not documented on the website). On 5/16/07, Martin Grotzke <[EMAIL PROTECTED]> wrote: > > Hi Juan, > > thanx a lot for your feedback, > > On Wed, 2007-05-16 at 08:48 -0500, Juan Maya wrote: > > Hi martin, > > I have been using T5 since a few weeks and it has been great! The > increased > > productivity is really amazing and i haven't faced major bugs. > sounds very well! > > > However i couldn't tell u anything about performance and scalability. > I've read that T5 shall be faster than T4, but concerning scalability it > would be good to have some info... > > > My application is still pretty basic and runs smoothly...but it's not > enough to > > say that i will recommend to to use tapestry 5 in a production > environment. > Ok, I totally understand :) > Are you missing any functionality that you perhaps know from T4 (in case > you used T4 before), or some other features? > > Thanx && cheers, > Martin > > > > > > On 5/16/07, Martin Grotzke <[EMAIL PROTECTED] > wrote: > > > > > > hello, > > > > > > the missing feedback sounds like "hmm, no, better don't use > > > T5 for a new project now"... > > > > > > please correct me if i'm wrong :) > > > > > > cheers, > > > martin > > > > > > > > > On Mon, 2007-05-14 at 00:00 +0200, Martin Grotzke wrote: > > > > hi, > > > > > > > > we're considering to use tapestry for a new project that > > > > shall go into production at the end of september this year. > > > > > > > > of course the best is to use a tested and stable framework (like > > > > tapestry 4.1), although i want to ask if it would be worth to use > > > > tapestry 5 for the new project. > > > > (posts on the users mailing list like this one > > > > http://www.mail-archive.com/users@tapestry.apache.org/msg11384.html > > > > sound promising) > > > > > > > > according to the roadmap (http://tapestry.apache.org/tapestry5/) > > > > there are several features outstanding - is this description > up-to-date? > > > > is there functionality in tapestry 4.1 that is not yet available in > > > > tapestry 5, and is there a summary of what is still missing in t5? > > > > > > > > what is the plan with component libs like tacos in respect to t5 (is > > > > > it still needed)? > > > > > > > > if there's anybody out there already using tapestry 5 it would be > nice > > > > to get some feedback on the current status of t5, and what is > working > > > > and what is not. > > > > > > > > thanx a lot in advance for your advice, > > > > cheers, > > > > martin > > > > > > > > > > > -- > > > Martin Grotzke > > > http://www.javakaffee.de/blog/ > > > > > > > -- > Martin Grotzke > http://www.javakaffee.de/blog/ > >
Re: localization oddity
Thanks, I did something similar. Except I used ISO-8859-1. I still don't have an explanation for the odd behavior, but it works...I move on. e. On 5/17/07, Daniel Kleine-Albers <[EMAIL PROTECTED]> wrote: Hi there, I had the same problem with German umlauts not rendering correctly. Have a look at the character encoding of your files. I converted all my files to UTF-8 and since then all the labels (regardless in which message file) render correctly. Best regards Daniel On 10.05.2007, at 11:43, Jesse Kuhnert wrote: > Not much - and definitely not anything that would be related to > what you are > seeingSo if you see an oddity that would explain it it has to > in there, > or your copy && paste of the characters didn't come through ok in > the new > file,. > > On 5/9/07, Eric Schneider <[EMAIL PROTECTED]> wrote: >> >> I'm still using 4.0.2. Not sure how much has changed since then. >> >> e. >> >> >> On 5/9/07, Jesse Kuhnert <[EMAIL PROTECTED]> wrote: >> > >> > I don't know what version you are on but most of that happens in >> here: >> > >> > >> > >> http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry- >> framework/src/java/org/apache/tapestry/services/impl/ >> ComponentMessagesSourceImpl.java?view=markup >> > >> > I haven't changed things ~too~ much in 4.1.2 but there are slight >> > differences...Reading the code leads me to believe that the >> namespace >> > properties (ie the global) would be read from the same >> service...In fact >> I >> > know it is since I added something in for appfuse to be able to >> place >> them >> > in different locations. >> > >> > Maybe you'll see a slight difference in component vs. namespace >> reading >> in >> > there? If you do let me know. >> > >> > On 5/9/07, Eric Schneider <[EMAIL PROTECTED]> wrote: >> > > >> > > Thanks for the tip, I'll give it shot. >> > > >> > > I'm still very curious about why it would behave >> differently. :-| >> > > >> > > e. >> > > >> > > On 5/9/07, Michael Maier <[EMAIL PROTECTED]> wrote: >> > > > >> > > > I wonder that 'recap_label=Récapitulation' works... >> > > > >> > > > try >> > > > >> > > > man native2ascii >> > > > >> > > > *.properties are invented by english speaking man, so >> everything is >> > > > ascii...:-) >> > > > >> > > > maybe this will help >> > > > >> > > > >> > > > Am 10.05.2007 um 00:16 schrieb Eric Schneider: >> > > > >> > > > > I'm in the process of moving my page and component message >> bundles >> > > > > into a >> > > > > global file. In the long run this seems like a much more >> manageable >> > > > > approach. But, I'm seeing some results that I didn't expect. >> > > > > >> > > > > For example, moving "recap_label=Récapitulation" from a page >> > > > > property file >> > > > > to the global property file causes the label to render >> differently. >> > > > > >> > > > > When it was in the _fr.properties file it would >> render in >> the >> > > > > browser >> > > > > properly, "Récapitulation". When being pulled from the >> global >> file >> > > > > (_fr.properties) it would render like >> "RÈcapitulation". >> > > > > >> > > > > Another example of the oddness, "RÉSERVATION BLESSÉE" >> renders as >> > > > > "R…SERVATION BLESS…E" from the global properties file. >> > > > >> > > > >> > > > >> - >> > > > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > > > For additional commands, e-mail: [EMAIL PROTECTED] >> > > > >> > > > >> > > >> > >> > >> > >> > -- >> > Jesse Kuhnert >> > Tapestry/Dojo team member/developer >> > >> > Open source based consulting work centered around >> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com >> > >> > > > > -- > Jesse Kuhnert > Tapestry/Dojo team member/developer > > Open source based consulting work centered around > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Tap 4.1.2] Problem with repeated calls to an If component
Add a JIRA please. At least since 4.1.2-20070501.233137-64, i can see the first If getting called 3 times! And it's probably the first @If after an app reset that gets evaluated 3 times and not the first @If of a page. An old 4.1.2-20070215.051249-15 worked correctly, i cant test other (in between) versions right now due to dependencies incompatibilities. On 5/17/07, Daniel Jue <[EMAIL PROTECTED]> wrote: Ugh. This is a big pain now. I have a huge dynamic form that has lots of IFs, and I can see the same queries being called 3 times or more. =( Everything still works, it's just about 3 times slower. If anyone has solved this problem please let me know! On 5/17/07, Daniel Jue <[EMAIL PROTECTED]> wrote: > Here is another example when more than one IF component is used. > > It seems the conditional for the first IF gets called 3 times, then > the others just get called once. > > plain.java: > > package com.phy6.app; > > import org.apache.tapestry.IComponent; > import org.apache.tapestry.annotations.Component; > import org.apache.tapestry.annotations.InitialValue; > import org.apache.tapestry.html.BasePage; > > public abstract class plain extends BasePage { > > public boolean getDoStuff() { > this.setNumber(this.getNumber() + 1); > System.out.println("plain: getDoStuff() " + this.getNumber()); > return false; > } > > @Component(type = "If", id = "ifXYZ", bindings = { "condition=getDoStuff()" }) > public abstract IComponent getIfXYZ(); > > @Component(type = "If", id = "ifABC", bindings = { "condition=getDoStuff()" }) > public abstract IComponent getIfABC(); > > @Component(type = "If", id = "ifDEF", bindings = { "condition=getDoStuff()" }) > public abstract IComponent getIfDEF(); > > @Component(type = "If", id = "ifGHI", bindings = { "condition=getDoStuff()" }) > public abstract IComponent getIfGHI(); > > @InitialValue("0") > public abstract int getNumber(); > > @Component(type = "Insert", id = "wtfisgoingon", bindings = { > "value=getNumber()" }) > public abstract IComponent getWTFisgoingon(); > > public abstract void setNumber(int n); > } > > > > plain.html > > > > Hi XYZ > Hi ABC > Hi DEF > Hi GHI > > > > > > plain.page is an empty page spec. > > Output: > INFO: Server startup in 3645 ms > plain: getDoStuff() 1 > plain: getDoStuff() 2 > plain: getDoStuff() 3 > plain: getDoStuff() 4 > plain: getDoStuff() 5 > plain: getDoStuff() 6 > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / JEE Consulting
Re: [Tap 4.1.2] Problem with repeated calls to an If component
Ugh. This is a big pain now. I have a huge dynamic form that has lots of IFs, and I can see the same queries being called 3 times or more. =( Everything still works, it's just about 3 times slower. If anyone has solved this problem please let me know! On 5/17/07, Daniel Jue <[EMAIL PROTECTED]> wrote: Here is another example when more than one IF component is used. It seems the conditional for the first IF gets called 3 times, then the others just get called once. plain.java: package com.phy6.app; import org.apache.tapestry.IComponent; import org.apache.tapestry.annotations.Component; import org.apache.tapestry.annotations.InitialValue; import org.apache.tapestry.html.BasePage; public abstract class plain extends BasePage { public boolean getDoStuff() { this.setNumber(this.getNumber() + 1); System.out.println("plain: getDoStuff() " + this.getNumber()); return false; } @Component(type = "If", id = "ifXYZ", bindings = { "condition=getDoStuff()" }) public abstract IComponent getIfXYZ(); @Component(type = "If", id = "ifABC", bindings = { "condition=getDoStuff()" }) public abstract IComponent getIfABC(); @Component(type = "If", id = "ifDEF", bindings = { "condition=getDoStuff()" }) public abstract IComponent getIfDEF(); @Component(type = "If", id = "ifGHI", bindings = { "condition=getDoStuff()" }) public abstract IComponent getIfGHI(); @InitialValue("0") public abstract int getNumber(); @Component(type = "Insert", id = "wtfisgoingon", bindings = { "value=getNumber()" }) public abstract IComponent getWTFisgoingon(); public abstract void setNumber(int n); } plain.html Hi XYZ Hi ABC Hi DEF Hi GHI plain.page is an empty page spec. Output: INFO: Server startup in 3645 ms plain: getDoStuff() 1 plain: getDoStuff() 2 plain: getDoStuff() 3 plain: getDoStuff() 4 plain: getDoStuff() 5 plain: getDoStuff() 6 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: localization oddity
Hi there, I had the same problem with German umlauts not rendering correctly. Have a look at the character encoding of your files. I converted all my files to UTF-8 and since then all the labels (regardless in which message file) render correctly. Best regards Daniel On 10.05.2007, at 11:43, Jesse Kuhnert wrote: Not much - and definitely not anything that would be related to what you are seeingSo if you see an oddity that would explain it it has to in there, or your copy && paste of the characters didn't come through ok in the new file,. On 5/9/07, Eric Schneider <[EMAIL PROTECTED]> wrote: I'm still using 4.0.2. Not sure how much has changed since then. e. On 5/9/07, Jesse Kuhnert <[EMAIL PROTECTED]> wrote: > > I don't know what version you are on but most of that happens in here: > > > http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry- framework/src/java/org/apache/tapestry/services/impl/ ComponentMessagesSourceImpl.java?view=markup > > I haven't changed things ~too~ much in 4.1.2 but there are slight > differences...Reading the code leads me to believe that the namespace > properties (ie the global) would be read from the same service...In fact I > know it is since I added something in for appfuse to be able to place them > in different locations. > > Maybe you'll see a slight difference in component vs. namespace reading in > there? If you do let me know. > > On 5/9/07, Eric Schneider <[EMAIL PROTECTED]> wrote: > > > > Thanks for the tip, I'll give it shot. > > > > I'm still very curious about why it would behave differently. :-| > > > > e. > > > > On 5/9/07, Michael Maier <[EMAIL PROTECTED]> wrote: > > > > > > I wonder that 'recap_label=Récapitulation' works... > > > > > > try > > > > > > man native2ascii > > > > > > *.properties are invented by english speaking man, so everything is > > > ascii...:-) > > > > > > maybe this will help > > > > > > > > > Am 10.05.2007 um 00:16 schrieb Eric Schneider: > > > > > > > I'm in the process of moving my page and component message bundles > > > > into a > > > > global file. In the long run this seems like a much more manageable > > > > approach. But, I'm seeing some results that I didn't expect. > > > > > > > > For example, moving "recap_label=Récapitulation" from a page > > > > property file > > > > to the global property file causes the label to render differently. > > > > > > > > When it was in the _fr.properties file it would render in the > > > > browser > > > > properly, "Récapitulation". When being pulled from the global file > > > > (_fr.properties) it would render like "RÈcapitulation". > > > > > > > > Another example of the oddness, "RÉSERVATION BLESSÉE" renders as > > > > "R…SERVATION BLESS…E" from the global properties file. > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > -- > Jesse Kuhnert > Tapestry/Dojo team member/developer > > Open source based consulting work centered around > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com > -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Cobertura?
Sorry if I was inexact; I'm shifting gears too constantly. On 5/17/07, Joel Wiegman <[EMAIL PROTECTED]> wrote: I think you mean the 1.7 version of Cobertura itself, not the plugin. Version 2.0 of the plugin (which is what I'm using) uses Cobertura version 1.7. So is this a Tapestry issue or a Cobertura issue (or even a plugin issue)? Lots of class instrumentation going on! -Original Message- From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] Sent: Thursday, May 17, 2007 12:53 PM To: Tapestry users Subject: Re: T5: Cobertura? It could be the version; I've been sticking to the 1.7 version of the plugin as 1.8 doesn't work (at least, not for Tapestry apps). On 5/17/07, Joel Wiegman <[EMAIL PROTECTED]> wrote: > > Hello all, > > I'm using the Cobertura (via the Maven plug-in) to execute some web > app coverage tests. I'm seeing the T5 "PageTester" unit tests pass, > but the same tests fail during the Cobertura coverage test. I end up > seeing variations of java.lang.VerifyErrors and > java.lang.ClassFormatErrors (example below). Not sure if this is a > Cobertura problem or a Tapestry problem, but I was looking for someone > to share my grief or possibly even offer a solution. > > Is anyone using Cobertura to test coverage of their Tapestry 5 > "PageTester" unit tests? If so, would you mind posting the pertinent > sections of your pom.xml? > > Many thanks! > > Joel > > > Tapestry 5.0.5-SNAPSHOT > JDK 6.0 > Maven 2.0.6 > Cobertura-Maven-Plugin 2.0 > > Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.797 > sec <<< FAILURE! > testStoreHierarchy(com.btservices.storeportal.pages.status.TestStart) > Time elapsed: 0.36 sec <<< FAILURE! > java.lang.VerifyError: (class: > com/btservices/storeportal/pages/status/Start, method: determineStatus > signature: > (Lcom/btservices/storeportal/data/StoreStatusCode;)Lorg/apache/tapestr > y/ > Asset;) Illegal constant pool index > at java.lang.Class.getDeclaredConstructors0(Native Method) > at > java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) > at java.lang.Class.getConstructors(Class.java:1459) > at > org.apache.tapestry.internal.services.ReflectiveInstantiator.findConst > ru > ctor(ReflectiveInstantiator.java:65) > at > org.apache.tapestry.internal.services.ReflectiveInstantiator.(Re > fl > ectiveInstantiator.java:53) > at > org.apache.tapestry.internal.services.InternalClassTransformationImpl. > cr > eateInstantiator(InternalClassTransformationImpl.java:1227) > at > org.apache.tapestry.internal.services.ComponentClassTransformerImpl.cr > ea > teInstantiator(ComponentClassTransformerImpl.java:151) > at > $ComponentClassTransformer_1129a4c95be.createInstantiator($ComponentCl > as > sTransformer_1129a4c95be.java) > at > org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl. > fi > ndInstantiator(ComponentInstantiatorSourceImpl.java:242) > at > $ComponentInstantiatorSource_1129a4c95ae.findInstantiator($ComponentIn > st > antiatorSource_1129a4c95ae.java) > at > org.apache.tapestry.internal.services.PageElementFactoryImpl.newRootCo > mp > onentElement(PageElementFactoryImpl.java:199) > at > $PageElementFactory_1129a4c95c1.newRootComponentElement($PageElementFa > ct > ory_1129a4c95c1.java) > at > org.apache.tapestry.internal.services.PageLoaderProcessor.loadRootComp > on > ent(PageLoaderProcessor.java:408) > at > org.apache.tapestry.internal.services.PageLoaderProcessor.loadPage(Pag > eL > oaderProcessor.java:393) > at > org.apache.tapestry.internal.services.PageLoaderImpl.loadPage(PageLoad > er > Impl.java:62) > at > $PageLoader_1129a4c95bf.loadPage($PageLoader_1129a4c95bf.java) > at > org.apache.tapestry.internal.services.PagePoolImpl.checkout(PagePoolIm > pl > .java:63) > at $PagePool_1129a4c95b5.checkout($PagePool_1129a4c95b5.java) > at > org.apache.tapestry.internal.services.RequestPageCacheImpl.getByClassN > am > e(RequestPageCacheImpl.java:58) > at > org.apache.tapestry.internal.services.RequestPageCacheImpl.get(Request > Pa > geCacheImpl.java:49) > at > $RequestPageCache_1129a4c95ad.get($RequestPageCache_1129a4c95ad.java) > at > $RequestPageCache_1129a4c95ac.get($RequestPageCache_1129a4c95ac.java) > at > org.apache.tapestry.internal.services.PageLinkHandlerImpl.handle(PageL > in > kHandlerImpl.java:57) > at > $PageLinkHandler_1129a4c95a3.handle($PageLinkHandler_1129a4c95a3.java) > at > org.apache.tapestry.test.pagelevel.PageLinkInvoker.invoke(PageLinkInvo > ke > r.java:61) > at > org.apache.tapestry.test.pagelevel.PageTester.invoke(PageTester.java:2 > 14 > ) > at > org.apache.tapestry.test.pagelevel.PageTester.renderPage(PageTester.ja > va > :182) > at > com.btservices.storeportal.pages.status.TestStart.testStoreHierarchy(T > es > tStart.java:112) > > > -
Re: [Tap 4.1.2] Problem with repeated calls to an If component
Here is another example when more than one IF component is used. It seems the conditional for the first IF gets called 3 times, then the others just get called once. plain.java: package com.phy6.app; import org.apache.tapestry.IComponent; import org.apache.tapestry.annotations.Component; import org.apache.tapestry.annotations.InitialValue; import org.apache.tapestry.html.BasePage; public abstract class plain extends BasePage { public boolean getDoStuff() { this.setNumber(this.getNumber() + 1); System.out.println("plain: getDoStuff() " + this.getNumber()); return false; } @Component(type = "If", id = "ifXYZ", bindings = { "condition=getDoStuff()" }) public abstract IComponent getIfXYZ(); @Component(type = "If", id = "ifABC", bindings = { "condition=getDoStuff()" }) public abstract IComponent getIfABC(); @Component(type = "If", id = "ifDEF", bindings = { "condition=getDoStuff()" }) public abstract IComponent getIfDEF(); @Component(type = "If", id = "ifGHI", bindings = { "condition=getDoStuff()" }) public abstract IComponent getIfGHI(); @InitialValue("0") public abstract int getNumber(); @Component(type = "Insert", id = "wtfisgoingon", bindings = { "value=getNumber()" }) public abstract IComponent getWTFisgoingon(); public abstract void setNumber(int n); } plain.html Hi XYZ Hi ABC Hi DEF Hi GHI plain.page is an empty page spec. Output: INFO: Server startup in 3645 ms plain: getDoStuff() 1 plain: getDoStuff() 2 plain: getDoStuff() 3 plain: getDoStuff() 4 plain: getDoStuff() 5 plain: getDoStuff() 6 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Tap 411] Friendly urls and images
How are the js, images, css folders made web accessible? Perhaps you can use the base tag ( http://www.w3schools.com/tags/tag_base.asp ) ? If you're using the @Shell component, you can take a look at the renderBaseTag parameter ( http://tapestry.apache.org/tapestry4.1/components/general/shell.html ) and the http://tapestry.apache.org/tapestry4.1/tapestry-framework/hivedoc/service/tapestry.url.BaseTagWriter.html service which you can override. On 5/17/07, Thomas Wiz <[EMAIL PROTECTED]> wrote: Hi all, I've created a encoder in my hivemodule.xml file to have friendly urls like " www.mysite.com/pages/path/to/page/". It works and I can decode the path after "/pages", but I have problems with images, stylesheets and js files included in my pages. The HTML template is in a directory called "templates/" and the other files are linked in the .html with a relative path and are located in sub directories ("images/", "css/", "js/"). My service encoder activates the template correctly, but of course the template can't reach files with relative paths. Is there a way to tell the template to create absolute paths from relative ones on the fly? I have a lot of templates (with a lot of images) and it would be a problem to hard code all the assets in the .page file... Thanks for your help -- View this message in context: http://www.nabble.com/-Tap-411--Friendly-urls-and-images-tf3773662.html#a10670082 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / JEE Consulting
RE: T5: Cobertura?
I think you mean the 1.7 version of Cobertura itself, not the plugin. Version 2.0 of the plugin (which is what I'm using) uses Cobertura version 1.7. So is this a Tapestry issue or a Cobertura issue (or even a plugin issue)? Lots of class instrumentation going on! -Original Message- From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] Sent: Thursday, May 17, 2007 12:53 PM To: Tapestry users Subject: Re: T5: Cobertura? It could be the version; I've been sticking to the 1.7 version of the plugin as 1.8 doesn't work (at least, not for Tapestry apps). On 5/17/07, Joel Wiegman <[EMAIL PROTECTED]> wrote: > > Hello all, > > I'm using the Cobertura (via the Maven plug-in) to execute some web > app coverage tests. I'm seeing the T5 "PageTester" unit tests pass, > but the same tests fail during the Cobertura coverage test. I end up > seeing variations of java.lang.VerifyErrors and > java.lang.ClassFormatErrors (example below). Not sure if this is a > Cobertura problem or a Tapestry problem, but I was looking for someone > to share my grief or possibly even offer a solution. > > Is anyone using Cobertura to test coverage of their Tapestry 5 > "PageTester" unit tests? If so, would you mind posting the pertinent > sections of your pom.xml? > > Many thanks! > > Joel > > > Tapestry 5.0.5-SNAPSHOT > JDK 6.0 > Maven 2.0.6 > Cobertura-Maven-Plugin 2.0 > > Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.797 > sec <<< FAILURE! > testStoreHierarchy(com.btservices.storeportal.pages.status.TestStart) > Time elapsed: 0.36 sec <<< FAILURE! > java.lang.VerifyError: (class: > com/btservices/storeportal/pages/status/Start, method: determineStatus > signature: > (Lcom/btservices/storeportal/data/StoreStatusCode;)Lorg/apache/tapestr > y/ > Asset;) Illegal constant pool index > at java.lang.Class.getDeclaredConstructors0(Native Method) > at > java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) > at java.lang.Class.getConstructors(Class.java:1459) > at > org.apache.tapestry.internal.services.ReflectiveInstantiator.findConst > ru > ctor(ReflectiveInstantiator.java:65) > at > org.apache.tapestry.internal.services.ReflectiveInstantiator.(Re > fl > ectiveInstantiator.java:53) > at > org.apache.tapestry.internal.services.InternalClassTransformationImpl. > cr > eateInstantiator(InternalClassTransformationImpl.java:1227) > at > org.apache.tapestry.internal.services.ComponentClassTransformerImpl.cr > ea > teInstantiator(ComponentClassTransformerImpl.java:151) > at > $ComponentClassTransformer_1129a4c95be.createInstantiator($ComponentCl > as > sTransformer_1129a4c95be.java) > at > org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl. > fi > ndInstantiator(ComponentInstantiatorSourceImpl.java:242) > at > $ComponentInstantiatorSource_1129a4c95ae.findInstantiator($ComponentIn > st > antiatorSource_1129a4c95ae.java) > at > org.apache.tapestry.internal.services.PageElementFactoryImpl.newRootCo > mp > onentElement(PageElementFactoryImpl.java:199) > at > $PageElementFactory_1129a4c95c1.newRootComponentElement($PageElementFa > ct > ory_1129a4c95c1.java) > at > org.apache.tapestry.internal.services.PageLoaderProcessor.loadRootComp > on > ent(PageLoaderProcessor.java:408) > at > org.apache.tapestry.internal.services.PageLoaderProcessor.loadPage(Pag > eL > oaderProcessor.java:393) > at > org.apache.tapestry.internal.services.PageLoaderImpl.loadPage(PageLoad > er > Impl.java:62) > at > $PageLoader_1129a4c95bf.loadPage($PageLoader_1129a4c95bf.java) > at > org.apache.tapestry.internal.services.PagePoolImpl.checkout(PagePoolIm > pl > .java:63) > at $PagePool_1129a4c95b5.checkout($PagePool_1129a4c95b5.java) > at > org.apache.tapestry.internal.services.RequestPageCacheImpl.getByClassN > am > e(RequestPageCacheImpl.java:58) > at > org.apache.tapestry.internal.services.RequestPageCacheImpl.get(Request > Pa > geCacheImpl.java:49) > at > $RequestPageCache_1129a4c95ad.get($RequestPageCache_1129a4c95ad.java) > at > $RequestPageCache_1129a4c95ac.get($RequestPageCache_1129a4c95ac.java) > at > org.apache.tapestry.internal.services.PageLinkHandlerImpl.handle(PageL > in > kHandlerImpl.java:57) > at > $PageLinkHandler_1129a4c95a3.handle($PageLinkHandler_1129a4c95a3.java) > at > org.apache.tapestry.test.pagelevel.PageLinkInvoker.invoke(PageLinkInvo > ke > r.java:61) > at > org.apache.tapestry.test.pagelevel.PageTester.invoke(PageTester.java:2 > 14 > ) > at > org.apache.tapestry.test.pagelevel.PageTester.renderPage(PageTester.ja > va > :182) > at > com.btservices.storeportal.pages.status.TestStart.testStoreHierarchy(T > es > tStart.java:112) > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands
[Tap 411] Friendly urls and images
Hi all, I've created a encoder in my hivemodule.xml file to have friendly urls like " www.mysite.com/pages/path/to/page/". It works and I can decode the path after "/pages", but I have problems with images, stylesheets and js files included in my pages. The HTML template is in a directory called "templates/" and the other files are linked in the .html with a relative path and are located in sub directories ("images/", "css/", "js/"). My service encoder activates the template correctly, but of course the template can't reach files with relative paths. Is there a way to tell the template to create absolute paths from relative ones on the fly? I have a lot of templates (with a lot of images) and it would be a problem to hard code all the assets in the .page file... Thanks for your help -- View this message in context: http://www.nabble.com/-Tap-411--Friendly-urls-and-images-tf3773662.html#a10670082 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Tap 4.1.2] Problem with repeated calls to an If component
Glad to know I'm not alone. I've simplified the problem code even more, to eliminate any confusion: plain.java: package com.phy6.app; import org.apache.tapestry.IComponent; import org.apache.tapestry.annotations.Component; import org.apache.tapestry.annotations.InitialValue; import org.apache.tapestry.html.BasePage; public abstract class plain extends BasePage { public boolean getDoStuff() { this.setNumber(this.getNumber() + 1); System.out.println("plain: getDoStuff() " + this.getNumber()); return false; } @Component(type = "If", id = "ifXYZ", bindings = { "condition=getDoStuff()" }) public abstract IComponent getIfXYZ(); @InitialValue("0") public abstract int getNumber(); @Component(type="Insert",id="wtfisgoingon",bindings={"value=getNumber()"}) public abstract IComponent getWTFisgoingon(); public abstract void setNumber(int n); } plain.html: Hi plain.page is still an empty page spec. Same output: May 17, 2007 1:57:40 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 5328 ms plain: getDoStuff() 1 plain: getDoStuff() 2 plain: getDoStuff() 3 Daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Cobertura?
It could be the version; I've been sticking to the 1.7 version of the plugin as 1.8 doesn't work (at least, not for Tapestry apps). On 5/17/07, Joel Wiegman <[EMAIL PROTECTED]> wrote: Hello all, I'm using the Cobertura (via the Maven plug-in) to execute some web app coverage tests. I'm seeing the T5 "PageTester" unit tests pass, but the same tests fail during the Cobertura coverage test. I end up seeing variations of java.lang.VerifyErrors and java.lang.ClassFormatErrors (example below). Not sure if this is a Cobertura problem or a Tapestry problem, but I was looking for someone to share my grief or possibly even offer a solution. Is anyone using Cobertura to test coverage of their Tapestry 5 "PageTester" unit tests? If so, would you mind posting the pertinent sections of your pom.xml? Many thanks! Joel Tapestry 5.0.5-SNAPSHOT JDK 6.0 Maven 2.0.6 Cobertura-Maven-Plugin 2.0 Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.797 sec <<< FAILURE! testStoreHierarchy(com.btservices.storeportal.pages.status.TestStart) Time elapsed: 0.36 sec <<< FAILURE! java.lang.VerifyError: (class: com/btservices/storeportal/pages/status/Start, method: determineStatus signature: (Lcom/btservices/storeportal/data/StoreStatusCode;)Lorg/apache/tapestry/ Asset;) Illegal constant pool index at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructors(Class.java:1459) at org.apache.tapestry.internal.services.ReflectiveInstantiator.findConstru ctor(ReflectiveInstantiator.java:65) at org.apache.tapestry.internal.services.ReflectiveInstantiator.(Refl ectiveInstantiator.java:53) at org.apache.tapestry.internal.services.InternalClassTransformationImpl.cr eateInstantiator(InternalClassTransformationImpl.java:1227) at org.apache.tapestry.internal.services.ComponentClassTransformerImpl.crea teInstantiator(ComponentClassTransformerImpl.java:151) at $ComponentClassTransformer_1129a4c95be.createInstantiator($ComponentClas sTransformer_1129a4c95be.java) at org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl.fi ndInstantiator(ComponentInstantiatorSourceImpl.java:242) at $ComponentInstantiatorSource_1129a4c95ae.findInstantiator($ComponentInst antiatorSource_1129a4c95ae.java) at org.apache.tapestry.internal.services.PageElementFactoryImpl.newRootComp onentElement(PageElementFactoryImpl.java:199) at $PageElementFactory_1129a4c95c1.newRootComponentElement($PageElementFact ory_1129a4c95c1.java) at org.apache.tapestry.internal.services.PageLoaderProcessor.loadRootCompon ent(PageLoaderProcessor.java:408) at org.apache.tapestry.internal.services.PageLoaderProcessor.loadPage(PageL oaderProcessor.java:393) at org.apache.tapestry.internal.services.PageLoaderImpl.loadPage(PageLoader Impl.java:62) at $PageLoader_1129a4c95bf.loadPage($PageLoader_1129a4c95bf.java) at org.apache.tapestry.internal.services.PagePoolImpl.checkout(PagePoolImpl .java:63) at $PagePool_1129a4c95b5.checkout($PagePool_1129a4c95b5.java) at org.apache.tapestry.internal.services.RequestPageCacheImpl.getByClassNam e(RequestPageCacheImpl.java:58) at org.apache.tapestry.internal.services.RequestPageCacheImpl.get(RequestPa geCacheImpl.java:49) at $RequestPageCache_1129a4c95ad.get($RequestPageCache_1129a4c95ad.java) at $RequestPageCache_1129a4c95ac.get($RequestPageCache_1129a4c95ac.java) at org.apache.tapestry.internal.services.PageLinkHandlerImpl.handle(PageLin kHandlerImpl.java:57) at $PageLinkHandler_1129a4c95a3.handle($PageLinkHandler_1129a4c95a3.java) at org.apache.tapestry.test.pagelevel.PageLinkInvoker.invoke(PageLinkInvoke r.java:61) at org.apache.tapestry.test.pagelevel.PageTester.invoke(PageTester.java:214 ) at org.apache.tapestry.test.pagelevel.PageTester.renderPage(PageTester.java :182) at com.btservices.storeportal.pages.status.TestStart.testStoreHierarchy(Tes tStart.java:112) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com
Re: [Tap 4.1.2] Problem with repeated calls to an If component
I have noticed similar things happening in my code on the 4.1.2 snapshot as well. Trying to debug the issue I'm having w/ DatePicker (different thread) I added a conditional to the page, and used your strategy of counting @If calls just to see what I get. The first time I load the page, on the very first display, my page shows that the conditional was called 4 times. Every time I submit the form, and it redisplays, the conditional is called only one time. I am actually very hopeful that the solution to this problem, will also yield a solution to other problems I am seeing that are very hard to replicate that involve nested components throwing OGNL null pointer exceptions when I know for a fact that the data should exist. For completeness, my template: consoleEnabled="ognl:true"> Test: You picked format="ognl:format.numericDate" /> Current Number: And my controller package com.starpoint.instihire.web.tapestry.page; import org.apache.log4j.Logger; import org.apache.tapestry.annotations.Component; import org.apache.tapestry.annotations.EventListener; import org.apache.tapestry.annotations.Meta; import org.apache.tapestry.annotations.InitialValue; import org.apache.tapestry.event.BrowserEvent; import org.apache.tapestry.event.PageEvent; import org.apache.tapestry.event.PageBeginRenderListener; import org.apache.tapestry.form.TextField; import java.util.Date; @Meta("permissions=ANY") public abstract class Test extends ProtectedPage implements PageBeginRenderListener { public static final Logger logger = Logger.getLogger(Test.class); public abstract Date getTheDate(); public abstract void setTheDate(final Date theDate); @InitialValue("0") public abstract int getNumber(); public abstract void setNumber(int n); public void submit() { } public boolean getShowTheDate() { setNumber(getNumber() + 1); return getTheDate() != null; } } I hope this helpful. As always, thanks again Tony Daniel Jue wrote: Hi, I experienced this problem after upgrading from Tap 4.1 to Tap 4.1.2 Snapshot. The problem is that I have an IF component that is being called 3 times, when it should only be called once. I have extracted the problem into a simpler page for examination: plain.page: http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";> plain.java: package com.phy6.app; import javax.servlet.ServletContext; import org.apache.tapestry.IComponent; import org.apache.tapestry.annotations.Component; import org.apache.tapestry.annotations.InitialValue; import org.apache.tapestry.annotations.InjectObject; import org.apache.tapestry.annotations.InjectStateFlag; import org.apache.tapestry.html.BasePage; public abstract class plain extends BasePage { /** * @return a boolean indicating if the the user is logged in */ @InjectStateFlag("user") public abstract boolean getUserExists(); @InitialValue("0") public abstract int getNumber(); public abstract void setNumber(int n); /** * @return the servlet context */ @InjectObject("service:tapestry.globals.ServletContext") public abstract ServletContext getServletContext(); @Component(type = "If", id = "ifUserIsLoggedIn", bindings = { "condition=getUserIsLoggedIn()" }) public abstract IComponent getIfUserIsLoggedIn(); /** * @return a boolean indicating whether or not a user is logged in. */ public boolean getUserIsLoggedIn() { setNumber(getNumber() + 1); System.out.println("plain: getUserIsLoggedIn() " + getNumber()); return getUserExists(); } @Component(type="Insert",id="wtfisgoingon",bindings={"value=getNumber()"}) public abstract IComponent getWTFisgoingon(); } plain.html: Hi Output to console: INFO: Server startup in 3966 ms plain: getUserIsLoggedIn() 1 plain: getUserIsLoggedIn() 2 plain: getUserIsLoggedIn() 3 Output to browser: 3 Note that I've stripped the code down. There is no way for the user to exist in this example, I'm simply reloading the page when the server starts. (Tomcat 5.5.23) This code was part of my Home.page, which decides whether or not to display a login component or greet the user. How can I get it to only check the IF component once? (or better yet, why is it called three times?) Daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hopefully an easy one
No, it will accept user input as: 5/17/07 which gets translated in my queries to 5/17/0007 and causes hibernate to self destruct. If a user enters 5/17/07 I expect an error to be raise, but alas, no. Thanks Tony Andreas Andreou wrote: doesn't translator="translator:date,pattern=MM/dd/" work? On 5/17/07, Tony Nelson <[EMAIL PROTECTED]> wrote: I have a simple DatePicker All that I want to do is verify that the user entered the date as MM/DD/. What is the correct validator to use in this situation? Thanks again Tony Nelson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hopefully an easy one
doesn't translator="translator:date,pattern=MM/dd/" work? On 5/17/07, Tony Nelson <[EMAIL PROTECTED]> wrote: I have a simple DatePicker All that I want to do is verify that the user entered the date as MM/DD/. What is the correct validator to use in this situation? Thanks again Tony Nelson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / JEE Consulting
[Tap 4.1.2] Problem with repeated calls to an If component
Hi, I experienced this problem after upgrading from Tap 4.1 to Tap 4.1.2 Snapshot. The problem is that I have an IF component that is being called 3 times, when it should only be called once. I have extracted the problem into a simpler page for examination: plain.page: http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";> plain.java: package com.phy6.app; import javax.servlet.ServletContext; import org.apache.tapestry.IComponent; import org.apache.tapestry.annotations.Component; import org.apache.tapestry.annotations.InitialValue; import org.apache.tapestry.annotations.InjectObject; import org.apache.tapestry.annotations.InjectStateFlag; import org.apache.tapestry.html.BasePage; public abstract class plain extends BasePage { /** * @return a boolean indicating if the the user is logged in */ @InjectStateFlag("user") public abstract boolean getUserExists(); @InitialValue("0") public abstract int getNumber(); public abstract void setNumber(int n); /** * @return the servlet context */ @InjectObject("service:tapestry.globals.ServletContext") public abstract ServletContext getServletContext(); @Component(type = "If", id = "ifUserIsLoggedIn", bindings = { "condition=getUserIsLoggedIn()" }) public abstract IComponent getIfUserIsLoggedIn(); /** * @return a boolean indicating whether or not a user is logged in. */ public boolean getUserIsLoggedIn() { setNumber(getNumber() + 1); System.out.println("plain: getUserIsLoggedIn() " + getNumber()); return getUserExists(); } @Component(type="Insert",id="wtfisgoingon",bindings={"value=getNumber()"}) public abstract IComponent getWTFisgoingon(); } plain.html: Hi Output to console: INFO: Server startup in 3966 ms plain: getUserIsLoggedIn() 1 plain: getUserIsLoggedIn() 2 plain: getUserIsLoggedIn() 3 Output to browser: 3 Note that I've stripped the code down. There is no way for the user to exist in this example, I'm simply reloading the page when the server starts. (Tomcat 5.5.23) This code was part of my Home.page, which decides whether or not to display a login component or greet the user. How can I get it to only check the IF component once? (or better yet, why is it called three times?) Daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 5.0.5-SNAPSHOTS
Howard Lewis Ship gmail.com> writes: > > I've been making a number of important T5 bug fixes; I've just uploaded the > latest snapshots to http://people.apache.org/~hlship/tapestry-repository/ > > Feedback is always welcome! > T5.0.5 did not solve the problem of Chinese https://issues.apache.org/jira/browse/TAPESTRY-1294 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Hopefully an easy one
I have a simple DatePicker value="ognl:tradeSearchKeys.receivedTimesheetForWeekEnding" translator="translator:date,pattern=M/d/" validators="validators:required" displayName="As of Date"/> All that I want to do is verify that the user entered the date as MM/DD/. What is the correct validator to use in this situation? Thanks again Tony Nelson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 5.0.5-SNAPSHOTS
Howard Lewis Ship gmail.com> writes: > > I've been making a number of important T5 bug fixes; I've just uploaded the > latest snapshots to http://people.apache.org/~hlship/tapestry-repository/ > > Feedback is always welcome! > T5.0.5 did not solve the problem of Chinese - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What is the Quick Start to start AJAX in T5 ???
From what I last read from Howard, "The AJAX story is yet to be written, everything up till now has been positioning", or something like that. Sorry, I wish I could have jumped from Tap 4.0 to Tap 5 and gained AJAX functionality as well. =) Howard recommended 4.1 for people that need AJAX stuff now. And I've read that Jesse felt a little guilty regarding the bait-and-switch nature of the 4.1.x series -- seems like you end up needing 4.1.2 snapshots in order to get some of the fixes. And in order to keep up with everyone else, it seemed like the way to go was to integrate maven to download all the necessary dependencies/versions. It was a bit of a pain to get it to play nice with my existing project, Eclipse WTP, and Tomcat (loading from workspace), but it was worth it. Only took me a week or so! =/ On 5/17/07, Eko S.W. <[EMAIL PROTECTED]> wrote: I quite confused. And wondering. How can I start AJAX in T5??? What is the option? How can I integrate ... (CMIIW) Dojo/Sciptaculuous/etc/etc/ Can anyone point me to the right direction regarding AJAX in T5? Say, I would like to create Pop Up Form, Dynamically changing Table, etc, etc. Thanks in advance!!! -- Best wishes, Eko SW http://swdev.blogs.friendster.com/my_blog/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 5.0.5-SNAPSHOTS
I found what was my problem. I was using the filter org.apache.tapestry.TapestryFilter instead of org.apache.tapestry.spring.TapestrySpringFilter I am now getting this exception which is the same problem reported by Nick Westgate java.lang.RuntimeException: Exception constructing service 'ServletApplicationInitializer': Unable to instantiate class org.apache.tapestry.services.TapestryModule as a module builder: Error creating bean with name 'txProxyTemplate': Bean definition is abstract Petros petros wrote: > > I have a problem in T5.0.4 when I am changing from @[EMAIL PROTECTED] to > @[EMAIL PROTECTED] > > CODE THAT WORKS > LayoutCmpnt.html > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> > >type="text/css"/> > > > LayoutCmpnt.java > public class LayoutCmpnt > { > @InjectPage > private Login loginPage; > > @Inject > @Path("context:styles/style.css") > private Asset styleCSS; > . > > Login.java > public class Login > { > @Inject > @SpringBean("UserManager") > private UserManager userManager; > ... > CODE THAT DOESN'T WORK > Login.java > @Inject > @Service("UserManager") > private UserManager userManager; > > gives me the following error when I am trying to access LayoutCmpnt.html > > Could not convert 'prop:styleCSS' into a component parameter binding: > java.lang.NoClassDefFoundError: > com/glintech/jumpstart/tapestry/pages/Login > > Do I have to register my Spring Beans as services? Can anyone point me to > the right direction ? > > > texomaleo wrote: >> >> No problem. I've got it all going. Nice to have a parsimonious way >> to inject from the web context directory. I can pile all my images >> and css up in there for static pages outside Tapestry. >> >> Bill >> >> On 5/16/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote: >>> Sorry, yes. That's a change in 5.0.4, you must have been using 5.0.3. >>> >>> Injection got a LOT smarter, and a bit different, between 5.0.3 and >>> 5.0.4. >>> Lots of influence from Guice; basically, for service injections, we make >>> injecting by type the standard, and injecting by name a rarely used >>> option. >>> Further, there's a lot more infrastructure to allow other combinations, >>> such >>> as injecting based on combinations of field type and other annotatoins >>> (here >>> Asset for the type, @Path as the annotation). >>> >>> On 5/16/07, Bill Holloway <[EMAIL PROTECTED]> wrote: >>> > >>> > gurg! All my @Injects("...") just broke! Guess I need to use @Path >>> with >>> > it? >>> > >>> > On 5/16/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote: >>> > > I've been making a number of important T5 bug fixes; I've just >>> uploaded >>> > the >>> > > latest snapshots to >>> > http://people.apache.org/~hlship/tapestry-repository/ >>> > > >>> > > Feedback is always welcome! >>> > > >>> > > -- >>> > > Howard M. Lewis Ship >>> > > TWD Consulting, Inc. >>> > > Independent J2EE / Open-Source Java Consultant >>> > > Creator and PMC Chair, Apache Tapestry >>> > > Creator, Apache HiveMind >>> > > >>> > > Professional Tapestry training, mentoring, support >>> > > and project work. http://howardlewisship.com >>> > > >>> > >>> > >>> > -- >>> > "The future is here. It's just not evenly distributed yet." >>> > >>> > -- Traditional >>> > >>> > - >>> > To unsubscribe, e-mail: [EMAIL PROTECTED] >>> > For additional commands, e-mail: [EMAIL PROTECTED] >>> > >>> > >>> >>> >>> -- >>> Howard M. Lewis Ship >>> TWD Consulting, Inc. >>> Independent J2EE / Open-Source Java Consultant >>> Creator and PMC Chair, Apache Tapestry >>> Creator, Apache HiveMind >>> >>> Professional Tapestry training, mentoring, support >>> and project work. http://howardlewisship.com >>> >> >> >> -- >> "The future is here. It's just not evenly distributed yet." >> >> -- Traditional >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > -- View this message in context: http://www.nabble.com/5.0.5-SNAPSHOTS-tf3767704.html#a10665745 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Injecting RequestGlobals
Ok I'm pulling my hair out here. This used to work fine in java 5 and annotations but since having to go back to page specs I can't seem to pass parameters to components. This worked fine before java: @Parameter public abstract String getInclude(); html: Now I have changed the code to this java: public abstract String getInclude(); public abstract void setInclude(String include); jspInclude.jwc: ... Unfortunately include always is null. What seems to be wrong here? On 5/16/07, Jesse Kuhnert <[EMAIL PROTECTED]> wrote: That's probably because HttpServletRequest is a type of javax.servlet.http.HttpServletRequest and not RequestGlobals. I would change your inject tag to look more like: public abstract HttpServletRequest getRequest(); Starting with tapestry >= 4.1 you can also just skip the tag altogether as most services can be autowired. On 5/16/07, Chris Chiappone <[EMAIL PROTECTED]> wrote: > > Oh and I've also tried making the getters and setters abstract and > that didn't work either. > > On 5/16/07, Chris Chiappone <[EMAIL PROTECTED]> wrote: > > I have been forced to downgrade my application that I've started to > > java 1.4 for the time being and am trying to inject a hivemind service > > but don't seem to be doing it right because the object I am trying to > > get injected seems to be null > > > > In my component spec i have the following: > > > > > object="service:tapestry.globals.HttpServletRequest" > > type="org.apache.tapestry.services.RequestGlobals"/> > > > > and in my java class i have: > > > > private RequestGlobals requestGlobals; > > > > > > public RequestGlobals getRequestGlobals() { > > return requestGlobals; > > } > > > > > > public void setRequestGlobals(RequestGlobals requestGlobals) { > > this.requestGlobals = requestGlobals; > > } > > > > > > Thanks, > > > > -- > > ~chris > > > > > -- > ~chris > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com -- ~chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5: Cobertura?
Hello all, I'm using the Cobertura (via the Maven plug-in) to execute some web app coverage tests. I'm seeing the T5 "PageTester" unit tests pass, but the same tests fail during the Cobertura coverage test. I end up seeing variations of java.lang.VerifyErrors and java.lang.ClassFormatErrors (example below). Not sure if this is a Cobertura problem or a Tapestry problem, but I was looking for someone to share my grief or possibly even offer a solution. Is anyone using Cobertura to test coverage of their Tapestry 5 "PageTester" unit tests? If so, would you mind posting the pertinent sections of your pom.xml? Many thanks! Joel Tapestry 5.0.5-SNAPSHOT JDK 6.0 Maven 2.0.6 Cobertura-Maven-Plugin 2.0 Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.797 sec <<< FAILURE! testStoreHierarchy(com.btservices.storeportal.pages.status.TestStart) Time elapsed: 0.36 sec <<< FAILURE! java.lang.VerifyError: (class: com/btservices/storeportal/pages/status/Start, method: determineStatus signature: (Lcom/btservices/storeportal/data/StoreStatusCode;)Lorg/apache/tapestry/ Asset;) Illegal constant pool index at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructors(Class.java:1459) at org.apache.tapestry.internal.services.ReflectiveInstantiator.findConstru ctor(ReflectiveInstantiator.java:65) at org.apache.tapestry.internal.services.ReflectiveInstantiator.(Refl ectiveInstantiator.java:53) at org.apache.tapestry.internal.services.InternalClassTransformationImpl.cr eateInstantiator(InternalClassTransformationImpl.java:1227) at org.apache.tapestry.internal.services.ComponentClassTransformerImpl.crea teInstantiator(ComponentClassTransformerImpl.java:151) at $ComponentClassTransformer_1129a4c95be.createInstantiator($ComponentClas sTransformer_1129a4c95be.java) at org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl.fi ndInstantiator(ComponentInstantiatorSourceImpl.java:242) at $ComponentInstantiatorSource_1129a4c95ae.findInstantiator($ComponentInst antiatorSource_1129a4c95ae.java) at org.apache.tapestry.internal.services.PageElementFactoryImpl.newRootComp onentElement(PageElementFactoryImpl.java:199) at $PageElementFactory_1129a4c95c1.newRootComponentElement($PageElementFact ory_1129a4c95c1.java) at org.apache.tapestry.internal.services.PageLoaderProcessor.loadRootCompon ent(PageLoaderProcessor.java:408) at org.apache.tapestry.internal.services.PageLoaderProcessor.loadPage(PageL oaderProcessor.java:393) at org.apache.tapestry.internal.services.PageLoaderImpl.loadPage(PageLoader Impl.java:62) at $PageLoader_1129a4c95bf.loadPage($PageLoader_1129a4c95bf.java) at org.apache.tapestry.internal.services.PagePoolImpl.checkout(PagePoolImpl .java:63) at $PagePool_1129a4c95b5.checkout($PagePool_1129a4c95b5.java) at org.apache.tapestry.internal.services.RequestPageCacheImpl.getByClassNam e(RequestPageCacheImpl.java:58) at org.apache.tapestry.internal.services.RequestPageCacheImpl.get(RequestPa geCacheImpl.java:49) at $RequestPageCache_1129a4c95ad.get($RequestPageCache_1129a4c95ad.java) at $RequestPageCache_1129a4c95ac.get($RequestPageCache_1129a4c95ac.java) at org.apache.tapestry.internal.services.PageLinkHandlerImpl.handle(PageLin kHandlerImpl.java:57) at $PageLinkHandler_1129a4c95a3.handle($PageLinkHandler_1129a4c95a3.java) at org.apache.tapestry.test.pagelevel.PageLinkInvoker.invoke(PageLinkInvoke r.java:61) at org.apache.tapestry.test.pagelevel.PageTester.invoke(PageTester.java:214 ) at org.apache.tapestry.test.pagelevel.PageTester.renderPage(PageTester.java :182) at com.btservices.storeportal.pages.status.TestStart.testStoreHierarchy(Tes tStart.java:112) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 5.0.5-SNAPSHOTS
Your use spring 1.x,please use spring2.x. 2007/5/17, Nick Westgate <[EMAIL PROTECTED]>: Howard Lewis Ship wrote: > Please follow the directions on the tapestry-spring home page: > http://tapestry.apache.org/tapestry5/tapestry-spring/ > > It has changed significantly from 5.0.3 ... and simpler. Spring beans now > look just like Tapestry IoC services, can be autowires into services, etc. > @SpringBean isn't used any more. It does look better, but breaks the stock Spring setup I was working with. (Works fine with 5.0.4 and uses Spring 1.2.8.) I followed the tapestry-spring docs but got an abstract bean exception. The IOC makes it too time-consuming to dig into this right now, but the bean definitions, injection and top of the exception trace follow. Cheers, Nick. applicationContext.xml: ... ... ... Start.java: ... @Inject private AccountService _accountService; ... Exception trace: 20:15:10.453 ERROR! [main] org.apache.tapestry.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:64) >14> Construction of service ServletApplicationInitializer failed: Unable to instantiate class org.apache.tapestry.services.TapestryModule as a module builder: Error creating bean with name 'baseTransactionProxy': Bean definition is abstract java.lang.RuntimeException: Unable to instantiate class org.apache.tapestry.services.TapestryModule as a module builder: Error creating bean with name 'baseTransactionProxy': Bean definition is abstract at org.apache.tapestry.ioc.internal.ModuleImpl.instantiateModuleBuilder(ModuleImpl.java:348) at org.apache.tapestry.ioc.internal.ModuleImpl.getModuleBuilder(ModuleImpl.java:273) at org.apache.tapestry.ioc.internal.ServiceResourcesImpl.getModuleBuilder(ServiceResourcesImpl.java:106) at org.apache.tapestry.ioc.internal.ServiceBuilderMethodInvoker.createObject(ServiceBuilderMethodInvoker.java:60) at org.apache.tapestry.ioc.internal.SingletonServiceLifecycle.createService(SingletonServiceLifecycle.java:31) at org.apache.tapestry.ioc.internal.LifecycleWrappedServiceCreator.createObject(LifecycleWrappedServiceCreator.java:49) at org.apache.tapestry.ioc.internal.InterceptorStackBuilder.createObject(InterceptorStackBuilder.java:54) at org.apache.tapestry.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:60) at org.apache.tapestry.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:61) at $ServletApplicationInitializer_11299bf9751._delegate($ServletApplicationInitializer_11299bf9751.java) at $ServletApplicationInitializer_11299bf9751.initializeApplication($ServletApplicationInitializer_11299bf9751.java) at org.apache.tapestry.TapestryFilter.init(TapestryFilter.java:85) at org.mortbay.jetty.servlet.FilterHolder.start(FilterHolder.java:71) at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplicationHandler.java:310) at org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContext.java:509) at org.mortbay.util.Container.start(Container.java:72) at org.mortbay.http.HttpServer.doStart(HttpServer.java:708) at org.mortbay.util.Container.start(Container.java:72) at com.iw.plugins.jettyrunner.PluginRunner.launch(PluginRunner.java:282) at com.iw.plugins.jettyrunner.PluginRunner.launch(PluginRunner.java:104) at com.iw.plugins.jettyrunner.PluginRunner.main(PluginRunner.java:75) Caused by: org.springframework.beans.factory.BeanIsAbstractException: Error creating bean with name 'baseTransactionProxy': Bean definition is abstract at org.springframework.beans.factory.support.AbstractBeanFactory.checkMergedBeanDefinition(AbstractBeanFactory.java:767) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:220) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:537) at org.apache.tapestry.internal.spring.SpringModuleDef$1.getBean(SpringModuleDef.java:41) at org.apache.tapestry.internal.spring.SpringModuleDef$1.getServiceInterface(SpringModuleDef.java:62) at org.apache.tapestry.ioc.internal.ModuleImpl.findServiceIdsForInterface(ModuleImpl.java:148) at org.apache.tapestry.ioc.internal.RegistryImpl.findServiceIdsForInterface(RegistryImpl.java:498) at org.apache.tapestry.ioc.internal.RegistryImpl.getService(RegistryImpl.java:467) at org.apache.tapestry.ioc.internal.ObjectLocatorImpl.getService(ObjectLocatorImpl.java:45) at org.apache.tapestry.ioc.services.TapestryIOCModule$2.provide(TapestryIOCModule.java:13
Re: 5.0.5-SNAPSHOTS
Looks like we need to filter out abstract beans, which may be a problem because of the Spring APIs. On 5/17/07, Nick Westgate <[EMAIL PROTECTED]> wrote: Howard Lewis Ship wrote: > Please follow the directions on the tapestry-spring home page: > http://tapestry.apache.org/tapestry5/tapestry-spring/ > > It has changed significantly from 5.0.3 ... and simpler. Spring beans now > look just like Tapestry IoC services, can be autowires into services, etc. > @SpringBean isn't used any more. It does look better, but breaks the stock Spring setup I was working with. (Works fine with 5.0.4 and uses Spring 1.2.8.) I followed the tapestry-spring docs but got an abstract bean exception. The IOC makes it too time-consuming to dig into this right now, but the bean definitions, injection and top of the exception trace follow. Cheers, Nick. applicationContext.xml: ... ... ... Start.java: ... @Inject private AccountService _accountService; ... Exception trace: 20:15:10.453 ERROR! [main] org.apache.tapestry.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject (RecursiveServiceCreationCheckWrapper.java:64) >14> Construction of service ServletApplicationInitializer failed: Unable to instantiate class org.apache.tapestry.services.TapestryModule as a module builder: Error creating bean with name 'baseTransactionProxy': Bean definition is abstract java.lang.RuntimeException: Unable to instantiate class org.apache.tapestry.services.TapestryModule as a module builder: Error creating bean with name 'baseTransactionProxy': Bean definition is abstract at org.apache.tapestry.ioc.internal.ModuleImpl.instantiateModuleBuilder( ModuleImpl.java:348) at org.apache.tapestry.ioc.internal.ModuleImpl.getModuleBuilder( ModuleImpl.java:273) at org.apache.tapestry.ioc.internal.ServiceResourcesImpl.getModuleBuilder( ServiceResourcesImpl.java:106) at org.apache.tapestry.ioc.internal.ServiceBuilderMethodInvoker.createObject( ServiceBuilderMethodInvoker.java:60) at org.apache.tapestry.ioc.internal.SingletonServiceLifecycle.createService( SingletonServiceLifecycle.java:31) at org.apache.tapestry.ioc.internal.LifecycleWrappedServiceCreator.createObject (LifecycleWrappedServiceCreator.java:49) at org.apache.tapestry.ioc.internal.InterceptorStackBuilder.createObject( InterceptorStackBuilder.java:54) at org.apache.tapestry.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject (RecursiveServiceCreationCheckWrapper.java:60) at org.apache.tapestry.ioc.internal.services.JustInTimeObjectCreator.createObject (JustInTimeObjectCreator.java:61) at $ServletApplicationInitializer_11299bf9751._delegate($ServletApplicationInitializer_11299bf9751.java) at $ServletApplicationInitializer_11299bf9751.initializeApplication($ServletApplicationInitializer_11299bf9751.java) at org.apache.tapestry.TapestryFilter.init(TapestryFilter.java:85) at org.mortbay.jetty.servlet.FilterHolder.start(FilterHolder.java :71) at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets( WebApplicationHandler.java:310) at org.mortbay.jetty.servlet.WebApplicationContext.doStart( WebApplicationContext.java:509) at org.mortbay.util.Container.start(Container.java:72) at org.mortbay.http.HttpServer.doStart(HttpServer.java:708) at org.mortbay.util.Container.start(Container.java:72) at com.iw.plugins.jettyrunner.PluginRunner.launch( PluginRunner.java:282) at com.iw.plugins.jettyrunner.PluginRunner.launch( PluginRunner.java:104) at com.iw.plugins.jettyrunner.PluginRunner.main(PluginRunner.java :75) Caused by: org.springframework.beans.factory.BeanIsAbstractException: Error creating bean with name 'baseTransactionProxy': Bean definition is abstract at org.springframework.beans.factory.support.AbstractBeanFactory.checkMergedBeanDefinition (AbstractBeanFactory.java:767) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean( AbstractBeanFactory.java:220) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean( AbstractBeanFactory.java:145) at org.springframework.context.support.AbstractApplicationContext.getBean( AbstractApplicationContext.java:537) at org.apache.tapestry.internal.spring.SpringModuleDef$1.getBean( SpringModuleDef.java:41) at org.apache.tapestry.internal.spring.SpringModuleDef$1.getServiceInterface( SpringModuleDef.java:62) at org.apache.tapestry.ioc.internal.ModuleImpl.findServiceIdsForInterface( ModuleImpl.java:148) at org.apache.tapestry.ioc.internal.RegistryImpl.findServiceIdsForInterface( RegistryImpl.java:498) at org.apache.tapestry.ioc.internal.RegistryImpl.getService( RegistryImpl.java:467) at org.apache.tapestry.ioc.internal.ObjectLocatorImpl.getService( ObjectLocatorImpl.java:45) at org.apache.tapestry.ioc.ser
Re: 5.0.5-SNAPSHOTS
Howard Lewis Ship wrote: Please follow the directions on the tapestry-spring home page: http://tapestry.apache.org/tapestry5/tapestry-spring/ It has changed significantly from 5.0.3 ... and simpler. Spring beans now look just like Tapestry IoC services, can be autowires into services, etc. @SpringBean isn't used any more. It does look better, but breaks the stock Spring setup I was working with. (Works fine with 5.0.4 and uses Spring 1.2.8.) I followed the tapestry-spring docs but got an abstract bean exception. The IOC makes it too time-consuming to dig into this right now, but the bean definitions, injection and top of the exception trace follow. Cheers, Nick. applicationContext.xml: ... ... ... Start.java: ... @Inject private AccountService _accountService; ... Exception trace: 20:15:10.453 ERROR! [main] org.apache.tapestry.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:64) >14> Construction of service ServletApplicationInitializer failed: Unable to instantiate class org.apache.tapestry.services.TapestryModule as a module builder: Error creating bean with name 'baseTransactionProxy': Bean definition is abstract java.lang.RuntimeException: Unable to instantiate class org.apache.tapestry.services.TapestryModule as a module builder: Error creating bean with name 'baseTransactionProxy': Bean definition is abstract at org.apache.tapestry.ioc.internal.ModuleImpl.instantiateModuleBuilder(ModuleImpl.java:348) at org.apache.tapestry.ioc.internal.ModuleImpl.getModuleBuilder(ModuleImpl.java:273) at org.apache.tapestry.ioc.internal.ServiceResourcesImpl.getModuleBuilder(ServiceResourcesImpl.java:106) at org.apache.tapestry.ioc.internal.ServiceBuilderMethodInvoker.createObject(ServiceBuilderMethodInvoker.java:60) at org.apache.tapestry.ioc.internal.SingletonServiceLifecycle.createService(SingletonServiceLifecycle.java:31) at org.apache.tapestry.ioc.internal.LifecycleWrappedServiceCreator.createObject(LifecycleWrappedServiceCreator.java:49) at org.apache.tapestry.ioc.internal.InterceptorStackBuilder.createObject(InterceptorStackBuilder.java:54) at org.apache.tapestry.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:60) at org.apache.tapestry.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:61) at $ServletApplicationInitializer_11299bf9751._delegate($ServletApplicationInitializer_11299bf9751.java) at $ServletApplicationInitializer_11299bf9751.initializeApplication($ServletApplicationInitializer_11299bf9751.java) at org.apache.tapestry.TapestryFilter.init(TapestryFilter.java:85) at org.mortbay.jetty.servlet.FilterHolder.start(FilterHolder.java:71) at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplicationHandler.java:310) at org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContext.java:509) at org.mortbay.util.Container.start(Container.java:72) at org.mortbay.http.HttpServer.doStart(HttpServer.java:708) at org.mortbay.util.Container.start(Container.java:72) at com.iw.plugins.jettyrunner.PluginRunner.launch(PluginRunner.java:282) at com.iw.plugins.jettyrunner.PluginRunner.launch(PluginRunner.java:104) at com.iw.plugins.jettyrunner.PluginRunner.main(PluginRunner.java:75) Caused by: org.springframework.beans.factory.BeanIsAbstractException: Error creating bean with name 'baseTransactionProxy': Bean definition is abstract at org.springframework.beans.factory.support.AbstractBeanFactory.checkMergedBeanDefinition(AbstractBeanFactory.java:767) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:220) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:537) at org.apache.tapestry.internal.spring.SpringModuleDef$1.getBean(SpringModuleDef.java:41) at org.apache.tapestry.internal.spring.SpringModuleDef$1.getServiceInterface(SpringModuleDef.java:62) at org.apache.tapestry.ioc.internal.ModuleImpl.findServiceIdsForInterface(ModuleImpl.java:148) at org.apache.tapestry.ioc.internal.RegistryImpl.findServiceIdsForInterface(RegistryImpl.java:498) at org.apache.tapestry.ioc.internal.RegistryImpl.getService(RegistryImpl.java:467) at org.apache.tapestry.ioc.internal.ObjectLocatorImpl.getService(ObjectLocatorImpl.java:45) at org.apache.tapestry.ioc.services.TapestryIOCModule$2.provide(TapestryIOCModule.java:132) at $ObjectProvider_11299bf975a.provide($ObjectProvider_11299bf975a.java) at $ObjectProvider
Re: T5: New Validators and server side validation
We just introduced client side validation for Tapestry fields using an ajax call back to the server side (with Tapestry 3). So you only write Java code for the validation and the same code gets called from the client side. All parameters for controlling your validation are automatically sent back as part of the ajax call and you can define when the check is triggered (e.g. onBlur) and which one of the "error marker" components tied to the input field will show the errors. Makes the code very clean and the front-end experience is slick (e.g. registration page has the same validator to check if username is taken and this is fired from the client and from the server!). I'd suggest T5 move to such a design. - Original Message - From: "Bill Holloway" <[EMAIL PROTECTED]> To: "Tapestry users" Sent: Wednesday, May 16, 2007 2:27 PM Subject: Re: T5: New Validators and server side validation That's got it, Ben. Thanks. Wish I knew more about javascript prototyping. Too much technology to stay familiar with. Bill On 5/16/07, Ben Sommerville <[EMAIL PROTECTED]> wrote: Bill, This > pageRenderSupport.addScript( > "Tapestry.Field.email('%s', %s);", > field.getClientId(), > quote(buildMessage(formatter, field))); does not construct a function validating emails. What it is doing is inserting a function call to register a particular field for validation. On the page sent to the client you would get something like That is the source of your error message, the Tapestry.Field.email function does not exist but you are trying to call it. What you need to do is define the email validation function yourself in a javascript file. I would add it to a different namespace so that it is clear it is not a standard Tapestry function. e.g. in myproject-valdation.js var MyProject = {}; MyProject.Field = { email: function(field, message) { Tapestry.addValidator(field, false, function(value, event) { if( X ) { event.recordError(message) } }); } } where is the javascript to test if "value" is a valid email address. Add a script include to your border/page (to load your validation function) and change the render method to use MyProject.Field.email and you are good to go cheers. -- Ben Sommerville > -Original Message- > From: Bill Holloway [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 16 May 2007 4:33 PM > To: Tapestry users > Subject: Re: T5: New Validators and server side validation > > In implementing an e-mail validator myself, one thing I notice in all > this is a Javascript error that reads > > Error: Tapestry.Field.email is not a function... > > I did some digging and found in org/apache/tapestry/tapestry.js the > building up of the Tapestry object has in it a section involving > "Collection of field based functions related to validation." In that > part of the object prototyping (I guess), each of the built-in > validation types (required, minlength, maxlength, min, and max) has a > function assigned that, essentially, duplicates the functionality of > the Java-based validators. All that prototyping must be for the > client-side functionality. > > So I'm wondering why my AppModule-provided EmailValidator class' > render() method isn't contributing the script. Its code is > > pageRenderSupport.addScript( > "Tapestry.Field.email('%s', %s);", > field.getClientId(), > quote(buildMessage(formatter, field))); > > Since I implementing something for render(), I would think that at > least some kind of function for Tapestry.Field.email would show up > (even if it has the wrong number of fields, etc), knocking out the > "...is not a function" error. > > Bill > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- "The future is here. It's just not evenly distributed yet." -- Traditional - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can I set a T5 page to return to another page dynamically?
Have a look at this http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html Eko S.W. wrote: > > That is to say, I have CrmsHome.java and I would like it to go to > SharedDelete.java, so in CrmsHome I would like to do : > ... > SharedDelete _deletePage; > ... > _deletePage.setBackPage(this); > > > But ... in SharedDelete, ... I can not injectPage that BackPage isn't??? > ( T5 said it is read only property) > > What is the solution > > -- > Best wishes, > Eko SW > http://swdev.blogs.friendster.com/my_blog/ > > -- View this message in context: http://www.nabble.com/Can-I-set-a-T5-page-to-return-to-another-page-dynamically--tf3771075.html#a10661889 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can I set a T5 page to return to another page dynamically?
Geee, that was fast! Okay, I'll try it!!! -- Best wishes, Eko SW http://swdev.blogs.friendster.com/my_blog/
Re: Can I set a T5 page to return to another page dynamically?
On 5/17/07, Massimo Lusetti <[EMAIL PROTECTED]> wrote: On 5/17/07, Eko S.W. <[EMAIL PROTECTED]> wrote: > What is the solution return an Object type. Probably you can even use the name of the page as a String. -- Massimo http://meridio.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
What is the Quick Start to start AJAX in T5 ???
I quite confused. And wondering. How can I start AJAX in T5??? What is the option? How can I integrate ... (CMIIW) Dojo/Sciptaculuous/etc/etc/ Can anyone point me to the right direction regarding AJAX in T5? Say, I would like to create Pop Up Form, Dynamically changing Table, etc, etc. Thanks in advance!!! -- Best wishes, Eko SW http://swdev.blogs.friendster.com/my_blog/
Re: Can I set a T5 page to return to another page dynamically?
On 5/17/07, Eko S.W. <[EMAIL PROTECTED]> wrote: What is the solution return an Object type. -- Massimo http://meridio.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can T5 have FrameSet as its HTML Template???
I haven't code it yet, and just thinking ... Can I create T5 page that resembled a Frameset HTML component? Mmy current solution to solve it, is just one page, with all the header and left navigation, with to show/hide certain page. This works well, but I don't think the Web Designer going to like it... But, T5 really great!!! I really like the @ApplicationState and @Persist annotation. It solve (and hide) a lots of HTTP smell ^_^ CMMIW ( I'm just a newbie here ) -- Best wishes, Eko SW http://swdev.blogs.friendster.com/my_blog/
Can I set a T5 page to return to another page dynamically?
That is to say, I have CrmsHome.java and I would like it to go to SharedDelete.java, so in CrmsHome I would like to do : ... SharedDelete _deletePage; ... _deletePage.setBackPage(this); But ... in SharedDelete, ... I can not injectPage that BackPage isn't??? ( T5 said it is read only property) What is the solution -- Best wishes, Eko SW http://swdev.blogs.friendster.com/my_blog/
Re: Tapestry5 ready for use in a new project?
I Just started T5. And ... great! From my --newbie-- opinion : it looks like I'm not coding to HTTP application at all Seems like another GUI ... CMIIW * for the most part, I like one Java class per HTML page idea. Feels like HTML is just complementary to The View (Java Class) -- Best wishes, Eko SW http://swdev.blogs.friendster.com/my_blog/
Re: 5.0.5-SNAPSHOTS
I have a problem in T5.0.4 when I am changing from @[EMAIL PROTECTED] to @[EMAIL PROTECTED] CODE THAT WORKS LayoutCmpnt.html http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> LayoutCmpnt.java public class LayoutCmpnt { @InjectPage private Login loginPage; @Inject @Path("context:styles/style.css") private Asset styleCSS; . Login.java public class Login { @Inject @SpringBean("UserManager") private UserManager userManager; ... CODE THAT DOESN'T WORK Login.java @Inject @Service("UserManager") private UserManager userManager; gives me the following error when I am trying to access LayoutCmpnt.html Could not convert 'prop:styleCSS' into a component parameter binding: java.lang.NoClassDefFoundError: com/glintech/jumpstart/tapestry/pages/Login Do I have to register my Spring Beans as services? Can anyone point me to the right direction ? texomaleo wrote: > > No problem. I've got it all going. Nice to have a parsimonious way > to inject from the web context directory. I can pile all my images > and css up in there for static pages outside Tapestry. > > Bill > > On 5/16/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote: >> Sorry, yes. That's a change in 5.0.4, you must have been using 5.0.3. >> >> Injection got a LOT smarter, and a bit different, between 5.0.3 and >> 5.0.4. >> Lots of influence from Guice; basically, for service injections, we make >> injecting by type the standard, and injecting by name a rarely used >> option. >> Further, there's a lot more infrastructure to allow other combinations, >> such >> as injecting based on combinations of field type and other annotatoins >> (here >> Asset for the type, @Path as the annotation). >> >> On 5/16/07, Bill Holloway <[EMAIL PROTECTED]> wrote: >> > >> > gurg! All my @Injects("...") just broke! Guess I need to use @Path >> with >> > it? >> > >> > On 5/16/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote: >> > > I've been making a number of important T5 bug fixes; I've just >> uploaded >> > the >> > > latest snapshots to >> > http://people.apache.org/~hlship/tapestry-repository/ >> > > >> > > Feedback is always welcome! >> > > >> > > -- >> > > Howard M. Lewis Ship >> > > TWD Consulting, Inc. >> > > Independent J2EE / Open-Source Java Consultant >> > > Creator and PMC Chair, Apache Tapestry >> > > Creator, Apache HiveMind >> > > >> > > Professional Tapestry training, mentoring, support >> > > and project work. http://howardlewisship.com >> > > >> > >> > >> > -- >> > "The future is here. It's just not evenly distributed yet." >> > >> > -- Traditional >> > >> > - >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > >> > >> >> >> -- >> Howard M. Lewis Ship >> TWD Consulting, Inc. >> Independent J2EE / Open-Source Java Consultant >> Creator and PMC Chair, Apache Tapestry >> Creator, Apache HiveMind >> >> Professional Tapestry training, mentoring, support >> and project work. http://howardlewisship.com >> > > > -- > "The future is here. It's just not evenly distributed yet." > > -- Traditional > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/5.0.5-SNAPSHOTS-tf3767704.html#a10660243 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]