dynamic ognl expr
I'd like to read object's property value but the property name is known during runtime only so finally the ognl expression should looks like this value=ognl:components.tableRows.tableRow.clientId but clientId is generated and can be read i.e. from page's property: columnName So I'd like to write sth like this: value=ognl:('components.tableRows.tableRow.' + ognl:columnName) -- View this message in context: http://www.nabble.com/dynamic-ognl-expr-tf2902234.html#a8108480 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: dynamic ognl expr
Seems like the wrong way to go about things. Remember, it's probably best to avoid complex OGNL expressions. It's often best to add the complexity to the JAVA code. For example you could have a function in your object such that you can do getPropertyByName(columnName). And use that to return the correct property. I am almost sure you can't use dynamic OGNL expressions like you want since those are usually pre-compiled. On 12/31/06, ra [EMAIL PROTECTED] wrote: I'd like to read object's property value but the property name is known during runtime only so finally the ognl expression should looks like this value=ognl:components.tableRows.tableRow.clientId but clientId is generated and can be read i.e. from page's property: columnName So I'd like to write sth like this: value=ognl:('components.tableRows.tableRow.' + ognl:columnName) -- View this message in context: http://www.nabble.com/dynamic-ognl-expr-tf2902234.html#a8108480 Sent from the Tapestry - User mailing list archive at Nabble.com. - 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]
ServletException with acegi tapestry
I'm using tapernate and it is tapestry-acegi integration. Everything works fine until recently I found the following error message. It only happens when I open my application a while ago and back to click some link or button on the webpage. The whole web application is then dead. (Tomcat is still alive.) I have to restart the application. Does anybody have this problem too? It has been really a headache now. Thanks advance for any help. -- javax.servlet.ServletException: Transaction is already completed - do not call commit or rollback more than once per transaction org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(W ebRequestServicerPipelineBridge.java:65) $ServletRequestServicer_10fd892ca53.service($ServletRequestServicer_10fd892c a53.java) org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInj ector.java:55) $ServletRequestServicerFilter_10fd892ca4f.service($ServletRequestServicerFil ter_10fd892ca4f.java) $ServletRequestServicer_10fd892ca55.service($ServletRequestServicer_10fd892c a55.java) com.javaforge.tapestry.acegi.filter.FilterChainAdapter.doFilter(FilterChainA dapter.java:43) org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(Ano nymousProcessingFilter.java:125) $Filter_10fd892ca4d.doFilter($Filter_10fd892ca4d.java) com.javaforge.tapestry.acegi.filter.ServletRequestServicerFilterAdapter.serv ice(ServletRequestServicerFilterAdapter.java:42) $ServletRequestServicer_10fd892ca55.service($ServletRequestServicer_10fd892c a55.java) com.javaforge.tapestry.acegi.filter.FilterChainAdapter.doFilter(FilterChainA dapter.java:43) org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFil ter.java:216) $FormProcessor_10fd892ca4b.doFilter($FormProcessor_10fd892ca4b.java) com.javaforge.tapestry.acegi.filter.ServletRequestServicerFilterAdapter.serv ice(ServletRequestServicerFilterAdapter.java:42) $ServletRequestServicer_10fd892ca55.service($ServletRequestServicer_10fd892c a55.java) org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecode rFilter.java:52) $ServletRequestServicerFilter_10fd892ca43.service($ServletRequestServicerFil ter_10fd892ca43.java) $ServletRequestServicer_10fd892ca55.service($ServletRequestServicer_10fd892c a55.java) org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestE ncoding.java:53) $ServletRequestServicerFilter_10fd892ca51.service($ServletRequestServicerFil ter_10fd892ca51.java) $ServletRequestServicer_10fd892ca55.service($ServletRequestServicer_10fd892c a55.java) com.javaforge.tapestry.acegi.filter.FilterChainAdapter.doFilter(FilterChainA dapter.java:43) org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpS essionContextIntegrationFilter.java:195) $Filter_10fd892ca45.doFilter($Filter_10fd892ca45.java) com.javaforge.tapestry.acegi.filter.ServletRequestServicerFilterAdapter.serv ice(ServletRequestServicerFilterAdapter.java:42) $ServletRequestServicer_10fd892ca55.service($ServletRequestServicer_10fd892c a55.java) $ServletRequestServicer_10fd892ca3d.service($ServletRequestServicer_10fd892c a3d.java) org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123 ) org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:104) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.tapestry.RedirectFilter.doFilter(RedirectFilter.java:103)
Re: ServletException with acegi tapestry
Yeah, I've seen that before. I was able to work around it because it was an actual programming error in my case. But, the whole thing is quite brittle, as you've figured out! :-) There needs to be better error-handling, IMHO. On 12/31/06, Henry Chen [EMAIL PROTECTED] wrote: I'm using tapernate and it is tapestry-acegi integration. Everything works fine until recently I found the following error message. It only happens when I open my application a while ago and back to click some link or button on the webpage. The whole web application is then dead. (Tomcat is still alive.) I have to restart the application. Does anybody have this problem too? It has been really a headache now. Thanks advance for any help. -- javax.servlet.ServletException: Transaction is already completed - do not call commit or rollback more than once per transaction org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(W ebRequestServicerPipelineBridge.java:65) $ServletRequestServicer_10fd892ca53.service($ServletRequestServicer_10fd892c a53.java) org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInj ector.java:55) $ServletRequestServicerFilter_10fd892ca4f.service($ServletRequestServicerFil ter_10fd892ca4f.java) $ServletRequestServicer_10fd892ca55.service($ServletRequestServicer_10fd892c a55.java) com.javaforge.tapestry.acegi.filter.FilterChainAdapter.doFilter(FilterChainA dapter.java:43) org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(Ano nymousProcessingFilter.java:125) $Filter_10fd892ca4d.doFilter($Filter_10fd892ca4d.java) com.javaforge.tapestry.acegi.filter.ServletRequestServicerFilterAdapter.serv ice(ServletRequestServicerFilterAdapter.java:42) $ServletRequestServicer_10fd892ca55.service($ServletRequestServicer_10fd892c a55.java) com.javaforge.tapestry.acegi.filter.FilterChainAdapter.doFilter(FilterChainA dapter.java:43) org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFil ter.java:216) $FormProcessor_10fd892ca4b.doFilter($FormProcessor_10fd892ca4b.java) com.javaforge.tapestry.acegi.filter.ServletRequestServicerFilterAdapter.serv ice(ServletRequestServicerFilterAdapter.java:42) $ServletRequestServicer_10fd892ca55.service($ServletRequestServicer_10fd892c a55.java) org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecode rFilter.java:52) $ServletRequestServicerFilter_10fd892ca43.service($ServletRequestServicerFil ter_10fd892ca43.java) $ServletRequestServicer_10fd892ca55.service($ServletRequestServicer_10fd892c a55.java) org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestE ncoding.java:53) $ServletRequestServicerFilter_10fd892ca51.service($ServletRequestServicerFil ter_10fd892ca51.java) $ServletRequestServicer_10fd892ca55.service($ServletRequestServicer_10fd892c a55.java) com.javaforge.tapestry.acegi.filter.FilterChainAdapter.doFilter(FilterChainA dapter.java:43) org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpS essionContextIntegrationFilter.java:195) $Filter_10fd892ca45.doFilter($Filter_10fd892ca45.java) com.javaforge.tapestry.acegi.filter.ServletRequestServicerFilterAdapter.serv ice(ServletRequestServicerFilterAdapter.java:42) $ServletRequestServicer_10fd892ca55.service($ServletRequestServicer_10fd892c a55.java) $ServletRequestServicer_10fd892ca3d.service($ServletRequestServicer_10fd892c a3d.java) org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123 ) org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:104) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.tapestry.RedirectFilter.doFilter(RedirectFilter.java:103) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ServletException with acegi tapestry
Hi James, Good to know that you have seen this before. How did you work around it? Can you share a little bit? Where should I do a better error-handling? Thanks a lot! I really don't know what to do without your help. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of James Carman Sent: Sunday, December 31, 2006 6:46 PM To: Tapestry users Subject: Re: ServletException with acegi tapestry Yeah, I've seen that before. I was able to work around it because it was an actual programming error in my case. But, the whole thing is quite brittle, as you've figured out! :-) There needs to be better error-handling, IMHO. On 12/31/06, Henry Chen [EMAIL PROTECTED] wrote: I'm using tapernate and it is tapestry-acegi integration. Everything works fine until recently I found the following error message. It only happens when I open my application a while ago and back to click some link or button on the webpage. The whole web application is then dead. (Tomcat is still alive.) I have to restart the application. Does anybody have this problem too? It has been really a headache now. Thanks advance for any help. -- javax.servlet.ServletException: Transaction is already completed - do not call commit or rollback more than once per transaction org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(W ebRequestServicerPipelineBridge.java:65) $ServletRequestServicer_10fd892ca53.service($ServletRequestServicer_10fd892c a53.java) org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInj ector.java:55) $ServletRequestServicerFilter_10fd892ca4f.service($ServletRequestServicerFil ter_10fd892ca4f.java) $ServletRequestServicer_10fd892ca55.service($ServletRequestServicer_10fd892c a55.java) com.javaforge.tapestry.acegi.filter.FilterChainAdapter.doFilter(FilterChainA dapter.java:43) org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(Ano nymousProcessingFilter.java:125) $Filter_10fd892ca4d.doFilter($Filter_10fd892ca4d.java) com.javaforge.tapestry.acegi.filter.ServletRequestServicerFilterAdapter.serv ice(ServletRequestServicerFilterAdapter.java:42) $ServletRequestServicer_10fd892ca55.service($ServletRequestServicer_10fd892c a55.java) com.javaforge.tapestry.acegi.filter.FilterChainAdapter.doFilter(FilterChainA dapter.java:43) org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFil ter.java:216) $FormProcessor_10fd892ca4b.doFilter($FormProcessor_10fd892ca4b.java) com.javaforge.tapestry.acegi.filter.ServletRequestServicerFilterAdapter.serv ice(ServletRequestServicerFilterAdapter.java:42) $ServletRequestServicer_10fd892ca55.service($ServletRequestServicer_10fd892c a55.java) org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecode rFilter.java:52) $ServletRequestServicerFilter_10fd892ca43.service($ServletRequestServicerFil ter_10fd892ca43.java) $ServletRequestServicer_10fd892ca55.service($ServletRequestServicer_10fd892c a55.java) org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestE ncoding.java:53) $ServletRequestServicerFilter_10fd892ca51.service($ServletRequestServicerFil ter_10fd892ca51.java) $ServletRequestServicer_10fd892ca55.service($ServletRequestServicer_10fd892c a55.java) com.javaforge.tapestry.acegi.filter.FilterChainAdapter.doFilter(FilterChainA dapter.java:43) org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpS essionContextIntegrationFilter.java:195) $Filter_10fd892ca45.doFilter($Filter_10fd892ca45.java) com.javaforge.tapestry.acegi.filter.ServletRequestServicerFilterAdapter.serv ice(ServletRequestServicerFilterAdapter.java:42) $ServletRequestServicer_10fd892ca55.service($ServletRequestServicer_10fd892c a55.java) $ServletRequestServicer_10fd892ca3d.service($ServletRequestServicer_10fd892c a3d.java) org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123 ) org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:104) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.tapestry.RedirectFilter.doFilter(RedirectFilter.java:103) - 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: dynamic ognl expr
Check out some ognl docs for expression syntax, e.t.c. IIRC, you can do value=ognl:components.tableRows.tableRow[columnName] And happy new year from greece as well ! Martin Strand wrote: If you generate the expression dynamically, you can use an ExpressionEvaluator: public Object getValue() { String expression = components.tableRows.tableRow. + getColumnName(); return getExpressionEvaluator().read(getPage(), expression); } @InjectObject(service:tapestry.ognl.ExpressionEvaluator) public abstract ExpressionEvaluator getExpressionEvaluator(); Happy new year Martin On Sun, 31 Dec 2006 18:18:29 +0100, ra [EMAIL PROTECTED] wrote: I'd like to read object's property value but the property name is known during runtime only so finally the ognl expression should looks like this value=ognl:components.tableRows.tableRow.clientId but clientId is generated and can be read i.e. from page's property: columnName So I'd like to write sth like this: value=ognl:('components.tableRows.tableRow.' + ognl:columnName) - 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 / J2EE Consulting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]