Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer
Have you tried without specify Generic types ? 2010/9/13 Christophe Cordenier > Oh, this is maybe due to generics... > > 2010/9/13 Markus Feindler > >> >> >> public interface RequestParameterExtractor { >>Map extractRequestParameters(); >> } >> >> is not equal to: >> >> >> TransformMethodSignature extractMethod = new >> TransformMethodSignature(Modifier.PUBLIC, >>"Map", "extractRequestParameters", null, null); >> >> ? >> >> >> Everything looks good ... The only thing i see is that the method >>> signature >>> is not exactly the same as the one declared in the interface. >>> >>> 2010/9/13 Markus Feindler >>> >>> Am 13.09.2010 22:18, schrieb Thiago H. de Paula Figueiredo: On Mon, 13 Sep 2010 17:02:02 -0300, Christophe Cordenier< > christophe.corden...@gmail.com> wrote: > > Please, Can you provide your Tapestry Module class that contributes > your > >> worker ? >> >> And the worker itself? It seems two different worker instances are > trying > to add the same method to the same page class. > > files attached! appreciate your help. > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org >>> >>> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > > > -- > Regards, > Christophe Cordenier. > > Committer on Apache Tapestry 5 > Co-creator of wooki @wookicentral.com > -- Regards, Christophe Cordenier. Committer on Apache Tapestry 5 Co-creator of wooki @wookicentral.com
Re: T5+hibernate - multiple session factories
you guy,maybe you should hack hibernate module to support multiple datasource. On Tue, Sep 14, 2010 at 9:35 AM, Fanzhen wrote: > > well I am using spring + hibernate(JPA features) ,you can set up two more > persist unit. > > > On 2010-9-14 8:31, Paul Stanton wrote: >> >> I have an tapestry app that needs to connect to 2 different databases. >> >> Has anyone done this with tapestry-hibernate? >> >> thanks, p. >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> >> > > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- cleverpig(Dan) Location: Beijing Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China Zipcode: 100031 MSN: great_liu...@hotmail.com QQ: 149291732 Skype: cleverpigatmatrix Facebook ID:cleverpig Blog: cleverpig.name/dan/ Tags: del.icio.us/cleverpig Twitter: twitter.com/cleverpig 新浪微博: t.sina.com.cn/cleverpig Organization: www.beijing-open-party.org or...@facebook: http://www.facebook.com/group.php?gid=8159558294 - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5+hibernate - multiple session factories
well I am using spring + hibernate(JPA features) ,you can set up two more persist unit. On 2010-9-14 8:31, Paul Stanton wrote: I have an tapestry app that needs to connect to 2 different databases. Has anyone done this with tapestry-hibernate? thanks, p. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
T5+hibernate - multiple session factories
I have an tapestry app that needs to connect to 2 different databases. Has anyone done this with tapestry-hibernate? thanks, p. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5 Eventlink Query
Hi Thiago, In my template 2 i can display many pages ex. template 2 display test1 or test2 so on... using an eventlink then link parameters plus if else component. Then using link parameter i can make a link from template 1 pointing to template 2 that will display test1 or test2. But in actionlink using zone & block i cannot do that kind of event that will link my template 1 pointing to template 2 that will display test1 or test2. I like to do it in AJAX because it is fast. But currently i cannot hypherlink the actionlink from different pages. Ex. code - Eventlink template 1 class @Inject private Request request; @BeginRender public void beginRender(MarkupWriter writer) [a href='" + request.getContextPath() + "/template2?cid=a01¶m=pm'][/a] template 2 # PM test1 test2 template 2 - class @Property private String param; @Property private String cid; @Property private boolean temppm; @Inject private PageRenderLinkSource pageRenderLinkSource; @Inject private Request request; @InjectPage private aboutus abs; private Link link; // Request Parameters public Link set(String param, String cid) { link = pageRenderLinkSource.createPageRenderLink(this.getClass()); if (param != null && cid != null) { link.addParameter("param", param); link.addParameter("cid", cid); } return link; } // Page Load void onActivate() { param = request.getParameter("param"); if(param.trim().equals("pm")){ temppm = true; } else temppm = false; } Object onPM() { link = abs.set("pm","a01"); return link; } As you see i can link my template 1 to template 2 that will display test1 or test 2. But i cannot do it in actionlink its quite hard. ^_^ -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-Eventlink-Query-tp2837470p2838417.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer
Oh, this is maybe due to generics... 2010/9/13 Markus Feindler > > > public interface RequestParameterExtractor { >Map extractRequestParameters(); > } > > is not equal to: > > > TransformMethodSignature extractMethod = new > TransformMethodSignature(Modifier.PUBLIC, >"Map", "extractRequestParameters", null, null); > > ? > > > Everything looks good ... The only thing i see is that the method >> signature >> is not exactly the same as the one declared in the interface. >> >> 2010/9/13 Markus Feindler >> >> Am 13.09.2010 22:18, schrieb Thiago H. de Paula Figueiredo: >>> >>> On Mon, 13 Sep 2010 17:02:02 -0300, Christophe Cordenier< >>> christophe.corden...@gmail.com> wrote: Please, Can you provide your Tapestry Module class that contributes your > worker ? > > And the worker itself? It seems two different worker instances are trying to add the same method to the same page class. files attached! appreciate your help. >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>> For additional commands, e-mail: users-h...@tapestry.apache.org >>> >>> >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Regards, Christophe Cordenier. Committer on Apache Tapestry 5 Co-creator of wooki @wookicentral.com
Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer
public interface RequestParameterExtractor { Map extractRequestParameters(); } is not equal to: TransformMethodSignature extractMethod = new TransformMethodSignature(Modifier.PUBLIC, "Map", "extractRequestParameters", null, null); ? Everything looks good ... The only thing i see is that the method signature is not exactly the same as the one declared in the interface. 2010/9/13 Markus Feindler Am 13.09.2010 22:18, schrieb Thiago H. de Paula Figueiredo: On Mon, 13 Sep 2010 17:02:02 -0300, Christophe Cordenier< christophe.corden...@gmail.com> wrote: Please, Can you provide your Tapestry Module class that contributes your worker ? And the worker itself? It seems two different worker instances are trying to add the same method to the same page class. files attached! appreciate your help. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Asset Security in 5.1.0.5
Hi ! Security patch has been applied on 5.1.0.6 and 5.1.0.7 but these version has been failed the vote process, you can use 5.1.0.8-SNAPSHOT version to get access to protect your assets. 2010/9/13 Rich M > > Hi, > > I just noticed I can access a disturbing amount of files through the > assets/ path from my application. The user guide for 5.0 states that > Tapestry automatically blocks access to all assets and only whitelists > critical Tapestry files > http://tapestry.apache.org/tapestry5.0/guide/assets.html . However, > looking at the 5.1 guide there is no mention of security like in the 5.0 > guide. I haven't made any contributions to an AssetPathAuthorizer or even > known about them, so I don't think I've done something to specifically allow > access to the files via Tapestry code. How can I get the files in my > classpath and web context blocked? > > Thanks, > Rich > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Regards, Christophe Cordenier. Committer on Apache Tapestry 5 Co-creator of wooki @wookicentral.com
Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer
Everything looks good ... The only thing i see is that the method signature is not exactly the same as the one declared in the interface. 2010/9/13 Markus Feindler > Am 13.09.2010 22:18, schrieb Thiago H. de Paula Figueiredo: > > On Mon, 13 Sep 2010 17:02:02 -0300, Christophe Cordenier < >> christophe.corden...@gmail.com> wrote: >> >> Please, Can you provide your Tapestry Module class that contributes your >>> worker ? >>> >> >> And the worker itself? It seems two different worker instances are trying >> to add the same method to the same page class. >> >> files attached! appreciate your help. > > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > -- Regards, Christophe Cordenier. Committer on Apache Tapestry 5 Co-creator of wooki @wookicentral.com
Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer
Am 13.09.2010 22:18, schrieb Thiago H. de Paula Figueiredo: On Mon, 13 Sep 2010 17:02:02 -0300, Christophe Cordenier wrote: Please, Can you provide your Tapestry Module class that contributes your worker ? And the worker itself? It seems two different worker instances are trying to add the same method to the same page class. files attached! appreciate your help. // Copyright 2005 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.portlet.services; import java.io.IOException; import java.util.List; import javax.portlet.*; import javax.servlet.http.Cookie; import org.apache.tapestry5.SymbolConstants; import org.apache.tapestry5.internal.portlet.services.*; import org.apache.tapestry5.internal.services.*; import org.apache.tapestry5.ioc.*; import org.apache.tapestry5.ioc.annotations.*; import org.apache.tapestry5.ioc.services.PipelineBuilder; import org.apache.tapestry5.ioc.services.PropertyShadowBuilder; import org.apache.tapestry5.portlet.PortletConstants; import org.apache.tapestry5.portlet.PortletPageResolver; import org.apache.tapestry5.services.*; import org.apache.tapestry5.upload.services.MultipartDecoder; import org.slf4j.Logger; public final class PortletModule { public static void bind(ServiceBinder binder) { binder.bind(PortletRequestGlobals.class, PortletRequestGlobalsImpl.class); binder.bind(ComponentEventLinkEncoder.class, ComponentEventLinkEncoderImplPortlet.class).withId("ComponentEventLinkEncoderImplPortlet"); } public static void contributeApplicationDefaults(MappedConfiguration configuration) { configuration.add(SymbolConstants.FORCE_ABSOLUTE_URIS, "true"); configuration.add(SymbolConstants.SUPPRESS_REDIRECT_FROM_ACTION_REQUESTS, "true"); } public void contributeComponentClassTransformWorker(OrderedConfiguration configuration) { configuration.addInstance("PortletRequestParameterWorker", PortletRequestParameterWorker.class); } /** * Builds a shadow of the PortletRequestGlobals.portletRequest property. Note again that the shadow can be * an ordinary singleton, even though PortletRequestGlobals is perthread. */ @Marker(PortletInterfaceProvider.class) public PortletRequest buildPortletRequest( PropertyShadowBuilder shadowBuilder, PortletRequestGlobals portletRequestGlobals) { return shadowBuilder.build(portletRequestGlobals, "portletRequest", PortletRequest.class); } /** * Builds a shadow of the PortletRequestGlobals.actionRequest property. Note again that the shadow can be * an ordinary singleton, even though PortletRequestGlobals is perthread. */ @Marker(ActionInterfaceProvider.class) public ActionRequest buildActionRequest( PropertyShadowBuilder shadowBuilder, PortletRequestGlobals portletRequestGlobals) { return shadowBuilder.build(portletRequestGlobals, "actionRequest", ActionRequest.class); } /** * Builds a shadow of the PortletRequestGlobals.renderRequest property. Note again that the shadow can be * an ordinary singleton, even though PortletRequestGlobals is perthread. */ @Marker(RenderInterfaceProvider.class) public RenderRequest buildRenderRequest( PropertyShadowBuilder shadowBuilder, PortletRequestGlobals portletRequestGlobals) { return shadowBuilder.build(portletRequestGlobals, "renderRequest", RenderRequest.class); } @Marker(ResourceInterfaceProvider.class) public ResourceRequest buildResourceRequest( PropertyShadowBuilder shadowBuilder, PortletRequestGlobals portletRequestGlobals) { return shadowBuilder.build(portletRequestGlobals, "resourceRequest", ResourceRequest.class); } /** * Builds a shadow of the PortletRequestGlobals.portletResponse property. Note again tha
Asset Security in 5.1.0.5
Hi, I just noticed I can access a disturbing amount of files through the assets/ path from my application. The user guide for 5.0 states that Tapestry automatically blocks access to all assets and only whitelists critical Tapestry files http://tapestry.apache.org/tapestry5.0/guide/assets.html . However, looking at the 5.1 guide there is no mention of security like in the 5.0 guide. I haven't made any contributions to an AssetPathAuthorizer or even known about them, so I don't think I've done something to specifically allow access to the files via Tapestry code. How can I get the files in my classpath and web context blocked? Thanks, Rich - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer
On Mon, 13 Sep 2010 17:02:02 -0300, Christophe Cordenier wrote: Please, Can you provide your Tapestry Module class that contributes your worker ? And the worker itself? It seems two different worker instances are trying to add the same method to the same page class. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Resteasy and security (again)
Thanks, the tapestry-resteasy api document still shows the contributeIgnoredPathsFilter reference. Which is actually not in the ResteasyModule of release 0.2.0 http://tynamo.org/constant/tapestry-resteasy/apidocs/org/tynamo/resteasy/ResteasyModule.html Regards Moritz Am 13.09.2010 um 21:05 schrieb Alejandro Scandroli: > The new tapestry-resteasy 0.2.0 doesn't use the IgnoredPaths filter anymore. > This new version doesn't require you to modify your web.xml because is > implemented as a HttpServletRequestFilter and contributed to the > HttpServletRequestHandler. > Are you using tapestry-resteasy 0.2.0? if not I suggest you to > upgrade. http://tynamo.org/tapestry-resteasy+guide > > If your problem is related to the order of the > HttpServletRequestFilter in the HttpServletRequestHandler here is the > resteasy contribution: > > public static void > contributeHttpServletRequestHandler(OrderedConfiguration > configuration, > > @InjectService("ResteasyRequestFilter") > > HttpServletRequestFilter resteasyRequestFilter) > { > configuration.add("ResteasyRequestFilter", > resteasyRequestFilter, > "before:GZIP"); > } > > You can set your filter before resteasy with: "before:ResteasyRequestFilter". > > I hope it helps. > Saludos. > Alejandro Scandroli. > > > On Mon, Sep 13, 2010 at 5:22 PM, Christophe Cordenier > wrote: >> Hi ! >> >> See how IgnoredPaths filter is contributed in TapestryModule class, then use >> >> before:IgnoredPaths >> >> to execute your filter before Tapestry's one >> >> HTH >> >> >> 2010/9/13 Moritz Gmelin >> >>> Hi, >>> >>> I've been able to create some kind of authentication filter for my tapestry >>> webapp. Now I'd like to have this same filter work with the >>> tapestry-resteasy webservices of the application. But since the resteasy >>> module adds the rest path to the tapestry-ignored-paths. My filter is >>> ignored by the rest services. How can I add filters to the http processing >>> of my rest services? >>> >>> Thanks >>> >>> Moritz >>> - >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>> For additional commands, e-mail: users-h...@tapestry.apache.org >>> >>> >> >> >> -- >> Regards, >> Christophe Cordenier. >> >> Committer on Apache Tapestry 5 >> Co-creator of wooki @wookicentral.com >> > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer
Please, Can you provide your Tapestry Module class that contributes your worker ? 2010/9/9 Markus Feindler > No, I get the exception for all pages, also the ExpcetionReportPage for > example. > > > > > Original-Nachricht > > Datum: Thu, 9 Sep 2010 08:26:05 +0200 > > Von: Christophe Cordenier > > An: Tapestry users > > Betreff: Re: Retrieve ActivationRequestParameters in custom > > PageResponseRenderer > > > > Weird, does you Index page extends a base class ? > > > > 2010/9/8 Markus Feindler > > > > > Sorry to bother you, but Im stuck with a DuplicateMemberException: > > > Caused by: java.lang.RuntimeException: > > > javassist.bytecode.DuplicateMemberException: duplicate method: > > > extractRequestParameters in de.wiv.tapestryportlet2.pages.Index > > >at > > > > > > org.apache.tapestry5.internal.services.InternalClassTransformationImpl.addOverrideOfSuperclassMethod(InternalClassTransformationImpl.java:1458) > > >at > > > > > > org.apache.tapestry5.internal.services.InternalClassTransformationImpl.findOrOverrideMethod(InternalClassTransformationImpl.java:1412) > > >at > > > > > > org.apache.tapestry5.internal.services.InternalClassTransformationImpl.findOverrideOrCreateMethod(InternalClassTransformationImpl.java:1397) > > >at > > > > > > org.apache.tapestry5.internal.services.InternalClassTransformationImpl.getOrCreateMethod(InternalClassTransformationImpl.java:1392) > > >at > > > > > > org.apache.tapestry5.portlet.services.PortletRequestParameterWorker.transform(PortletRequestParameterWorker.java:48) > > >at > > > > > > $ComponentClassTransformWorker_12af2cfc4c4.transform($ComponentClassTransformWorker_12af2cfc4c4.java) > > >at > > > > > > $ComponentClassTransformWorker_12af2cfc4c5.transform($ComponentClassTransformWorker_12af2cfc4c5.java) > > >at > > > > > > $ComponentClassTransformWorker_12af2cfc4b6.transform($ComponentClassTransformWorker_12af2cfc4b6.java) > > >at > > > > > > org.apache.tapestry5.internal.services.ComponentClassTransformerImpl$1.run(ComponentClassTransformerImpl.java:194) > > >... 250 more > > > Caused by: javassist.bytecode.DuplicateMemberException: duplicate > > method: > > > extractRequestParameters in de.wiv.tapestryportlet2.pages.Index > > >at > > javassist.bytecode.ClassFile.testExistingMethod(ClassFile.java:637) > > >at javassist.bytecode.ClassFile.addMethod(ClassFile.java:613) > > >at javassist.CtClassType.addMethod(CtClassType.java:1320) > > >at > > > > > > org.apache.tapestry5.internal.services.InternalClassTransformationImpl.addOverrideOfSuperclassMethod(InternalClassTransformationImpl.java:1444) > > >... 258 more > > > > > > This is my worker: > > > > > > public class PortletRequestParameterWorker implements > > > ComponentClassTransformWorker { > > > > > >private final ValueEncoderSource valueEncoderSource; > > >private final ComponentClassCache classCache; > > >private final RequestParameterContext requestParameterContext; > > >private final ComponentSource componentSource; > > > > > >public PortletRequestParameterWorker(ValueEncoderSource > > > valueEncoderSource, > > >ComponentClassCache classCache, RequestParameterContext > > > requestParameterContext, > > >ComponentSource componentSource) { > > >this.valueEncoderSource = valueEncoderSource; > > >this.classCache = classCache; > > >this.requestParameterContext = requestParameterContext; > > >this.componentSource = componentSource; > > >} > > > > > >public void transform(final ClassTransformation transformation, > > >MutableComponentModel model) { > > > > > > > > > > > transformation.addImplementedInterface(RequestParameterExtractor.class); > > >TransformMethodSignature extractMethod = new > > > TransformMethodSignature(Modifier.PUBLIC, > > >"Map", "extractRequestParameters", > > null, > > > null); > > > //if (transformation.isDeclaredMethod(extractMethod)) { > > > //return; > > > //} > > > > > transformation.getOrCreateMethod(extractMethod).addAdvice(new > > > ComponentMethodAdvice(){ > > > > > >public void advise(ComponentMethodInvocation invocation) > > { > > >Map requestParameters = new > > > HashMap(); > > >for (TransformField field : > > > > > > transformation.matchFieldsWithAnnotation(ActivationRequestParameter.class)) > > > { > > >String parameterName = getParameterName(field, > > > field.getAnnotation(ActivationRequestParameter.class)); > > >Class fieldType = > > > classCache.forName(field.getType()); > > >FieldAccess access = field.getAccess(); > > >ValueEncoder encoder = > > > valueEncoderSource.getValueEncoder(fieldType); > > >Object value = > > > access.read(invocation.getInst
Re: Resteasy and security (again)
The new tapestry-resteasy 0.2.0 doesn't use the IgnoredPaths filter anymore. This new version doesn't require you to modify your web.xml because is implemented as a HttpServletRequestFilter and contributed to the HttpServletRequestHandler. Are you using tapestry-resteasy 0.2.0? if not I suggest you to upgrade. http://tynamo.org/tapestry-resteasy+guide If your problem is related to the order of the HttpServletRequestFilter in the HttpServletRequestHandler here is the resteasy contribution: public static void contributeHttpServletRequestHandler(OrderedConfiguration configuration, @InjectService("ResteasyRequestFilter") HttpServletRequestFilter resteasyRequestFilter) { configuration.add("ResteasyRequestFilter", resteasyRequestFilter, "before:GZIP"); } You can set your filter before resteasy with: "before:ResteasyRequestFilter". I hope it helps. Saludos. Alejandro Scandroli. On Mon, Sep 13, 2010 at 5:22 PM, Christophe Cordenier wrote: > Hi ! > > See how IgnoredPaths filter is contributed in TapestryModule class, then use > > before:IgnoredPaths > > to execute your filter before Tapestry's one > > HTH > > > 2010/9/13 Moritz Gmelin > >> Hi, >> >> I've been able to create some kind of authentication filter for my tapestry >> webapp. Now I'd like to have this same filter work with the >> tapestry-resteasy webservices of the application. But since the resteasy >> module adds the rest path to the tapestry-ignored-paths. My filter is >> ignored by the rest services. How can I add filters to the http processing >> of my rest services? >> >> Thanks >> >> Moritz >> - >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > > > -- > Regards, > Christophe Cordenier. > > Committer on Apache Tapestry 5 > Co-creator of wooki @wookicentral.com > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: Enum mask
Thanks Thiago - I'll give that a shot. Regards, Jim. -Original Message- From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] Sent: 13 September 2010 18:26 To: Tapestry users Subject: Re: Enum mask On Mon, 13 Sep 2010 14:03:05 -0300, Jim O'Callaghan wrote: > Thanks Howard. Is there an easier way, just using a mixin that takes > another parameter (ex. a comma separated list of include / exclude list > index entries) from the template and in the mixin beginRender etc. > performs an op on the model created from the Enum? Tapestry doesn't have one out-of-the-box, but creating such a mixin would be almost easy. ;) Just rewrite the DOM after the rendering of the Select component. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informa��o Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer
Any ideas? Howard? No, I get the exception for all pages, also the ExpcetionReportPage for example. Original-Nachricht Datum: Thu, 9 Sep 2010 08:26:05 +0200 Von: Christophe Cordenier An: Tapestry users Betreff: Re: Retrieve ActivationRequestParameters in custom PageResponseRenderer Weird, does you Index page extends a base class ? 2010/9/8 Markus Feindler Sorry to bother you, but Im stuck with a DuplicateMemberException: Caused by: java.lang.RuntimeException: javassist.bytecode.DuplicateMemberException: duplicate method: extractRequestParameters in de.wiv.tapestryportlet2.pages.Index at org.apache.tapestry5.internal.services.InternalClassTransformationImpl.addOverrideOfSuperclassMethod(InternalClassTransformationImpl.java:1458) at org.apache.tapestry5.internal.services.InternalClassTransformationImpl.findOrOverrideMethod(InternalClassTransformationImpl.java:1412) at org.apache.tapestry5.internal.services.InternalClassTransformationImpl.findOverrideOrCreateMethod(InternalClassTransformationImpl.java:1397) at org.apache.tapestry5.internal.services.InternalClassTransformationImpl.getOrCreateMethod(InternalClassTransformationImpl.java:1392) at org.apache.tapestry5.portlet.services.PortletRequestParameterWorker.transform(PortletRequestParameterWorker.java:48) at $ComponentClassTransformWorker_12af2cfc4c4.transform($ComponentClassTransformWorker_12af2cfc4c4.java) at $ComponentClassTransformWorker_12af2cfc4c5.transform($ComponentClassTransformWorker_12af2cfc4c5.java) at $ComponentClassTransformWorker_12af2cfc4b6.transform($ComponentClassTransformWorker_12af2cfc4b6.java) at org.apache.tapestry5.internal.services.ComponentClassTransformerImpl$1.run(ComponentClassTransformerImpl.java:194) ... 250 more Caused by: javassist.bytecode.DuplicateMemberException: duplicate method: extractRequestParameters in de.wiv.tapestryportlet2.pages.Index at javassist.bytecode.ClassFile.testExistingMethod(ClassFile.java:637) at javassist.bytecode.ClassFile.addMethod(ClassFile.java:613) at javassist.CtClassType.addMethod(CtClassType.java:1320) at org.apache.tapestry5.internal.services.InternalClassTransformationImpl.addOverrideOfSuperclassMethod(InternalClassTransformationImpl.java:1444) ... 258 more This is my worker: public class PortletRequestParameterWorker implements ComponentClassTransformWorker { private final ValueEncoderSource valueEncoderSource; private final ComponentClassCache classCache; private final RequestParameterContext requestParameterContext; private final ComponentSource componentSource; public PortletRequestParameterWorker(ValueEncoderSource valueEncoderSource, ComponentClassCache classCache, RequestParameterContext requestParameterContext, ComponentSource componentSource) { this.valueEncoderSource = valueEncoderSource; this.classCache = classCache; this.requestParameterContext = requestParameterContext; this.componentSource = componentSource; } public void transform(final ClassTransformation transformation, MutableComponentModel model) { transformation.addImplementedInterface(RequestParameterExtractor.class); TransformMethodSignature extractMethod = new TransformMethodSignature(Modifier.PUBLIC, "Map", "extractRequestParameters", null, null); //if (transformation.isDeclaredMethod(extractMethod)) { //return; //} transformation.getOrCreateMethod(extractMethod).addAdvice(new ComponentMethodAdvice(){ public void advise(ComponentMethodInvocation invocation) { Map requestParameters = new HashMap(); for (TransformField field : transformation.matchFieldsWithAnnotation(ActivationRequestParameter.class)) { String parameterName = getParameterName(field, field.getAnnotation(ActivationRequestParameter.class)); Class fieldType = classCache.forName(field.getType()); FieldAccess access = field.getAccess(); ValueEncoder encoder = valueEncoderSource.getValueEncoder(fieldType); Object value = access.read(invocation.getInstance()); if (value == null) continue; String clientValue = encoder.toClient(value); requestParameters.put(parameterName, clientValue); } invocation.overrideResult(requestParameters); } }); } private String getParameterName(TransformField field, ActivationRequestParameter annotation) { if (annotation.value().equals("")) return field.getName(); return annotation.value(); } } Any ideas? Hi ! Tapestry 5.2 h
Re: Enum mask
On Mon, 13 Sep 2010 14:03:05 -0300, Jim O'Callaghan wrote: Thanks Howard. Is there an easier way, just using a mixin that takes another parameter (ex. a comma separated list of include / exclude list index entries) from the template and in the mixin beginRender etc. performs an op on the model created from the Enum? Tapestry doesn't have one out-of-the-box, but creating such a mixin would be almost easy. ;) Just rewrite the DOM after the rendering of the Select component. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: Enum mask
Thanks Howard. Is there an easier way, just using a mixin that takes another parameter (ex. a comma separated list of include / exclude list index entries) from the template and in the mixin beginRender etc. performs an op on the model created from the Enum? I was hoping to not have to duplicate the creation of the model from the enum, camel casing it etc. that the existing SelectModel does. I'm working with 5.2 - perhaps there are some new features I can take advantage of. Regards, Jim. -Original Message- From: Howard Lewis Ship [mailto:hls...@gmail.com] Sent: 13 September 2010 17:43 To: Tapestry users Subject: Re: Enum mask No, in that case, you'd want to create your own SelectModel and populate it. You may inject and use the SelectModelFactory service to help with this. On Mon, Sep 13, 2010 at 9:15 AM, Jim O'Callaghan wrote: > Tapestry provides a very handy facility for presenting enums as drop down > lists for display - is there anything built-in that allows certain values > for the enum to be hidden from the generated drop down list? Ex. where a > status transition follows a strict order where A can be progressed to B and > then to C, but B cannot got back to A, so in the case where an entity is > already at status B, I only want to display B and C as options for > selection. Similarly if A needs to go to B before C, when an entity has > status A, I only want to display A, B rather than A, B, C. > > > > Regards, > > Jim. > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: How to apply a css class to a tapestry component?
Added to the FAQ. On Mon, Sep 13, 2010 at 9:11 AM, Thiago H. de Paula Figueiredo wrote: > Short answer: just add it. > Not-so-short answer: this will only work for components that render informal > parameters (any attribute that isn't a parameter). They're annotated with > @SupportsInformalParameters. AjaxFormLoop isn't one of them. > > -- > Thiago H. de Paula Figueiredo > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and > instructor > Owner, Ars Machina Tecnologia da Informação Ltda. > http://www.arsmachina.com.br > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Enum mask
No, in that case, you'd want to create your own SelectModel and populate it. You may inject and use the SelectModelFactory service to help with this. On Mon, Sep 13, 2010 at 9:15 AM, Jim O'Callaghan wrote: > Tapestry provides a very handy facility for presenting enums as drop down > lists for display - is there anything built-in that allows certain values > for the enum to be hidden from the generated drop down list? Ex. where a > status transition follows a strict order where A can be progressed to B and > then to C, but B cannot got back to A, so in the case where an entity is > already at status B, I only want to display B and C as options for > selection. Similarly if A needs to go to B before C, when an entity has > status A, I only want to display A, B rather than A, B, C. > > > > Regards, > > Jim. > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5 Eventlink Query
On Mon, 13 Sep 2010 06:27:18 -0300, ael wrote: Hello Everyone Hi! I have two template. ex. template 1 & template 2. Then in template 2 i have an eventlink. My question is how can i link the eventlink from page 1? You should avoid triggering events from one page to another one. Use an event in page 1 then redirect to page 2: ... @InjectPage private Page2 page2; Object onYourEventName() { // invoke methods in page2; return page2; } -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Validation of a component inside a Form
Hi! Is it possible to send validation errors to the outer form in which a component is used? For example, I have this code [...] [...] The component itself also contains submit buttons. If I press one of these but there is a validation error which I check in the Java code of the component, how do I send this error to the surrounding form? TIA Stephan - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
T5 Eventlink Query
Hello Everyone I have two template. ex. template 1 & template 2. Then in template 2 i have an eventlink. My question is how can i link the eventlink from page 1? Example i will click a link from page 1 then it will trigger the eventlink on page 2. Any ideas :) ty... -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-Eventlink-Query-tp2837470p2837470.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Enum mask
Tapestry provides a very handy facility for presenting enums as drop down lists for display - is there anything built-in that allows certain values for the enum to be hidden from the generated drop down list? Ex. where a status transition follows a strict order where A can be progressed to B and then to C, but B cannot got back to A, so in the case where an entity is already at status B, I only want to display B and C as options for selection. Similarly if A needs to go to B before C, when an entity has status A, I only want to display A, B rather than A, B, C. Regards, Jim.
Re: How to apply a css class to a tapestry component?
Short answer: just add it. Not-so-short answer: this will only work for components that render informal parameters (any attribute that isn't a parameter). They're annotated with @SupportsInformalParameters. AjaxFormLoop isn't one of them. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
How to apply a css class to a tapestry component?
I try this: The class attribute disappears. Previously I've simply slapped the class onto a wrapping div or something and changed the css accordingly, but this problem pops up over and over and I'd like an easier solution to it. -- View this message in context: http://tapestry-users.832.n2.nabble.com/How-to-apply-a-css-class-to-a-tapestry-component-tp5526814p5526814.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Resteasy and security (again)
Hi ! See how IgnoredPaths filter is contributed in TapestryModule class, then use before:IgnoredPaths to execute your filter before Tapestry's one HTH 2010/9/13 Moritz Gmelin > Hi, > > I've been able to create some kind of authentication filter for my tapestry > webapp. Now I'd like to have this same filter work with the > tapestry-resteasy webservices of the application. But since the resteasy > module adds the rest path to the tapestry-ignored-paths. My filter is > ignored by the rest services. How can I add filters to the http processing > of my rest services? > > Thanks > > Moritz > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Regards, Christophe Cordenier. Committer on Apache Tapestry 5 Co-creator of wooki @wookicentral.com
Re: [T5] Key order in JSONObject
I'd open an issue at that prototype component instead - a json object is an unordered collection of key/value pairs. If order is important, they should be using arrays. AFAIK, at least in Chrome and Opera the iteration order is not guaranted to be the same as the insertion order. On Mon, Sep 13, 2010 at 17:28, Michael Dukaczewski wrote: > Hi! > > I have a problem with the JSONObject in Tapestry. I would like to use a > Javascript Prototype component which expects a JSON object. The > component outputs the data in the order they were transmitted in the > JSON object. The problem is that in the implementation of the JSONObject > in Tapestry a map is used and therefore the order is lost. Here, an > OrderedMap would be the better choose. Should I open a JIRA on this? > > Regards, > Michael > > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr Tapestry PMC / Tacos developer Open Source / JEE Consulting - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Resteasy and security (again)
Hi, I've been able to create some kind of authentication filter for my tapestry webapp. Now I'd like to have this same filter work with the tapestry-resteasy webservices of the application. But since the resteasy module adds the rest path to the tapestry-ignored-paths. My filter is ignored by the rest services. How can I add filters to the http processing of my rest services? Thanks Moritz - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Validation of a component inside a Form
On Mon, 13 Sep 2010 11:56:17 -0300, Stephan Windmüller wrote: The line String submittedValue = request.getParameter(elementName); produces "null" every time. You'll have to generate the id and name of the HTML form fields in a way that you can get them back when the form is submitted. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Validation of a component inside a Form
On 13.09.2010 16:21, Thiago H. de Paula Figueiredo wrote: > It doesn't require much background knowledge. Just take a look at this > method implementation in the Select component: Thanks for the hint. I tried it, but it does not work. I do not know if this has to do with my problem but submitting the form with the component (which is a list of strings which can be added and removed) does result in not getting the values in the class of the outer form. The line > String submittedValue = request.getParameter(elementName); produces "null" every time. Do I have to set the parameter at another location myself? Regards Stephan - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[T5] Key order in JSONObject
Hi! I have a problem with the JSONObject in Tapestry. I would like to use a Javascript Prototype component which expects a JSON object. The component outputs the data in the order they were transmitted in the JSON object. The problem is that in the implementation of the JSONObject in Tapestry a map is used and therefore the order is lost. Here, an OrderedMap would be the better choose. Should I open a JIRA on this? Regards, Michael - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Validation of a component inside a Form
On Mon, 13 Sep 2010 10:26:51 -0300, Stephan Windmüller wrote: tracker.recordError(...); If one of this components creates form fields, a good approach is to make> the component an AbstractField sublclass. That requires an implementation of processSubmission and this in turn requires some background knowledge about Tapestry which I do not have. ;) It doesn't require much background knowledge. Just take a look at this method implementation in the Select component: @Override protected void processSubmission(String elementName) { String submittedValue = request.getParameter(elementName); tracker.recordInput(this, submittedValue); Object selectedValue = InternalUtils.isBlank(submittedValue) ? null : encoder.toValue(submittedValue); try { fieldValidationSupport.validate(selectedValue, resources, validate); value = selectedValue; } catch (ValidationException ex) { tracker.recordError(this, ex.getMessage()); } } -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: URL Patterns
Oh, cool, I found the blog entry here : http://blog.tapestry5.de/index.php/2010/01/19/tapestry-ioc-modularization-of-web-applications-without-osgi/ Basically, it is same the problem I'm facing right now. But I don't wanna make the module so intrusive, and I guess Distributed Configuration is nice for that purpose. And it fits with what I wanna do later in my Security Module. Btw, can you share some code for the URL Matching w/ wildcards? :) Thanks! ___ Everton Agner Ramos 2010/9/13 Alessio Gambi > Hi, > There is an interesting blog entry that talks right about the component you > are trying to develop. Just google for Tapestry vs OSGi and you will find > it. > BTW I did it something like that few time ago and I used regexp. > > > On 13-set-2010, at 15:20, Everton Agner wrote: > > > Yes, probably I'll use it if I have to implement it from scratch. I just > > wanted to know if there was something like that already implemented > > > > I'll google it for options, maybe there is some API somewhere. If anyone > > knows, please tell me. > > > > Thanks! > > > > ___ > > Everton Agner Ramos > > > > > > 2010/9/13 Thiago H. de Paula Figueiredo > > > >> On Mon, 13 Sep 2010 09:19:18 -0300, Everton Agner > >> wrote: > >> > >> I'm developing an auto menu builder, which retrives all the pages from > the > >>> ComponentSource service. But since core pages are included on it (like > >>> /core/servicestatus or something like that), I've created another > service > >>> for IgnoredPaths, and I wanna configure paths as Patterns, like > "core/*". > >>> I should be OK if i had something like what Ant does for paths and > >>> wildcard,that could match patterns like "core/*" and some improved > paths > >>> like > >>> "**/users/*". > >>> > >> > >> Tapestry has nothing like that. Have you thought about using regular > >> expressions? > >> > >> > >> -- > >> Thiago H. de Paula Figueiredo > >> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, > >> and instructor > >> Owner, Ars Machina Tecnologia da Informação Ltda. > >> http://www.arsmachina.com.br > >> > >> - > >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > >> For additional commands, e-mail: users-h...@tapestry.apache.org > >> > >> > > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Re: URL Patterns
Hi, There is an interesting blog entry that talks right about the component you are trying to develop. Just google for Tapestry vs OSGi and you will find it. BTW I did it something like that few time ago and I used regexp. On 13-set-2010, at 15:20, Everton Agner wrote: > Yes, probably I'll use it if I have to implement it from scratch. I just > wanted to know if there was something like that already implemented > > I'll google it for options, maybe there is some API somewhere. If anyone > knows, please tell me. > > Thanks! > > ___ > Everton Agner Ramos > > > 2010/9/13 Thiago H. de Paula Figueiredo > >> On Mon, 13 Sep 2010 09:19:18 -0300, Everton Agner >> wrote: >> >> I'm developing an auto menu builder, which retrives all the pages from the >>> ComponentSource service. But since core pages are included on it (like >>> /core/servicestatus or something like that), I've created another service >>> for IgnoredPaths, and I wanna configure paths as Patterns, like "core/*". >>> I should be OK if i had something like what Ant does for paths and >>> wildcard,that could match patterns like "core/*" and some improved paths >>> like >>> "**/users/*". >>> >> >> Tapestry has nothing like that. Have you thought about using regular >> expressions? >> >> >> -- >> Thiago H. de Paula Figueiredo >> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, >> and instructor >> Owner, Ars Machina Tecnologia da Informação Ltda. >> http://www.arsmachina.com.br >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Validation of a component inside a Form
On 13.09.2010 14:47, Thiago H. de Paula Figueiredo wrote: >> Is it possible to send validation errors to the outer form in which a >> component is used? > @Environmental > private ValidationTracker tracker; That works, thanks for the quick reply! > tracker.recordError(...); > If one of this components creates form fields, a good approach is to make > the component an AbstractField sublclass. That requires an implementation of processSubmission and this in turn requires some background knowledge about Tapestry which I do not have. ;) Regards Stephan - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: URL Patterns
Yes, probably I'll use it if I have to implement it from scratch. I just wanted to know if there was something like that already implemented I'll google it for options, maybe there is some API somewhere. If anyone knows, please tell me. Thanks! ___ Everton Agner Ramos 2010/9/13 Thiago H. de Paula Figueiredo > On Mon, 13 Sep 2010 09:19:18 -0300, Everton Agner > wrote: > > I'm developing an auto menu builder, which retrives all the pages from the >> ComponentSource service. But since core pages are included on it (like >> /core/servicestatus or something like that), I've created another service >> for IgnoredPaths, and I wanna configure paths as Patterns, like "core/*". >> I should be OK if i had something like what Ant does for paths and >> wildcard,that could match patterns like "core/*" and some improved paths >> like >> "**/users/*". >> > > Tapestry has nothing like that. Have you thought about using regular > expressions? > > > -- > Thiago H. de Paula Figueiredo > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, > and instructor > Owner, Ars Machina Tecnologia da Informação Ltda. > http://www.arsmachina.com.br > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Re: Validation of a component inside a Form
On Mon, 13 Sep 2010 09:36:40 -0300, Stephan Windmüller wrote: Hi! Hi! Is it possible to send validation errors to the outer form in which a component is used? @Environmental private ValidationTracker tracker; tracker.recordError(...); If one of this components creates form fields, a good approach is to make the component an AbstractField sublclass. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: URL Patterns
On Mon, 13 Sep 2010 09:19:18 -0300, Everton Agner wrote: I'm developing an auto menu builder, which retrives all the pages from the ComponentSource service. But since core pages are included on it (like /core/servicestatus or something like that), I've created another service for IgnoredPaths, and I wanna configure paths as Patterns, like "core/*". I should be OK if i had something like what Ant does for paths and wildcard,that could match patterns like "core/*" and some improved paths like "**/users/*". Tapestry has nothing like that. Have you thought about using regular expressions? -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Validation of a component inside a Form
Hi! Is it possible to send validation errors to the outer form in which a component is used? For example, I have this code [...] [...] The component itself also contains submit buttons. If I press one of these but there is a validation error which I check in the Java code of the component, how do I send this error to the surrounding form? TIA Stephan - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: URL Patterns
I'm developing an auto menu builder, which retrives all the pages from the ComponentSource service. But since core pages are included on it (like /core/servicestatus or something like that), I've created another service for IgnoredPaths, and I wanna configure paths as Patterns, like "core/*". I should be OK if i had something like what Ant does for paths and wildcard, that could match patterns like "core/*" and some improved paths like "**/users/*". And since I'll develop a Security Module in the future, having something like this will be necessary for what I need to do later. Thanks! ___ Everton Agner Ramos 2010/9/12 Thiago H. de Paula Figueiredo > On Sun, 12 Sep 2010 17:23:25 -0300, Everton Agner > wrote: > > Hi, >> > > Hi! > > Does Tapestry internally have any Utils class for URL Matching with >> wildcards? Or does it uses some external API for that (like Ant's). >> > > AFAIK, no for wildcards. For all its URL handling, Tapestry uses the > ComponentEventLinkEncoder service. > > What's exactly your scenario here? > > -- > Thiago H. de Paula Figueiredo > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, > and instructor > Owner, Ars Machina Tecnologia da Informação Ltda. > http://www.arsmachina.com.br > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Re: T5 Eventlink Query
On Mon, 13 Sep 2010 06:55:31 -0300, Elin wrote: Im just starting with tapestry but, why would you like to do that? Do what? As far as i know, the eventlink is very similar to the actionlink, and its usually used for some kind of ajax request. I disagree. Both components are used for both AJAX and non-AJAX events. Could you explain a bit more what are you trying to do with those 2 templates? They're not templates, they're components. ActionLink exists since Tapestry exists and always trigger the same event ("action"). EventLink was created later and allows you to define the name of the event to be triggered. There's absolutely no other difference between them. I consider ActionLink deprecated at this point. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: what is wrong???
resolve it!! javassist-3.9.0.GA.jar not javassist-3.6.0.CR1.jar!!! On 2010-9-13 17:34, Fanzhen wrote: I use Tomcat6 , well I deploy it in tomcat of my pc. I get the same error. does it matter with tomcat?? oh , god!! get headache!! - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5 Eventlink Query
Im just starting with tapestry but, why would you like to do that? As far as i know, the eventlink is very similar to the actionlink, and its usually used for some kind of ajax request. Could you explain a bit more what are you trying to do with those 2 templates? -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-Eventlink-Query-tp2837470p2837503.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: what is wrong???
I use Tomcat6 , well I deploy it in tomcat of my pc. I get the same error. does it matter with tomcat?? oh , god!! get headache!! - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: what is wrong???
sorry,what's your tml page code? On Mon, Sep 13, 2010 at 5:10 PM, Fanzhen wrote: > > well, it work well on my pc. but when I upload the whole project to the > server, I got errors :: > I am sure the LibraryCreate Class is in the right directory > > > Caused by: java.lang.ClassNotFoundException: caught an exception while > obtaining a class file for > com.yuedong.pnews.pages.security.mms.LibraryCreate > at javassist.Loader.findClass(Loader.java:359) > at > org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$PackageAwareLoader.findClass(ComponentInstantiatorSourceImpl.java:94) > at javassist.Loader.loadClass(Loader.java:311) > at java.lang.ClassLoader.loadClass(Unknown Source) > at > org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.findClass(ComponentInstantiatorSourceImpl.java:296) > ... 63 more > Caused by: org.apache.tapestry5.internal.services.TransformationException: > javassist.CannotCompileException: broken method > at > org.apache.tapestry5.internal.services.ComponentClassTransformerImpl.transformComponentClass(ComponentClassTransformerImpl.java:176) > at > $ComponentClassTransformer_12b0a558c91.transformComponentClass($ComponentClassTransformer_12b0a558c91.java) > at > org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.onLoad(ComponentInstantiatorSourceImpl.java:205) > at javassist.Loader.findClass(Loader.java:340) > ... 67 more > Caused by: java.lang.RuntimeException: javassist.CannotCompileException: > broken method > at > org.apache.tapestry5.internal.services.InternalClassTransformationImpl.replaceFieldAccess(InternalClassTransformationImpl.java:1767) > at > org.apache.tapestry5.internal.services.InternalClassTransformationImpl.performFieldTransformations(InternalClassTransformationImpl.java:1691) > at > org.apache.tapestry5.internal.services.InternalClassTransformationImpl.finish(InternalClassTransformationImpl.java:1336) > at > org.apache.tapestry5.internal.services.ComponentClassTransformerImpl.transformComponentClass(ComponentClassTransformerImpl.java:172) > ... 70 more > Caused by: javassist.CannotCompileException: broken method > at javassist.expr.FieldAccess.replace(FieldAccess.java:218) > at > org.apache.tapestry5.internal.services.InternalClassTransformationImpl$3.edit(InternalClassTransformationImpl.java:1757) > at javassist.expr.ExprEditor.loopBody(ExprEditor.java:197) > at javassist.expr.ExprEditor.doit(ExprEditor.java:90) > at javassist.CtClassType.instrument(CtClassType.java:1288) > at > org.apache.tapestry5.internal.services.InternalClassTransformationImpl.replaceFieldAccess(InternalClassTransformationImpl.java:1763) > ... 73 more > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- cleverpig(Dan) Location: Beijing Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China Zipcode: 100031 MSN: great_liu...@hotmail.com QQ: 149291732 Skype: cleverpigatmatrix Facebook ID:cleverpig Blog: cleverpig.name/dan/ Tags: del.icio.us/cleverpig Twitter: twitter.com/cleverpig 新浪微博: t.sina.com.cn/cleverpig Organization: www.beijing-open-party.org or...@facebook: http://www.facebook.com/group.php?gid=8159558294 - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
what is wrong???
well, it work well on my pc. but when I upload the whole project to the server, I got errors :: I am sure the LibraryCreate Class is in the right directory Caused by: java.lang.ClassNotFoundException: caught an exception while obtaining a class file for com.yuedong.pnews.pages.security.mms.LibraryCreate at javassist.Loader.findClass(Loader.java:359) at org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$PackageAwareLoader.findClass(ComponentInstantiatorSourceImpl.java:94) at javassist.Loader.loadClass(Loader.java:311) at java.lang.ClassLoader.loadClass(Unknown Source) at org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.findClass(ComponentInstantiatorSourceImpl.java:296) ... 63 more Caused by: org.apache.tapestry5.internal.services.TransformationException: javassist.CannotCompileException: broken method at org.apache.tapestry5.internal.services.ComponentClassTransformerImpl.transformComponentClass(ComponentClassTransformerImpl.java:176) at $ComponentClassTransformer_12b0a558c91.transformComponentClass($ComponentClassTransformer_12b0a558c91.java) at org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.onLoad(ComponentInstantiatorSourceImpl.java:205) at javassist.Loader.findClass(Loader.java:340) ... 67 more Caused by: java.lang.RuntimeException: javassist.CannotCompileException: broken method at org.apache.tapestry5.internal.services.InternalClassTransformationImpl.replaceFieldAccess(InternalClassTransformationImpl.java:1767) at org.apache.tapestry5.internal.services.InternalClassTransformationImpl.performFieldTransformations(InternalClassTransformationImpl.java:1691) at org.apache.tapestry5.internal.services.InternalClassTransformationImpl.finish(InternalClassTransformationImpl.java:1336) at org.apache.tapestry5.internal.services.ComponentClassTransformerImpl.transformComponentClass(ComponentClassTransformerImpl.java:172) ... 70 more Caused by: javassist.CannotCompileException: broken method at javassist.expr.FieldAccess.replace(FieldAccess.java:218) at org.apache.tapestry5.internal.services.InternalClassTransformationImpl$3.edit(InternalClassTransformationImpl.java:1757) at javassist.expr.ExprEditor.loopBody(ExprEditor.java:197) at javassist.expr.ExprEditor.doit(ExprEditor.java:90) at javassist.CtClassType.instrument(CtClassType.java:1288) at org.apache.tapestry5.internal.services.InternalClassTransformationImpl.replaceFieldAccess(InternalClassTransformationImpl.java:1763) ... 73 more - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: How to set up Tapestry 5 on Tomcat 5
One correction, you are referring to Tomcat 5, so the link is here: http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html Beware the classloader has changed in Tomcat 6, there are some considerations when upgrading , but why not use 6 or even 7? Cheers, Peter - Original Message - From: "P Stavrinides" To: "Tapestry users" Sent: Monday, 13 September, 2010 10:53:54 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: How to set up Tapestry 5 on Tomcat 5 Hi, First off let me say there is no right or wrong, just what works best for each person/organization. > 1) I install maven on my PC, where I will develop Tapestry web applications. > 2) Maven will download any missing dependencies, and place them inside my > apps lib folder. Some people loath Maven others love it, but Maven excels in alleviating dependency management issues, an inherent weakness in Java. To elaborate a little... library issues are the pits to track down and fix, so you don't want any versioning mistakes or a mismatch of jars in development vs. production, something that tends to happen all too often, especially when more than one person is involved. On this point, I would also suggest you deploy all your libs in your application war (local lib folder), and as little as possible in your shared folder... I am sure there will be mixed feelings on this issue, as some may argue the drawbacks (i.e.: additional resources and class-loading, deployment of larger wars), but the benefits are far greater in my experience (simpler 'lighter' container, less chance of resource conflicts or configuration errors, threading and memory errors... a leaky jar can bring down your server and all your apps! but what's far worse is when it simply degrades performance, which is even harder to trace). So be very picky as to what goes into shared, and this is the approach advocated in the docs, here: http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html#Class_Loader_Definitions Cheers, Peter - Original Message - From: "Christopher Dodunski" To: users@tapestry.apache.org Sent: Monday, 13 September, 2010 02:40:38 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: How to set up Tapestry 5 on Tomcat 5 Hi, Thank you everyone for your help. For the sake of clarification (please correct me where I am wrong): 3) I can then test run my Tapestry application locally on a local installation of Tomcat. Now, to deployment: 1) I upload the WAR to my VPS via Tomcat manager (i.e. VPS installation of Tomcat). 2) Assuming Tomcat there provides the same dependencies as Tomcat locally (tomcat/shared/lib), my Tapestry application should run fine. Is it the usual practice to rely on maven to place all dependencies inside the applications 'lib' folder? Rather than me manually place required libraries - once and for all - inside tomcat/shared/lib on both Tomcat on my PC AND Tomcat on my VPS? Should maven be installed on my VPS? Thanks & regards, Chris. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: How to set up Tapestry 5 on Tomcat 5
Hi, First off let me say there is no right or wrong, just what works best for each person/organization. > 1) I install maven on my PC, where I will develop Tapestry web applications. > 2) Maven will download any missing dependencies, and place them inside my > apps lib folder. Some people loath Maven others love it, but Maven excels in alleviating dependency management issues, an inherent weakness in Java. To elaborate a little... library issues are the pits to track down and fix, so you don't want any versioning mistakes or a mismatch of jars in development vs. production, something that tends to happen all too often, especially when more than one person is involved. On this point, I would also suggest you deploy all your libs in your application war (local lib folder), and as little as possible in your shared folder... I am sure there will be mixed feelings on this issue, as some may argue the drawbacks (i.e.: additional resources and class-loading, deployment of larger wars), but the benefits are far greater in my experience (simpler 'lighter' container, less chance of resource conflicts or configuration errors, threading and memory errors... a leaky jar can bring down your server and all your apps! but what's far worse is when it simply degrades performance, which is even harder to trace). So be very picky as to what goes into shared, and this is the approach advocated in the docs, here: http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html#Class_Loader_Definitions Cheers, Peter - Original Message - From: "Christopher Dodunski" To: users@tapestry.apache.org Sent: Monday, 13 September, 2010 02:40:38 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: How to set up Tapestry 5 on Tomcat 5 Hi, Thank you everyone for your help. For the sake of clarification (please correct me where I am wrong): 3) I can then test run my Tapestry application locally on a local installation of Tomcat. Now, to deployment: 1) I upload the WAR to my VPS via Tomcat manager (i.e. VPS installation of Tomcat). 2) Assuming Tomcat there provides the same dependencies as Tomcat locally (tomcat/shared/lib), my Tapestry application should run fine. Is it the usual practice to rely on maven to place all dependencies inside the applications 'lib' folder? Rather than me manually place required libraries - once and for all - inside tomcat/shared/lib on both Tomcat on my PC AND Tomcat on my VPS? Should maven be installed on my VPS? Thanks & regards, Chris. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: want to setup a ${xxxx} in my input element!!!
hi fanzhen, try following instead: aaa this will work; and if your adit0 returns null the attribute wont get rendered. i'd recommend to use the T5 checkbox component nevertheless. g, kris Von:Fanzhen An: Tapestry users Datum: 13.09.2010 08:30 Betreff:Re: want to setup a ${} in my input element!!! yes, I really have read it carefully. On 2010-9-13 14:17, Igor Drobiazko wrote: > You should have a look at Tapestry's form components. There is a Checkbox > component. > > On Mon, Sep 13, 2010 at 8:14 AM, Fanzhen wrote: > >> hey, friends want to code like this: >> >> aaa >> bbb >> ccc >> ddd >> >> actually, what is in my page class are: >> >> public String getAudit0(){ >> if() >> return "checked=\"checked\""; >> else >> return ""; >> } >> .. >> >> but the problem is T5 told me "Unexpected character '$' (code 36) (expected >> a name start character) >> at [row,col {unknown-source}]: [27,56]" >> >> could anyone told me how to do with my checkbox or maybe and radio elements >> ? >> I just want to remember what the user input when they do some searching. >> thank you in advance !! >> >> Fanzhen. >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org