Unsubscribing
How do I unsubscribe from this mailing list? I've tried all of these addresses but the mails keep bouncing back. [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unsubscribing
Hello, Look at the end of this email ;o) [quote] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] [/quote] Just send a n empty email at [EMAIL PROTECTED] .apache.org 2006/7/17, Nima B [EMAIL PROTECTED]: How do I unsubscribe from this mailing list? I've tried all of these addresses but the mails keep bouncing back. [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Keeping the original url after submit
Hello, I have a page which is requested through a DirectLink. This page contains a form listener: public void onSubmit(). The problem: When the form is successfully submitted, the URL for the newly reloaded page lacks the service/listener parameters that were present in the originall request to this page. Is there a way to tell Tapestry to use the 'original' url upon a successfull submit? Thanks for your time! /Firas
Dynamically adding pages to T3 application
Hi everybody, we have a rather large application that runs with homegrown framework and that we will migrate to tapestry. Since spindle is not available for tap 4 yet it has been decided to start with t3 and later move to t4. The problem is that this application is based on a modular design and modules can be added and removed in runtime. Modules contain business logic and pages. So the question is if it is possible somehow to add/remove tapestry pages in runtime ... I would be very grateful for hints or pointers to possible solutions how to accomplish this. Cheers, Detlef - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Keeping the original url after submit
I got it! But the solution is rather low-level. First, I had to modify my form listener to return an ILink: public ILink onSubmit() Then, I had to create the ILink using LinkFactoryImpl: @InjectObject(service:tapestry.globals.WebRequest) public abstract WebRequest getWebRequest(); @InjectObject(engine-service:direct) public abstract IEngineService getService(); // Somewhere in the page class: MapString, Object params = new HashMapString, Object(1); params.put(ServiceConstants.PARAMETER, getRequestCycle().getListenerParameters()); LinkFactoryImpl linkFactory = new LinkFactoryImpl(); DataSqueezerImpl dataSqueezer = new DataSqueezerImpl(); dataSqueezer.register(new StringAdaptor()); linkFactory.setDataSqueezer(dataSqueezer); linkFactory.setContributions(Collections.EMPTY_LIST); linkFactory.setContextPath(getWebRequest().getContextPath()); ErrorLog errorLog = new ErrorLogImpl(new DefaultErrorHandler(), LogFactory .getLog(MyPageClass.class)); linkFactory.setErrorLog(errorLog); linkFactory.setRequest(getWebRequest()); linkFactory.setRequestCycle(getRequestCycle()); linkFactory.setServletPath(getWebRequest().getActivationPath()); linkFactory.initializeService(); ILink iLink = linkFactory.constructLink(getService(), false, params, false); That was a lot of code don't you think? But here's a question: how do you make sure this 'original' ILink is not lost/overridden betwing requests, especially if your page uses validators? I found a solution for that too. If you need help with this, drop me a line and I'll gladly help. Regards!
Re: Keeping the original url after submit
I think there is another solution more simple and handle by Tapestry. I think you can declare a page version as accessible directly from outside using a static URL and Tapestry serialize the page as a static page. Check this page : http://tapestry.apache.org/tapestry4/tapestry/ComponentReference/ExternalLink.html 2006/7/17, Firas A. [EMAIL PROTECTED]: I got it! But the solution is rather low-level. First, I had to modify my form listener to return an ILink: public ILink onSubmit() Then, I had to create the ILink using LinkFactoryImpl: @InjectObject(service:tapestry.globals.WebRequest) public abstract WebRequest getWebRequest(); @InjectObject(engine-service:direct) public abstract IEngineService getService(); // Somewhere in the page class: MapString, Object params = new HashMapString, Object(1); params.put(ServiceConstants.PARAMETER, getRequestCycle().getListenerParameters()); LinkFactoryImpl linkFactory = new LinkFactoryImpl(); DataSqueezerImpl dataSqueezer = new DataSqueezerImpl(); dataSqueezer.register(new StringAdaptor()); linkFactory.setDataSqueezer(dataSqueezer); linkFactory.setContributions(Collections.EMPTY_LIST); linkFactory.setContextPath(getWebRequest().getContextPath()); ErrorLog errorLog = new ErrorLogImpl(new DefaultErrorHandler(), LogFactory .getLog(MyPageClass.class)); linkFactory.setErrorLog(errorLog); linkFactory.setRequest(getWebRequest()); linkFactory.setRequestCycle(getRequestCycle()); linkFactory.setServletPath(getWebRequest().getActivationPath()); linkFactory.initializeService(); ILink iLink = linkFactory.constructLink(getService(), false, params, false); That was a lot of code don't you think? But here's a question: how do you make sure this 'original' ILink is not lost/overridden betwing requests, especially if your page uses validators? I found a solution for that too. If you need help with this, drop me a line and I'll gladly help. Regards!
Re: Navigational Menu
Generating links usually involves using the engine service for the link type you want created. If it is the PageService then I would inject that ( tapestry.services.Page) and call getLink() on it. On 7/17/06, Peter Dawn [EMAIL PROTECTED] wrote: I have been trying to integrate the krysalis menu for the last few days. however its proving to be a real pain. customisation is so difficult and i dont know how to link to pages in other frames. if were using html i would specify the frame name, but how should i do that here. so i have decided to go with a plain straightforward javascript menu. now the question is how can i link to my tapestry pages using normal links. has anybody experienced the same issues and is there another fix. navigation through a complex site is pretty important, so without a navigational menu the site is un-usable. any thoughts guys. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
Generic application wide formats
Hi all I'm a little new to Tapestry so I may be missing something, happy for anybody to point me in the right direction. I'm currently running Tapestry 4.0.2 I want to standardise my date format for the entire application to dd/MM/. I decided that the best place to do this while allowing for internationalisation is to add it to my app.properties file. I added a few other formats while I was there, so I had something like the following: # Generic formats format_date=dd/MM/ format_time=HH:mm format_pct0=##0% format_pct2=##0.##% format_currency=$#,###,##0.00 Then I found that in order to display a date in this format I was writing 7 lines of java code for each page where a date was displayed (most of them)...along with 1 more line in the .page file for each date to be displayed. When I wanted to edit a date again using this format I had 4 lines per page and 1 line per field. This only provides the most basic of editing (I haven't allowed for any error processing yet) and while the number of lines is not large it did seem to me that there were different methods being employed to format the date for display and others for edit and validation. As I began, I may have missed something but it does seem a little messy at the moment. Does anybody have a better method of achieving this generic formating? Wouldn't it be nice ifI could specify formats in my message catalogue and then simply apply them to my components with a single line of code? eg a) displaying a date value: component id=dateField type=Insert binding name=value value=myclass.mydate/ binding name=format value=message:format_date/ /component b) editing a date value: component id=dateField type=DatePicker binding name=displayName value=message:mydate_label/ binding name=value value=myclass.mydate/ binding name=format value=message:format_date/ binding name=validators value=validators:required/ /component Is this possible? FOCUS Computing - web design Mob: 0415 24 26 24 [EMAIL PROTECTED] http://www.focus-computing.com.au -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.1/389 - Release Date: 14/07/2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Navigational Menu
Dump Krysalis and use JS Cook Menu. It is much easier to customise and also allows better integration with your java code for generation. I tried Kysalis initially but then I wanted to show different options for different users - it was very difficult to customise. I then tried JS Cook Menu and have never looked back. So much easier to use. Cheers mc On 17 Jul 2006 at 15:15, Peter Dawn wrote: I have been trying to integrate the krysalis menu for the last few days. however its proving to be a real pain. customisation is so difficult and i dont know how to link to pages in other frames. if were using html i would specify the frame name, but how should i do that here. so i have decided to go with a plain straightforward javascript menu. now the question is how can i link to my tapestry pages using normal links. has anybody experienced the same issues and is there another fix. navigation through a complex site is pretty important, so without a navigational menu the site is un-usable. any thoughts guys. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FOCUS Computing - web design Mob: 0415 24 26 24 [EMAIL PROTECTED] http://www.focus-computing.com.au -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.1/389 - Release Date: 14/07/2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Template header DOCTYPE
Ok for the select ;-) But what about the tr in a table? table tr tdHeader 1/td tdHeader 2/td tdHeader 3/td /tr span jwcid=@My2TrJwc tr tdsomething/td tdto put/td tdsomewhere here/td /tr tr tdData info 1/td tdData info M/td tdData info 3X/td /tr /span tr td colspan=3Footer/td /tr /table 2006/7/17, Murray Collingwood [EMAIL PROTECTED]: For a select control use SelectionModel to pass the options to your component. Then you don't need any @For loop in your html. In your table component you could code your Tapestry on the tr statement. eg table... tr jwcid=xx Cheers mc On 17 Jul 2006 at 11:13, Blackwings wrote: Hi, I noticed something interresting about DOCTYPE. In fact, if a designer give me a XHTML1.0 transitional compliant html template, when I mark the tag and add some tags span the html is not anymore compliant : select jwcid=[EMAIL PROTECTED] id=searchCriteria.requester name= searchCriteria.requester size=1 tabindex=6 class=comboBox9pt span jwcid=@Foreach source=ognl:requesters value=ognl: searchCriteria.requester option value=1 jwcid=@Option label=ognl: requesters.requesterCode elem1/option option value=2 jwcid=$remove$elem2/option option value=3 jwcid=$remove$elem3/option option value=4 jwcid=$remove$elem4/option /span /select The span cannot be place after a select and this is warned. I have the same problem when I want to mark a bloc of tr, not all, in a table. I have to put a span tag between to a /tr and a tr that is not permit by the DOCTYPE definition, normally. Is there another DOCTYPE that manage Tapestry template or do we have to let the warn like that? FOCUS Computing - web design Mob: 0415 24 26 24 [EMAIL PROTECTED] http://www.focus-computing.com.au -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.1/389 - Release Date: 14/07/2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Template header DOCTYPE
If you are writing data to a table use contrib:Table and never look back. Another absolutely fabulous component that I now use on every single table I ever create. Cheers mc On 17 Jul 2006 at 15:47, Blackwings wrote: Ok for the select ;-) But what about the tr in a table? table tr tdHeader 1/td tdHeader 2/td tdHeader 3/td /tr span jwcid=@My2TrJwc tr tdsomething/td tdto put/td tdsomewhere here/td /tr tr tdData info 1/td tdData info M/td tdData info 3X/td /tr /span tr td colspan=3Footer/td /tr /table 2006/7/17, Murray Collingwood [EMAIL PROTECTED]: For a select control use SelectionModel to pass the options to your component. Then you don't need any @For loop in your html. In your table component you could code your Tapestry on the tr statement. eg table... tr jwcid=xx Cheers mc On 17 Jul 2006 at 11:13, Blackwings wrote: Hi, I noticed something interresting about DOCTYPE. In fact, if a designer give me a XHTML1.0 transitional compliant html template, when I mark the tag and add some tags span the html is not anymore compliant : select jwcid=[EMAIL PROTECTED] id=searchCriteria.requester name= searchCriteria.requester size=1 tabindex=6 class=comboBox9pt span jwcid=@Foreach source=ognl:requesters value=ognl: searchCriteria.requester option value=1 jwcid=@Option label=ognl: requesters.requesterCode elem1/option option value=2 jwcid=$remove$elem2/option option value=3 jwcid=$remove$elem3/option option value=4 jwcid=$remove$elem4/option /span /select The span cannot be place after a select and this is warned. I have the same problem when I want to mark a bloc of tr, not all, in a table. I have to put a span tag between to a /tr and a tr that is not permit by the DOCTYPE definition, normally. Is there another DOCTYPE that manage Tapestry template or do we have to let the warn like that? FOCUS Computing - web design Mob: 0415 24 26 24 [EMAIL PROTECTED] http://www.focus-computing.com.au -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.1/389 - Release Date: 14/07/2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FOCUS Computing - web design Mob: 0415 24 26 24 [EMAIL PROTECTED] http://www.focus-computing.com.au -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.1/389 - Release Date: 14/07/2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Template header DOCTYPE
hi, that's true... but it's only the template... it is more important how your generated page looks like. the spans disappear in the generated page. g, kries Blackwings [EMAIL PROTECTED] mail.com An Tapestry users 17.07.2006 11:13 users@tapestry.apache.org Kopie Bitte antwortenThema an Template header DOCTYPE Tapestry users [EMAIL PROTECTED] pache.org Hi, I noticed something interresting about DOCTYPE. In fact, if a designer give me a XHTML1.0 transitional compliant html template, when I mark the tag and add some tags span the html is not anymore compliant : select jwcid=[EMAIL PROTECTED] id=searchCriteria.requester name= searchCriteria.requester size=1 tabindex=6 class=comboBox9pt span jwcid=@Foreach source=ognl:requesters value=ognl: searchCriteria.requester option value=1 jwcid=@Option label=ognl:requesters.requesterCode elem1/option option value=2 jwcid=$remove$elem2/option option value=3 jwcid=$remove$elem3/option option value=4 jwcid=$remove$elem4/option /span /select The span cannot be place after a select and this is warned. I have the same problem when I want to mark a bloc of tr, not all, in a table. I have to put a span tag between to a /tr and a tr that is not permit by the DOCTYPE definition, normally. Is there another DOCTYPE that manage Tapestry template or do we have to let the warn like that? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AccessControlException on generated classes due to missing class protection domain
Hello All, It seems that Tapestry (or Hivemind) generates invalid classes that are not associated with any ProtectionDomain, there was already a but like that http://issues.apache.org/bugzilla/show_bug.cgi?id=28202 And I presume that it was fixed, however I have similar problems right now with secured WebSphere: How can I fix this problem? What should I do with that? [7/15/06 15:22:41:049 CEST] 6642251f SecurityManag W SECJ0314W: Current Java 2 Security policy reported a potential violation of Java 2 Security Permission. Please refer to Problem Determination Guide for further information. Permission: /opt/WebSphere/AppServer/installedApps/servernameNetwork/sjrthr.ear/sjrtpg.war/WEB-INF/lib/tapestry-4.1.jar : access denied (java.io.FilePermission /opt/We bSphere/AppServer/installedApps/servernameNetwork/sjrthr.ear/sjrtpg.war/WEB-INF/lib/tapestry-4.1.jar read) Code: $ApplicationInitializer_10c725a4dba in {null code URL} Stack Trace: java.security.AccessControlException: access denied (java.io.FilePermission /opt/WebSphere/AppServer/installedApps/servernameNetwork/sjrthr.ear/sjrtpg.war/WEB-IN F/lib/tapestry-4.1.jar read) at java.security.AccessControlContext.checkPermission(AccessControlContext.java(Compiled Code)) at java.security.AccessController.checkPermission(AccessController.java(Compiled Code)) at java.lang.SecurityManager.checkPermission(SecurityManager.java(Compiled Code)) at com.ibm.ws.security.core.SecurityManager.checkPermission(SecurityManager.java(Compiled Code)) at java.lang.SecurityManager.checkRead(SecurityManager.java(Compiled Code)) at java.util.zip.ZipFile.init(ZipFile.java(Compiled Code)) at java.util.zip.ZipFile.init(ZipFile.java(Inlined Compiled Code)) at com.ibm.ws.classloader.Handler$ClassLoaderURLConnection.getInputStream(Handler.java(Compiled Code)) at java.net.URL.openStream(URL.java(Inlined Compiled Code)) at com.ibm.ws.classloader.SinglePathClassProvider.getResourceAsStream(SinglePathClassProvider.java(Inlined Compiled Code)) at com.ibm.ws.classloader.CompoundClassLoader.localGetResourceAsStream(CompoundClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.CompoundClassLoader.getResourceAsStream(CompoundClassLoader.java(Compiled Code)) at javassist.LoaderClassPath.openClassfile(LoaderClassPath.java:70) at javassist.ClassPoolTail.openClassfile(ClassPoolTail.java:283) at javassist.ClassPool.openClassfile(ClassPool.java(Inlined Compiled Code)) at javassist.CtClassType.getClassFile2(CtClassType.java(Compiled Code)) at javassist.CtClassType.subtypeOf(CtClassType.java:267) at javassist.compiler.MemberResolver.compareSignature(MemberResolver.java:203) at javassist.compiler.MemberResolver.lookupMethod(MemberResolver.java:97) at javassist.compiler.TypeChecker.atMethodCallCore(TypeChecker.java:637) at javassist.compiler.TypeChecker.atCallExpr(TypeChecker.java:614) at javassist.compiler.JvstTypeChecker.atCallExpr(JvstTypeChecker.java:156) at javassist.compiler.ast.CallExpr.accept(CallExpr.java:45) at javassist.compiler.CodeGen.doTypeCheck(CodeGen.java:235) at javassist.compiler.CodeGen.atStmnt(CodeGen.java:323) at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49) at javassist.compiler.CodeGen.atIfStmnt(CodeGen.java:384) at javassist.compiler.CodeGen.atStmnt(CodeGen.java:348) at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49) at javassist.compiler.CodeGen.atStmnt(CodeGen.java:344) at javassist.compiler.ast.Stmnt.accept(Stmnt.java:49) at javassist.compiler.CodeGen.atMethodBody(CodeGen.java:285) at javassist.compiler.Javac.compileBody(Javac.java:208) at javassist.CtBehavior.setBody(CtBehavior.java:188) at javassist.CtBehavior.setBody(CtBehavior.java:163) at org.apache.hivemind.service.impl.ClassFabImpl.addMethod(ClassFabImpl.java:288) at org.apache.hivemind.service.impl.LoggingInterceptorFactory.addServiceMethodImplementation(LoggingInterceptorFactory.java:120) at org.apache.hivemind.service.impl.LoggingInterceptorFactory.addServiceMethods(LoggingInterceptorFactory.java:159) at org.apache.hivemind.service.impl.LoggingInterceptorFactory.constructInterceptorClass(LoggingInterceptorFactory.java:214) at org.apache.hivemind.service.impl.LoggingInterceptorFactory.createInterceptor(LoggingInterceptorFactory.java:251) at org.apache.hivemind.impl.ServiceInterceptorContributionImpl.createInterceptor(ServiceInterceptorContributionImpl.java:95) at org.apache.hivemind.impl.InterceptorStackImpl.process(InterceptorStackImpl.java:116) at org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.addInterceptors(AbstractServiceModelImpl.java:85) at
A bit OT: how to manage database connections for multiple components rendered simultaneously.
Hi all This is not a pure Tapestry question, but I believe you have seen this before and might be able to give me some guiding light. I have a web application, which I am splitting into several fragments, ie, components, each one rendering content stored in a database. I just realised my index page would have 9 such fragments and if each is to retrieve a connection from the pool to get its content, the stress on the db server might be crazy, even if each request is quite short. I have a connection pool, but even with that I don't believe its healthy to use 9 connections at the same time. What about the other users? How would you deal with this issue? -- Cumprimentos, Rui Pacheco
RE: A bit OT: how to manage database connections for multiple components rendered simultaneously.
All code within one request can easily just use one connection. That's what we do with Tapernate. -Original Message- From: Rui Pacheco [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 10:13 AM To: Tapestry users; Tapestry users Subject: A bit OT: how to manage database connections for multiple components rendered simultaneously. Hi all This is not a pure Tapestry question, but I believe you have seen this before and might be able to give me some guiding light. I have a web application, which I am splitting into several fragments, ie, components, each one rendering content stored in a database. I just realised my index page would have 9 such fragments and if each is to retrieve a connection from the pool to get its content, the stress on the db server might be crazy, even if each request is quite short. I have a connection pool, but even with that I don't believe its healthy to use 9 connections at the same time. What about the other users? How would you deal with this issue? -- Cumprimentos, Rui Pacheco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Re: Generic application wide formats
this could help: http://www.nabble.com/Dynamic-translators-tf1229928.html#a3255867 define your formatter as a bean and define the pattern using message:date_pattern greetings, kris Shing Hing Man [EMAIL PROTECTED] An Tapestry users 17.07.2006 15:59 users@tapestry.apache.org Kopie Bitte antwortenThema an Re: Generic application wide Tapestry users formats [EMAIL PROTECTED] pache.org It is not very pretty. You could try the following. component id=dateField type=Insert binding name=value value=myclass.mydate/ binding name=format ognl:new java.text.SimpleDateFormat(getMessages().getMessage('format_date')) /binding /component Shing --- Murray Collingwood [EMAIL PROTECTED] wrote: Hi all I'm a little new to Tapestry so I may be missing something, happy for anybody to point me in the right direction. I'm currently running Tapestry 4.0.2 I want to standardise my date format for the entire application to dd/MM/. I decided that the best place to do this while allowing for internationalisation is to add it to my app.properties file. I added a few other formats while I was there, so I had something like the following: # Generic formats format_date=dd/MM/ format_time=HH:mm format_pct0=##0% format_pct2=##0.##% format_currency=$#,###,##0.00 Then I found that in order to display a date in this format I was writing 7 lines of java code for each page where a date was displayed (most of them)...along with 1 more line in the .page file for each date to be displayed. When I wanted to edit a date again using this format I had 4 lines per page and 1 line per field. This only provides the most basic of editing (I haven't allowed for any error processing yet) and while the number of lines is not large it did seem to me that there were different methods being employed to format the date for display and others for edit and validation. As I began, I may have missed something but it does seem a little messy at the moment. Does anybody have a better method of achieving this generic formating? Wouldn't it be nice ifI could specify formats in my message catalogue and then simply apply them to my components with a single line of code? eg a) displaying a date value: component id=dateField type=Insert binding name=value value=myclass.mydate/ binding name=format value=message:format_date/ /component b) editing a date value: component id=dateField type=DatePicker binding name=displayName value=message:mydate_label/ binding name=value value=myclass.mydate/ binding name=format value=message:format_date/ binding name=validators value=validators:required/ /component Is this possible? FOCUS Computing - web design Mob: 0415 24 26 24 [EMAIL PROTECTED] http://www.focus-computing.com.au -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.1/389 - Release Date: 14/07/2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Home page : http://uk.geocities.com/matmsh/index.html ___ All new Yahoo! Mail The new Interface is stunning in its simplicity and ease of use. - PC Magazine http://uk.docs.yahoo.com/nowyoucan.html - 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: A bit OT: how to manage database connections for multiple components rendered simultaneously.
Hmmm. I am not using Hibernate, the learning curve is too steep for this project. Can you sugest a way to solve this with handwritten code? On 7/17/06, James Carman [EMAIL PROTECTED] wrote: All code within one request can easily just use one connection. That's what we do with Tapernate. -Original Message- From: Rui Pacheco [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 10:13 AM To: Tapestry users; Tapestry users Subject: A bit OT: how to manage database connections for multiple components rendered simultaneously. Hi all This is not a pure Tapestry question, but I believe you have seen this before and might be able to give me some guiding light. I have a web application, which I am splitting into several fragments, ie, components, each one rendering content stored in a database. I just realised my index page would have 9 such fragments and if each is to retrieve a connection from the pool to get its content, the stress on the db server might be crazy, even if each request is quite short. I have a connection pool, but even with that I don't believe its healthy to use 9 connections at the same time. What about the other users? How would you deal with this issue? -- Cumprimentos, Rui Pacheco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Cumprimentos, Rui Pacheco
Re: A bit OT: how to manage database connections for multiple components rendered simultaneously.
Many thanks! On 7/17/06, James Carman [EMAIL PROTECTED] wrote: Use a threadlocal variable to hold the connection for the current request. Set the value from your pool using a WebRequestServicerFilter and make sure you clean it up at the end of the request. -Original Message- From: Rui Pacheco [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 10:32 AM To: Tapestry users Subject: Re: A bit OT: how to manage database connections for multiple components rendered simultaneously. Hmmm. I am not using Hibernate, the learning curve is too steep for this project. Can you sugest a way to solve this with handwritten code? On 7/17/06, James Carman [EMAIL PROTECTED] wrote: All code within one request can easily just use one connection. That's what we do with Tapernate. -Original Message- From: Rui Pacheco [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 10:13 AM To: Tapestry users; Tapestry users Subject: A bit OT: how to manage database connections for multiple components rendered simultaneously. Hi all This is not a pure Tapestry question, but I believe you have seen this before and might be able to give me some guiding light. I have a web application, which I am splitting into several fragments, ie, components, each one rendering content stored in a database. I just realised my index page would have 9 such fragments and if each is to retrieve a connection from the pool to get its content, the stress on the db server might be crazy, even if each request is quite short. I have a connection pool, but even with that I don't believe its healthy to use 9 connections at the same time. What about the other users? How would you deal with this issue? -- Cumprimentos, Rui Pacheco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Cumprimentos, Rui Pacheco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Cumprimentos, Rui Pacheco
Re: Navigational Menu
+1 For JS Cook Cheers, PS On 7/17/06, Murray Collingwood [EMAIL PROTECTED] wrote: Dump Krysalis and use JS Cook Menu. It is much easier to customise and also allows better integration with your java code for generation. I tried Kysalis initially but then I wanted to show different options for different users - it was very difficult to customise. I then tried JS Cook Menu and have never looked back. So much easier to use. Cheers mc On 17 Jul 2006 at 15:15, Peter Dawn wrote: I have been trying to integrate the krysalis menu for the last few days. however its proving to be a real pain. customisation is so difficult and i dont know how to link to pages in other frames. if were using html i would specify the frame name, but how should i do that here. so i have decided to go with a plain straightforward javascript menu. now the question is how can i link to my tapestry pages using normal links. has anybody experienced the same issues and is there another fix. navigation through a complex site is pretty important, so without a navigational menu the site is un-usable. any thoughts guys. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FOCUS Computing - web design Mob: 0415 24 26 24 [EMAIL PROTECTED] http://www.focus-computing.com.au -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.1/389 - Release Date: 14/07/2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Components inside component
Our technique is for the Web Designer to create a sample of the screen. Sometimes we don't have time to wait so developers design the screen, but we prefer the former. Once the screen is designed, there may be custom components that developers create. For the most part, we don't have a lot of custom reusable components (about 23). We have about 128 pages. Ours is a wizard based application, which is why we have a lot of pages. What we have found is that the developer adds the necessary tapestry foo to the mix and Web Designers continue to revise the HTML. We even have our document people making changes. Everyone understands the pieces not to monkey with and we all get along nicely. As a matter of fact, I don't remember our Web Designer messing up any of our components. Usually, it is the other way around, when we change the logic, we sometimes mix up the HTML. CSS has helped seperate out lf from layout. I have had ZERO luck with doing this with JSP's. It was pretty much a one way trip! With Tapestry, everyone gets along. If you have a component that requires a developer to insert and configure, then we usually have the Web Designer do a mock-up. To give you an idea how well this works, right before one of our releases, our CEO and the Web Designer sat down and re-worked the site. Afterwards, our Customer Support guy said how much it improved the site and usage. Total developer input - ZERO! Tapestry is starting to cause problems with the company. We find that Marketing has to be ready for a release when we say we are going to be. And we are re-arranging the GUI so often that QA had to give up it's automated tests. And our Doc people are having fits trying to keep the documentation in-sync with the GUI. Your milages may vary. regards, Mark -Original Message- From: Christian Mittendorf [mailto:[EMAIL PROTECTED] Sent: Sun 7/16/2006 3:16 AM To: Tapestry users Subject: Re: Components inside component Am 16.07.2006 um 10:28 schrieb Blackwings: Thanks, but do I have to create a HTML template for both CustomTr and CustomTd separetely? Yes and No, at least: each component may have a html template (matched by its name). You can copy your template to each html file and put different tapestry tags into each, but that is no solution for maintainance. In fact, the web designer, who is not a java developper, should have to create herself the templates, shouldn't she? That depends upon how your office is organized. In my case there is a design department, a content management system (cms) and the java developers. The developers receive the html templates from the designers. The developers slice these designs into components, which are then moved over to the cms. The cms allows the retrieval of these slices as well as the preview of the the whole page and the designer or the product manager can preview their page and do little changes to the html in the cms. If yes, each time she will want to change a page, she will have to modify also the component template, won't she? What is the normal procedure between the web-designer and the java developper regarding component? I don't think that there is a standard procedure for this task. It depends upon the workflow in your office and you should try to find a solution that should come pretty close to how you are already organized. Christian BW 2006/7/16, Christian Mittendorf [EMAIL PROTECTED]: Hello! Go and check out the paramter element: http://tapestry.apache.org/tapestry4/UsersGuide/ spec.html#spec.parameter You create your components by creating jwc and html files. And you add a parameter information to your CustomTd.jwc file: parameter name=value required=yes / Now you can access this parameter as a property using the same name in your CustomTd component: tdspan jwcid=@Insert value=ognl:value.foofoo/span/td And in your CustomTr you add your td like this: tr jwcid=[EMAIL PROTECTED] td jwcid=[EMAIL PROTECTED] value=ognl:foo.bar.../td /tr Christian Am 15.07.2006 um 20:55 schrieb Blackwings: Hello everybody, I'm new in Tapestry and, in fact, my boss asked me to try Tapestry to be able to compare with Struts in term of development time, efficiency, etc etc... yes, we are going to replace our old GUI web layer ;-) Anyway, I have a question maybe you will be able to answer : I would like to know how I could render a component, for example a list of custom td .../td inside a custom tr.../tr component. table tr jwcid=[EMAIL PROTECTED] ... td class=myTdClassSomething here/td td class=mySecondTdClass Something else here/td td jwcid=[EMAIL PROTECTED] ...Placeholder #1/td td jwcid=%remove% ...Placeholder #2/td td jwcid=%remove% ...Placeholder #3/td /tr /table So I want to be able to render something like that. CustomTr is aware it needs CustomTd and should pass some parameters to
Re: A bit OT: how to manage database connections for multiple components rendered simultaneously.
I have several components. Each will retrieve one connection from the pool, do its thing and return it. If they are done one at the time, then its great for me. But if each user that calls the page causes 9 simultaneous connections to open, I'll need to revise my strategy. On 7/17/06, James Carman [EMAIL PROTECTED] wrote: Unless all components ask for their own connection, which I think is what they were saying. -Original Message- From: kranga [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 11:28 AM To: Tapestry users Subject: Re: A bit OT: how to manage database connections for multiple components rendered simultaneously. Unless I'm missing something, you will not be using 9 connections as the components will render in serial order. So you will make 9 requests over a single connection. - Original Message - From: James Carman [EMAIL PROTECTED] To: 'Tapestry users' users@tapestry.apache.org; 'Tapestry users' tapestry-user@jakarta.apache.org Sent: Monday, July 17, 2006 10:19 AM Subject: RE: A bit OT: how to manage database connections for multiple components rendered simultaneously. All code within one request can easily just use one connection. That's what we do with Tapernate. -Original Message- From: Rui Pacheco [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 10:13 AM To: Tapestry users; Tapestry users Subject: A bit OT: how to manage database connections for multiple components rendered simultaneously. Hi all This is not a pure Tapestry question, but I believe you have seen this before and might be able to give me some guiding light. I have a web application, which I am splitting into several fragments, ie, components, each one rendering content stored in a database. I just realised my index page would have 9 such fragments and if each is to retrieve a connection from the pool to get its content, the stress on the db server might be crazy, even if each request is quite short. I have a connection pool, but even with that I don't believe its healthy to use 9 connections at the same time. What about the other users? How would you deal with this issue? -- Cumprimentos, Rui Pacheco - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Cumprimentos, Rui Pacheco
RE: A bit OT: how to manage database connections for multiple components rendered simultaneously.
So, you'd be okay with opening/closing 9 connections to the database during each request cycle? I'd think it would be better to just use one during the entire request cycle. -Original Message- From: kranga [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 12:40 PM To: Tapestry users Subject: Re: A bit OT: how to manage database connections for multiple components rendered simultaneously. Even if all components ask for their own connection, assuming components release connections when they are done, you would still expect only 1 connection in use (though it may physically travel on upto 8 different connection, there is only 1 connection open at any given time). A much better optimization would be to add an observer/mediator style pattern - a data provider that each component is able to tell what data it needs (perhaps in the renderComponent method) and when the first request for the data is made, the provider creates a SQL encompassing all requests, gets it and is able to dish it out. However, I personally (without any more info) would classify this optimization as pre-mature. 8 requests to the database may only result in about 400ms while I have a monster elsewhere slowing everything down. Plus you need to take into account how often the index page is actually invoked. - Original Message - From: James Carman [EMAIL PROTECTED] To: 'Tapestry users' users@tapestry.apache.org Sent: Monday, July 17, 2006 11:36 AM Subject: RE: A bit OT: how to manage database connections for multiple components rendered simultaneously. Unless all components ask for their own connection, which I think is what they were saying. -Original Message- From: kranga [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 11:28 AM To: Tapestry users Subject: Re: A bit OT: how to manage database connections for multiple components rendered simultaneously. Unless I'm missing something, you will not be using 9 connections as the components will render in serial order. So you will make 9 requests over a single connection. - Original Message - From: James Carman [EMAIL PROTECTED] To: 'Tapestry users' users@tapestry.apache.org; 'Tapestry users' tapestry-user@jakarta.apache.org Sent: Monday, July 17, 2006 10:19 AM Subject: RE: A bit OT: how to manage database connections for multiple components rendered simultaneously. All code within one request can easily just use one connection. That's what we do with Tapernate. -Original Message- From: Rui Pacheco [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 10:13 AM To: Tapestry users; Tapestry users Subject: A bit OT: how to manage database connections for multiple components rendered simultaneously. Hi all This is not a pure Tapestry question, but I believe you have seen this before and might be able to give me some guiding light. I have a web application, which I am splitting into several fragments, ie, components, each one rendering content stored in a database. I just realised my index page would have 9 such fragments and if each is to retrieve a connection from the pool to get its content, the stress on the db server might be crazy, even if each request is quite short. I have a connection pool, but even with that I don't believe its healthy to use 9 connections at the same time. What about the other users? How would you deal with this issue? -- Cumprimentos, Rui Pacheco - 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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: A bit OT: how to manage database connections for multiple components rendered simultaneously.
If I make my components wait, won't I be stalling the creation of the page? Under heavy loads, how feasible will that be? On 7/17/06, James Carman [EMAIL PROTECTED] wrote: Oh, if you're worried about simultaneous connections to the database, you don't have to worry. You can set the maximum size of your pool to some reasonable number. Then, have your components wait until a connection is available in the pool. -Original Message- From: Rui Pacheco [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 12:05 PM To: Tapestry users Subject: Re: A bit OT: how to manage database connections for multiple components rendered simultaneously. I have several components. Each will retrieve one connection from the pool, do its thing and return it. If they are done one at the time, then its great for me. But if each user that calls the page causes 9 simultaneous connections to open, I'll need to revise my strategy. On 7/17/06, James Carman [EMAIL PROTECTED] wrote: Unless all components ask for their own connection, which I think is what they were saying. -Original Message- From: kranga [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 11:28 AM To: Tapestry users Subject: Re: A bit OT: how to manage database connections for multiple components rendered simultaneously. Unless I'm missing something, you will not be using 9 connections as the components will render in serial order. So you will make 9 requests over a single connection. - Original Message - From: James Carman [EMAIL PROTECTED] To: 'Tapestry users' users@tapestry.apache.org; 'Tapestry users' tapestry-user@jakarta.apache.org Sent: Monday, July 17, 2006 10:19 AM Subject: RE: A bit OT: how to manage database connections for multiple components rendered simultaneously. All code within one request can easily just use one connection. That's what we do with Tapernate. -Original Message- From: Rui Pacheco [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 10:13 AM To: Tapestry users; Tapestry users Subject: A bit OT: how to manage database connections for multiple components rendered simultaneously. Hi all This is not a pure Tapestry question, but I believe you have seen this before and might be able to give me some guiding light. I have a web application, which I am splitting into several fragments, ie, components, each one rendering content stored in a database. I just realised my index page would have 9 such fragments and if each is to retrieve a connection from the pool to get its content, the stress on the db server might be crazy, even if each request is quite short. I have a connection pool, but even with that I don't believe its healthy to use 9 connections at the same time. What about the other users? How would you deal with this issue? -- Cumprimentos, Rui Pacheco - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Cumprimentos, Rui Pacheco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Cumprimentos, Rui Pacheco
RE: A bit OT: how to manage database connections for multiple components rendered simultaneously.
Well, what you do is tell your pool to wait until one comes back into the pool. So, you set your maximum pool size to something like 200 (if your db can handle more, do more if needed) connections. That, along with using only one connection per request cycle should help out. -Original Message- From: Rui Pacheco [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 12:50 PM To: Tapestry users Subject: Re: A bit OT: how to manage database connections for multiple components rendered simultaneously. If I make my components wait, won't I be stalling the creation of the page? Under heavy loads, how feasible will that be? On 7/17/06, James Carman [EMAIL PROTECTED] wrote: Oh, if you're worried about simultaneous connections to the database, you don't have to worry. You can set the maximum size of your pool to some reasonable number. Then, have your components wait until a connection is available in the pool. -Original Message- From: Rui Pacheco [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 12:05 PM To: Tapestry users Subject: Re: A bit OT: how to manage database connections for multiple components rendered simultaneously. I have several components. Each will retrieve one connection from the pool, do its thing and return it. If they are done one at the time, then its great for me. But if each user that calls the page causes 9 simultaneous connections to open, I'll need to revise my strategy. On 7/17/06, James Carman [EMAIL PROTECTED] wrote: Unless all components ask for their own connection, which I think is what they were saying. -Original Message- From: kranga [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 11:28 AM To: Tapestry users Subject: Re: A bit OT: how to manage database connections for multiple components rendered simultaneously. Unless I'm missing something, you will not be using 9 connections as the components will render in serial order. So you will make 9 requests over a single connection. - Original Message - From: James Carman [EMAIL PROTECTED] To: 'Tapestry users' users@tapestry.apache.org; 'Tapestry users' tapestry-user@jakarta.apache.org Sent: Monday, July 17, 2006 10:19 AM Subject: RE: A bit OT: how to manage database connections for multiple components rendered simultaneously. All code within one request can easily just use one connection. That's what we do with Tapernate. -Original Message- From: Rui Pacheco [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 10:13 AM To: Tapestry users; Tapestry users Subject: A bit OT: how to manage database connections for multiple components rendered simultaneously. Hi all This is not a pure Tapestry question, but I believe you have seen this before and might be able to give me some guiding light. I have a web application, which I am splitting into several fragments, ie, components, each one rendering content stored in a database. I just realised my index page would have 9 such fragments and if each is to retrieve a connection from the pool to get its content, the stress on the db server might be crazy, even if each request is quite short. I have a connection pool, but even with that I don't believe its healthy to use 9 connections at the same time. What about the other users? How would you deal with this issue? -- Cumprimentos, Rui Pacheco - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Cumprimentos, Rui Pacheco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Cumprimentos, Rui Pacheco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: A bit OT: how to manage database connections for multiple components rendered simultaneously.
This seems to be much ado about nothing: 1) He likely won't be actually opening or closing 9 connections in a request. I hope it's a safe assumption that a connection pool is being used. 2) Unless I'm mistaken about Tapestry's architecture, these 9 separate components won't be processed simultaneously within the context of a single request. All of the actions within that request will occur within the thread allocated by the servlet container to handle that request so your 9 different data requests will happen one after the other and and no more than one connection will be used by that request at any one time. I suppose that under special circumstances you might need to be worried about this. Let's say, perhaps, that these 9 components made repeated simultaneous AJAX-style requests. In such a situation you might begin to have an issue with strained connection pools. Matt On 7/17/06, Rui Pacheco [EMAIL PROTECTED] wrote: If I make my components wait, won't I be stalling the creation of the page? Under heavy loads, how feasible will that be? On 7/17/06, James Carman [EMAIL PROTECTED] wrote: Oh, if you're worried about simultaneous connections to the database, you don't have to worry. You can set the maximum size of your pool to some reasonable number. Then, have your components wait until a connection is available in the pool. -Original Message- From: Rui Pacheco [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 12:05 PM To: Tapestry users Subject: Re: A bit OT: how to manage database connections for multiple components rendered simultaneously. I have several components. Each will retrieve one connection from the pool, do its thing and return it. If they are done one at the time, then its great for me. But if each user that calls the page causes 9 simultaneous connections to open, I'll need to revise my strategy. On 7/17/06, James Carman [EMAIL PROTECTED] wrote: Unless all components ask for their own connection, which I think is what they were saying. -Original Message- From: kranga [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 11:28 AM To: Tapestry users Subject: Re: A bit OT: how to manage database connections for multiple components rendered simultaneously. Unless I'm missing something, you will not be using 9 connections as the components will render in serial order. So you will make 9 requests over a single connection. - Original Message - From: James Carman [EMAIL PROTECTED] To: 'Tapestry users' users@tapestry.apache.org; 'Tapestry users' tapestry-user@jakarta.apache.org Sent: Monday, July 17, 2006 10:19 AM Subject: RE: A bit OT: how to manage database connections for multiple components rendered simultaneously. All code within one request can easily just use one connection. That's what we do with Tapernate. -Original Message- From: Rui Pacheco [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 10:13 AM To: Tapestry users; Tapestry users Subject: A bit OT: how to manage database connections for multiple components rendered simultaneously. Hi all This is not a pure Tapestry question, but I believe you have seen this before and might be able to give me some guiding light. I have a web application, which I am splitting into several fragments, ie, components, each one rendering content stored in a database. I just realised my index page would have 9 such fragments and if each is to retrieve a connection from the pool to get its content, the stress on the db server might be crazy, even if each request is quite short. I have a connection pool, but even with that I don't believe its healthy to use 9 connections at the same time. What about the other users? How would you deal with this issue? -- Cumprimentos, Rui Pacheco - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Cumprimentos, Rui Pacheco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Cumprimentos, Rui Pacheco
Re: A bit OT: how to manage database connections for multiple components rendered simultaneously.
I am using a connection pool. My problem is, if each one of those 9 components retrieve a connection from the pool for each page rendered, multiplied by the number of users, this could lead to a quick exhaustion of resources. On 7/17/06, James Carman [EMAIL PROTECTED] wrote: Yes, a connection pool does help a bit. I didn't see where they were using a pool before. So, you're right, if the connections are being pooled properly, nothing will be opening/closing. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matt Welch Sent: Monday, July 17, 2006 1:08 PM To: Tapestry users Subject: Re: A bit OT: how to manage database connections for multiple components rendered simultaneously. This seems to be much ado about nothing: 1) He likely won't be actually opening or closing 9 connections in a request. I hope it's a safe assumption that a connection pool is being used. 2) Unless I'm mistaken about Tapestry's architecture, these 9 separate components won't be processed simultaneously within the context of a single request. All of the actions within that request will occur within the thread allocated by the servlet container to handle that request so your 9 different data requests will happen one after the other and and no more than one connection will be used by that request at any one time. I suppose that under special circumstances you might need to be worried about this. Let's say, perhaps, that these 9 components made repeated simultaneous AJAX-style requests. In such a situation you might begin to have an issue with strained connection pools. Matt On 7/17/06, Rui Pacheco [EMAIL PROTECTED] wrote: If I make my components wait, won't I be stalling the creation of the page? Under heavy loads, how feasible will that be? On 7/17/06, James Carman [EMAIL PROTECTED] wrote: Oh, if you're worried about simultaneous connections to the database, you don't have to worry. You can set the maximum size of your pool to some reasonable number. Then, have your components wait until a connection is available in the pool. -Original Message- From: Rui Pacheco [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 12:05 PM To: Tapestry users Subject: Re: A bit OT: how to manage database connections for multiple components rendered simultaneously. I have several components. Each will retrieve one connection from the pool, do its thing and return it. If they are done one at the time, then its great for me. But if each user that calls the page causes 9 simultaneous connections to open, I'll need to revise my strategy. On 7/17/06, James Carman [EMAIL PROTECTED] wrote: Unless all components ask for their own connection, which I think is what they were saying. -Original Message- From: kranga [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 11:28 AM To: Tapestry users Subject: Re: A bit OT: how to manage database connections for multiple components rendered simultaneously. Unless I'm missing something, you will not be using 9 connections as the components will render in serial order. So you will make 9 requests over a single connection. - Original Message - From: James Carman [EMAIL PROTECTED] To: 'Tapestry users' users@tapestry.apache.org; 'Tapestry users' tapestry-user@jakarta.apache.org Sent: Monday, July 17, 2006 10:19 AM Subject: RE: A bit OT: how to manage database connections for multiple components rendered simultaneously. All code within one request can easily just use one connection. That's what we do with Tapernate. -Original Message- From: Rui Pacheco [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 10:13 AM To: Tapestry users; Tapestry users Subject: A bit OT: how to manage database connections for multiple components rendered simultaneously. Hi all This is not a pure Tapestry question, but I believe you have seen this before and might be able to give me some guiding light. I have a web application, which I am splitting into several fragments, ie, components, each one rendering content stored in a database. I just realised my index page would have 9 such fragments and if each is to retrieve a connection from the pool to get its content, the stress on the db server might be crazy, even if each request is quite short. I have a connection pool, but even with that I don't believe its healthy to use 9 connections at the same time. What about the other users? How would you deal with this issue? -- Cumprimentos, Rui Pacheco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: A bit OT: how to manage database connections for multiple components rendered simultaneously.
Not if you set the maximum size of the pool to some reasonable number. -Original Message- From: Rui Pacheco [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 1:18 PM To: Tapestry users Subject: Re: A bit OT: how to manage database connections for multiple components rendered simultaneously. I am using a connection pool. My problem is, if each one of those 9 components retrieve a connection from the pool for each page rendered, multiplied by the number of users, this could lead to a quick exhaustion of resources. On 7/17/06, James Carman [EMAIL PROTECTED] wrote: Yes, a connection pool does help a bit. I didn't see where they were using a pool before. So, you're right, if the connections are being pooled properly, nothing will be opening/closing. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matt Welch Sent: Monday, July 17, 2006 1:08 PM To: Tapestry users Subject: Re: A bit OT: how to manage database connections for multiple components rendered simultaneously. This seems to be much ado about nothing: 1) He likely won't be actually opening or closing 9 connections in a request. I hope it's a safe assumption that a connection pool is being used. 2) Unless I'm mistaken about Tapestry's architecture, these 9 separate components won't be processed simultaneously within the context of a single request. All of the actions within that request will occur within the thread allocated by the servlet container to handle that request so your 9 different data requests will happen one after the other and and no more than one connection will be used by that request at any one time. I suppose that under special circumstances you might need to be worried about this. Let's say, perhaps, that these 9 components made repeated simultaneous AJAX-style requests. In such a situation you might begin to have an issue with strained connection pools. Matt On 7/17/06, Rui Pacheco [EMAIL PROTECTED] wrote: If I make my components wait, won't I be stalling the creation of the page? Under heavy loads, how feasible will that be? On 7/17/06, James Carman [EMAIL PROTECTED] wrote: Oh, if you're worried about simultaneous connections to the database, you don't have to worry. You can set the maximum size of your pool to some reasonable number. Then, have your components wait until a connection is available in the pool. -Original Message- From: Rui Pacheco [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 12:05 PM To: Tapestry users Subject: Re: A bit OT: how to manage database connections for multiple components rendered simultaneously. I have several components. Each will retrieve one connection from the pool, do its thing and return it. If they are done one at the time, then its great for me. But if each user that calls the page causes 9 simultaneous connections to open, I'll need to revise my strategy. On 7/17/06, James Carman [EMAIL PROTECTED] wrote: Unless all components ask for their own connection, which I think is what they were saying. -Original Message- From: kranga [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 11:28 AM To: Tapestry users Subject: Re: A bit OT: how to manage database connections for multiple components rendered simultaneously. Unless I'm missing something, you will not be using 9 connections as the components will render in serial order. So you will make 9 requests over a single connection. - Original Message - From: James Carman [EMAIL PROTECTED] To: 'Tapestry users' users@tapestry.apache.org; 'Tapestry users' tapestry-user@jakarta.apache.org Sent: Monday, July 17, 2006 10:19 AM Subject: RE: A bit OT: how to manage database connections for multiple components rendered simultaneously. All code within one request can easily just use one connection. That's what we do with Tapernate. -Original Message- From: Rui Pacheco [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 10:13 AM To: Tapestry users; Tapestry users Subject: A bit OT: how to manage database connections for multiple components rendered simultaneously. Hi all This is not a pure Tapestry question, but I believe you have seen this before and might be able to give me some guiding light. I have a web application, which I am splitting into several fragments, ie, components, each one rendering content stored in a database. I just realised my index page would have 9 such fragments and if each is to retrieve a connection from the pool to get its content, the stress on the db server might be crazy, even if each request is quite short. I have a connection pool, but even with that I don't
Re: Generic application wide formats
As you say... not pretty. mc On 17 Jul 2006 at 14:59, Shing Hing Man wrote: It is not very pretty. You could try the following. component id=dateField type=Insert binding name=value value=myclass.mydate/ binding name=format ognl:new java.text.SimpleDateFormat(getMessages().getMessage('format_date')) /binding /component Shing --- Murray Collingwood [EMAIL PROTECTED] wrote: Hi all I'm a little new to Tapestry so I may be missing something, happy for anybody to point me in the right direction. I'm currently running Tapestry 4.0.2 I want to standardise my date format for the entire application to dd/MM/. I decided that the best place to do this while allowing for internationalisation is to add it to my app.properties file. I added a few other formats while I was there, so I had something like the following: # Generic formats format_date=dd/MM/ format_time=HH:mm format_pct0=##0% format_pct2=##0.##% format_currency=$#,###,##0.00 Then I found that in order to display a date in this format I was writing 7 lines of java code for each page where a date was displayed (most of them)...along with 1 more line in the .page file for each date to be displayed. When I wanted to edit a date again using this format I had 4 lines per page and 1 line per field. This only provides the most basic of editing (I haven't allowed for any error processing yet) and while the number of lines is not large it did seem to me that there were different methods being employed to format the date for display and others for edit and validation. As I began, I may have missed something but it does seem a little messy at the moment. Does anybody have a better method of achieving this generic formating? Wouldn't it be nice ifI could specify formats in my message catalogue and then simply apply them to my components with a single line of code? eg a) displaying a date value: component id=dateField type=Insert binding name=value value=myclass.mydate/ binding name=format value=message:format_date/ /component b) editing a date value: component id=dateField type=DatePicker binding name=displayName value=message:mydate_label/ binding name=value value=myclass.mydate/ binding name=format value=message:format_date/ binding name=validators value=validators:required/ /component Is this possible? FOCUS Computing - web design Mob: 0415 24 26 24 [EMAIL PROTECTED] http://www.focus-computing.com.au -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.1/389 - Release Date: 14/07/2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Home page : http://uk.geocities.com/matmsh/index.html ___ All new Yahoo! Mail The new Interface is stunning in its simplicity and ease of use. - PC Magazine http://uk.docs.yahoo.com/nowyoucan.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FOCUS Computing - web design Mob: 0415 24 26 24 [EMAIL PROTECTED] http://www.focus-computing.com.au -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.1/389 - Release Date: 14/07/2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Re: Generic application wide formats
What you have suggested is in fact what I am already doing for the date entry / update. I'm also having to use a special method in my .java file to retrieve the format whenever I want to display a date in this format. My problem is that this is a significant amount of coding required on each page for something that should be generic across my app. Do you agree? Cheers mc On 17 Jul 2006 at 16:21, Kristian Marinkovic wrote: this could help: http://www.nabble.com/Dynamic-translators-tf1229928.html#a3255867 define your formatter as a bean and define the pattern using message:date_pattern greetings, kris Shing Hing Man [EMAIL PROTECTED] An Tapestry users 17.07.2006 15:59 users@tapestry.apache.org Kopie Bitte antwortenThema an Re: Generic application wide Tapestry users formats [EMAIL PROTECTED] pache.org It is not very pretty. You could try the following. component id=dateField type=Insert binding name=value value=myclass.mydate/ binding name=format ognl:new java.text.SimpleDateFormat(getMessages().getMessage('format_date')) /binding /component Shing --- Murray Collingwood [EMAIL PROTECTED] wrote: Hi all I'm a little new to Tapestry so I may be missing something, happy for anybody to point me in the right direction. I'm currently running Tapestry 4.0.2 I want to standardise my date format for the entire application to dd/MM/. I decided that the best place to do this while allowing for internationalisation is to add it to my app.properties file. I added a few other formats while I was there, so I had something like the following: # Generic formats format_date=dd/MM/ format_time=HH:mm format_pct0=##0% format_pct2=##0.##% format_currency=$#,###,##0.00 Then I found that in order to display a date in this format I was writing 7 lines of java code for each page where a date was displayed (most of them)...along with 1 more line in the .page file for each date to be displayed. When I wanted to edit a date again using this format I had 4 lines per page and 1 line per field. This only provides the most basic of editing (I haven't allowed for any error processing yet) and while the number of lines is not large it did seem to me that there were different methods being employed to format the date for display and others for edit and validation. As I began, I may have missed something but it does seem a little messy at the moment. Does anybody have a better method of achieving this generic formating? Wouldn't it be nice ifI could specify formats in my message catalogue and then simply apply them to my components with a single line of code? eg a) displaying a date value: component id=dateField type=Insert binding name=value value=myclass.mydate/ binding name=format value=message:format_date/ /component b) editing a date value: component id=dateField type=DatePicker binding name=displayName value=message:mydate_label/ binding name=value value=myclass.mydate/ binding name=format value=message:format_date/ binding name=validators value=validators:required/ /component Is this possible? FOCUS Computing - web design Mob: 0415 24 26 24 [EMAIL PROTECTED] http://www.focus-computing.com.au -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.1/389 - Release Date: 14/07/2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Home page :
Re: DirectLink in TableValue
I found this example somewhere, can't remember now... (I must keep bookmarking, I must keep bookmarking...) [from A.html] span jwcid=[EMAIL PROTECTED] span jwcid=editLinkspan key=link_editEdit/span/span span jwcid=deleteLinkspan key=link_deleteDel/span/span /span [from A.page] component id=editLink type=DirectLink binding name=listener value=listener:edit/ binding name=parameters value=comp.id/ /component component id=deleteLink type=DirectLink binding name=listener value=listener:delete/ binding name=parameters value=comp.id/ /component That wasn't hard. The question you were probably wanting to know though was how to include a table value in the link text. [from B.html] span jwcid=[EMAIL PROTECTED] span jwcid=descLink span jwcid=descText / /span /span [from B.page] component id=descLink type=DirectLink binding name=listener value=listener:select/ binding name=parameters value=comp.id/ /component component id=descText type=InsertText binding name=value value=comp.desc/ /component You have to nest the spans here, one for the link and the second for the link text. Now you have everything. Cheers mc On 13 Jul 2006 at 13:46, Kosarev A.V. wrote: Update: I wish to place in a column two DirectLink components. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FOCUS Computing - web design Mob: 0415 24 26 24 [EMAIL PROTECTED] http://www.focus-computing.com.au -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.1/390 - Release Date: 17/07/2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Table foreach component - Flashing row
What's the problem? You can test your condition at the beginning of the row, when writing the tr component, so that you generate something like tr style=background-color: red; or tr class=rowinerror I'm sure you've got past this. You mention when certain text is received, does this mean from user input in the midst of the table row or from the database? Are you able to test the condition at the beginning of the row. If you can't test at the beginning you could get JS to modify the background colour of the row, all you need is to assign an 'id' to the row and then retrieve the row in your JS and start changing properties. Maybe you've tries this too... One last thing, are you setting background colours in each cell? If you do these will overwrite the background colour of the row in which case you may need to use JS to obtain control over each cell and set the background colour property manually in each. Cheers mc On 18 Jul 2006 at 10:02, Peter Dawn wrote: guys, i have a table with a foreach condition within it. now the code generates a bunch of table rows based on my condition. now within my last column, i have a condition where if a certain text is received the background colour of that cell changes. now what i want to do is, if that text is received i want to hightlight the entire row or perhaps flash it, so that it shows attention to the user indicating that there is an error there. now how can i effect the entire row and not just the individual cell. has somebody done like this within a table. thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FOCUS Computing - web design Mob: 0415 24 26 24 [EMAIL PROTECTED] http://www.focus-computing.com.au -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.10.1/390 - Release Date: 17/07/2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Question about PageValidate
I am curious if what I have been experiencing with pageValidate is normal behavior. My pageValidate gets called when I click on a direct link that goes to another page. I would have expected pageValidate should only get called when visiting only the enclosed page. -- ~chris
help content implementation
has anybody tried to implement a help system using tapestry. within my web app i want to implement a help manual and i am debating on whats the best way of implementing this. just a pop-up ie window would do fine or even something in dhtml. has anybody thought of implementing something like this. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do I do a Servlet filter, or similar functionality... help please!
Why reinvent the wheel? Try tapernate: www.carmanconsulting.com/tapernate You can use anonymous/anon to check it out from the SVN repository. Hi all, I have tried to implement a Servlet Filter but my Tapestry 4 app will not take it... I get some weird errors - is it not supposed to work? I have also read about the ServletRequestServicerFilter but I cannot find any decent documentation - is there any? ... I lack documentation about many things - where is the best way to go anyway? What I'm really trying to do is to manage my Hibernate transactions, I'd like to have one transaction per HTTP request. So I thought I'd do it like a servlet filter - is this the wrong way? Then I thought maybe I could use my border component which wraps all pages - would that be possible? Better? Any help appreciated. Malin James Carman, President Carman Consulting, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question about PageValidate
When you say direct link, do you mean a @DirectLink component which calls a listener? Or, do you mean a @PageLink? I am curious if what I have been experiencing with pageValidate is normal behavior. My pageValidate gets called when I click on a direct link that goes to another page. I would have expected pageValidate should only get called when visiting only the enclosed page. -- ~chris James Carman, President Carman Consulting, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Navigational Menu
You know, you could always take the jscookmenu source code and modify it to be Tapestry 3 compatible. I doubt it would very difficult to do. -Scott On Tuesday 18 July 2006 09:23, Peter Dawn wrote: nay. too risky. its a bit too late in the process for me to upgrade, i might break something. will probably upgrade straight to 5 now. - 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: Navigational Menu
i probably could modify it, but am not sure if its worth it or not. but i guess there must be a few ppl out there with an older version, who would benefit from this. so will give it a try, if not then perhaps somebody else could give it a try. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]