Re: How to improve my message component
Is it possible for this message component to auto detect the form submit and to render when the submit is successful? I've tried to use the defer method of the FormSupport, but it occurs after the render phase. Thiago H. de Paula Figueiredo wrote: Em Tue, 25 Aug 2009 10:26:16 -0300, Sebastian Hennebrueder escreveu: Hello, Hi! Instead of using @SessionState, I just use a single @Persist(PersistenceConstants.FLASH) String field and pass it as a parameter or through a setter to my component. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Loop.restoreStateFromStoredClientValue.... in 5.1.0.5
Have you tried to set the property formState of the Loop component to LoopFormState.NONE? That worked for me. Tom Zurkan wrote: it appears that the encoder/decoder now uses the type coercer. did it use that before? i thought it used serialization or simply toString as the default. anyway, when decoding the object, it fails because it does find JDO->Id->Long->String to encode. but, it does not have String->JDO decoder. now, i am just curious if that is a change between 5.0.1.8 and 5.1.0.5? there seems to be a default encoder being set which i'm not sure happened before. i tried setting the loop to volatile but it fails because source is null. this means i would either have to reload the source list or the individual element from the db which i don't want to do. thanks, tom - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Siddhartha Argollo Técnico Judiciário TRE-BA / SEDESI - Seção de Desenvolvimento de Sistemas slargo...@tre-ba.gov.br 3373-7137 - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.0.5] Caching and IE6
With auto-links I wanted to say "links to the same page". For example, when the user clicks the link, a condition for an if is met, rendering a block. With IE, instead of the new state of the page, it shows the same state before the click. I will be foreced to break the logic in several pages, instead of using if and blocks... In the case below, doesn't the date interfere with the URL? Jesse Kuhnert wrote: I don't know what an "auto link" is - but if you are creating ajax requests then you have to do something stupid like: // pseudo javascript var url = "url"; url += new Date(); Otherwise ie will see the same url and not bother to make the request. (a premature optimization I guess) On 8/22/07, Siddhartha Argollo <[EMAIL PROTECTED]> wrote: Hi all, I'm having an annoying problem with my pages in IE6. It doesn't happen with firefox. When the page has auto-links, sometimes it doesn't refresh when the link is clicked. The state before the click continues to be shown in the browser, in despite of the postback. I have to hit the refresh button to view the new state of the page. It even happens with the pager of the Grid component. I already inject all may pages with Anybody else has notice that? Is there something else I might try to solve this issue? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Siddhartha Argollo Técnico Judiciário TRE-BA [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5.0.5] Caching and IE6
That's the problem. The meta tag isn't working... Gabriel Lozano wrote: Hi, I have had the same problem. I have a page for managing the items in a list (select list). But when i go to the page where the list is I have to hit the refresh button. By the way, does the meta content worked? Hope to see a good solution for this!!. 2007/8/22, Siddhartha Argollo <[EMAIL PROTECTED]>: Hi all, I'm having an annoying problem with my pages in IE6. It doesn't happen with firefox. When the page has auto-links, sometimes it doesn't refresh when the link is clicked. The state before the click continues to be shown in the browser, in despite of the postback. I have to hit the refresh button to view the new state of the page. It even happens with the pager of the Grid component. I already inject all may pages with Anybody else has notice that? Is there something else I might try to solve this issue? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Siddhartha Argollo Técnico Judiciário TRE-BA [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[T5.0.5] Caching and IE6
Hi all, I'm having an annoying problem with my pages in IE6. It doesn't happen with firefox. When the page has auto-links, sometimes it doesn't refresh when the link is clicked. The state before the click continues to be shown in the browser, in despite of the postback. I have to hit the refresh button to view the new state of the page. It even happens with the pager of the Grid component. I already inject all may pages with Anybody else has notice that? Is there something else I might try to solve this issue? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] StackMapTable format error
I’m using jdk 6 u2 on windows, and I still get errors using javassist 3.4. Although I don’t know why or how, I learned how to rewrite the code to bypass them. When I switch to 3.6.0 CR1, those errors were solved, but worse ones appeared, so I decided to stay with the devil I know, and switch back to 3.4. The problem must be with javassist on jdk 6. Stephan Schwab wrote: Howard Lewis Ship wrote: I haven't tested myself under JDK 1.6. I suspect its Javassist that's having the problem. Not much we can do about that, except see if there's a newer version of it that can handle JDK 1.6 better. That seems to be a problem with a certain combination of Javassit and the JRE/JDK used. I got this error message as well when executing a Tapestry app on Mac OS X with the developers preview of Java 1.6. Unfortunately there is still no production release available. But on our Linux boxes with Sun's Java 1.6 we don't see that problem. The newer version of Javassist (3.6.0.CR1) seems to have problems with the DP Java 1.6 on the Mac as well. At first it seems to solve the issue, but I got class rewriting trouble later on. So I suspect there is nothing wrong with javassist, but instead the preview release of the JVM is causing the problem. Another inconvenience is that javassist 3.6.0.CR1 in itself seems to be preview as well and is not available via Maven's central repository. Stephan -- Siddhartha Argollo Técnico Judiciário TRE-BA [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
String in validator
Hi all, Is it possible to use a string with spaces as a constraint for a validator? For example: t:validate="required,date=dd/MM/ HH:mm" I tried without quotes, single quotes and double quotes, but I get a syntax error caused by the space inside the constraint string. Thanks, Sid. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: user access control
I think so too. My solution was to contribute to MasterDispatcher with a SecurityDispatcher, that is responsible to verify if the user is authenticated, before he has access to a page. It is a request filter, but inside the tapestry framework, not a servlet filter. Chris Lewis wrote: I apologize for being vague. I don't mean a servlet filter, I mean a filter/filtering system with in the tapestry framework. Something that might allow me to supply access logic before page rendering, so that I don't have to require pages to know about the access control system used. I know this can be implemented in pages and simplified by subclassing, but I'm wondering if there is a cleaner way, a more 'separation of concerns' oriented way (a page is page, not an access controller). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] Head Script Injection
Hi, You could do something like this (on a render method): Element head = writer.getDocument().find("html/head"); head.elementAt(0, "link", "rel", "stylesheet", "type", "text/css", "href", this.defaultCss.toClientURL()); In this case I'm inserting a CSS link. Todd Orr wrote: Is there any way to inject a script tag (via a block) defined in a nested component into the page's head section? I'm trying to create a component that utilizes some specific js, but I find that including the js at the point in the page where the component is rendered hacky. I think that this would be useful in general as sometimes you may need/prefer to add head content from components while you may not have access to the Border component. This would come up when creating reusable libs, for example. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Siddhartha Argollo Técnico Judiciário TRE-BA [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: NPE in Base64InputStream and locked/waiting CheckForUpdatesFilter
concurrent.locks.AbstractQueuedSynchronizer.doAcquireShared(AbstractQueuedSynchronizer.java:842) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireShared(AbstractQueuedSynchronizer.java:1162) at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.lock(ReentrantReadWriteLock.java:594) at org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:70) at org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:110) at $RequestHandler_1139c29ae4a.service($RequestHandler_1139c29ae4a.java) at $RequestHandler_1139c29ae41.service($RequestHandler_1139c29ae41.java) at org.apache.tapestry.services.TapestryModule$11.service(TapestryModule.java:1044) at $HttpServletRequestHandler_1139c29ae40.service($HttpServletRequestHandler_1139c29ae40.java) at org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:135) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:686) at java.lang.Thread.run(Thread.java:619) ... and 199 more of them -- Siddhartha Argollo Técnico Judiciário TRE-BA [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5.0.5] Contributions to MasterDispatcher not working
1) Here's the code of the first service public final class BasicModule { ... /* // It works! public static void contributeHttpServletRequestHandler(OrderedConfiguration configuration, @Symbol(BasicModule.APPLICATION_ENCODING) String requestEncoding) { configuration.add("RequestEncoding", new RequestEncodingFilter(requestEncoding)); } */ // Doesn't work... public static void contributeMasterDispatcher(OrderedConfiguration configuration, @Symbol(BasicModule.APPLICATION_ENCODING) String requestEncoding) { configuration.add("RequestEncoding", new RequestEncodingFilter(requestEncoding)); } ... } 2) Here's the code of the second service public class SecurityModule { ... public static void bind(ServiceBinder binder) { binder.bind(Dispatcher.class, SecurityDispatcher.class).withId("SecurityDispatcher"); } public void contributeSecurityDispatcher(Configuration unsecurePaths) { unsecurePaths.add("/"); unsecurePaths.add("Start"); unsecurePaths.add("assets"); } public void contributeMasterDispatcher(OrderedConfiguration configuration, @InjectService("SecurityDispatcher") Dispatcher securityDispatcher) { configuration.add("SecurityDispatcher", securityDispatcher, "before:*"); } ... } 3) My AppModule @SubModule({ BasicModule.class, SecurityModule.class }) public class AppModule { public void contributeApplicationDefaults(MappedConfigurationString> configuration) { configuration.add(BasicModule.APPLICATION_ENCODING, "utf-8"); } } Only the dispather with "before:*" is called. I´m running with JBoss 4.2.0-GA. Howard Lewis Ship wrote: Going to need to see the code for this. On 7/6/07, Siddhartha Argollo <[EMAIL PROTECTED]> wrote: Hi all, I have two submodules, both used by AppModule. In the first module, I contribute with a "MyFirstDispatcher" to MasterDispatcher and the constraint "before:*". In the second module, I contribute with "MySecondDispatcher" and the constraint "after:MyFirstDispatcher". Although both contributions are correctly done, only MyFirstDispatcher.dispatch is called by the application. The thing is, if I switch the constraints, again only MySecondDispatcher.dispatch is called. If I don't use the constraints, neither service is called. I'm returning false in the dispatch method of both services. Am I forgetting anything? What I'm trying to do is wrong in anyway? I solved my problem contributing to RequestHandler with one of the services and leaving the other one with the constraint "before:*", still contributing to MasterDispatcher (without this constraint, it doesn't work). This way, both dispatches are called by the framework. Thanks, Siddhartha Argollo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Siddhartha Argollo Técnico Judiciário TRE-BA [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5.0.5] Contributions to MasterDispatcher not working
No warnings. Howard Lewis Ship wrote: Sounds like it should work as is, are you getting any warnings in the console? On 7/6/07, Siddhartha Argollo <[EMAIL PROTECTED]> wrote: Hi all, I have two submodules, both used by AppModule. In the first module, I contribute with a "MyFirstDispatcher" to MasterDispatcher and the constraint "before:*". In the second module, I contribute with "MySecondDispatcher" and the constraint "after:MyFirstDispatcher". Although both contributions are correctly done, only MyFirstDispatcher.dispatch is called by the application. The thing is, if I switch the constraints, again only MySecondDispatcher.dispatch is called. If I don't use the constraints, neither service is called. I'm returning false in the dispatch method of both services. Am I forgetting anything? What I'm trying to do is wrong in anyway? I solved my problem contributing to RequestHandler with one of the services and leaving the other one with the constraint "before:*", still contributing to MasterDispatcher (without this constraint, it doesn't work). This way, both dispatches are called by the framework. Thanks, Siddhartha Argollo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Siddhartha Argollo Técnico Judiciário TRE-BA [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[T5.0.5] Contributions to MasterDispatcher not working
Hi all, I have two submodules, both used by AppModule. In the first module, I contribute with a "MyFirstDispatcher" to MasterDispatcher and the constraint "before:*". In the second module, I contribute with "MySecondDispatcher" and the constraint "after:MyFirstDispatcher". Although both contributions are correctly done, only MyFirstDispatcher.dispatch is called by the application. The thing is, if I switch the constraints, again only MySecondDispatcher.dispatch is called. If I don't use the constraints, neither service is called. I'm returning false in the dispatch method of both services. Am I forgetting anything? What I'm trying to do is wrong in anyway? I solved my problem contributing to RequestHandler with one of the services and leaving the other one with the constraint "before:*", still contributing to MasterDispatcher (without this constraint, it doesn't work). This way, both dispatches are called by the framework. Thanks, Siddhartha Argollo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[T5.0.5] NullPointerException in DependencyNode.addDependency
Hi all, I'm writing to the list cause I don't know where to log this error. I'm contributing to MasterDispatcher with 2 services and the DependencyNode object should be logging a warning message that says "Unable to add 'SecurityDispatcher' as a dependency of 'RequestEncodingDispatcher', as that forms a dependency cycle ('RequestEncodingDispatcher' depends on itself via 'SecurityDispatcher'). The dependency has been ignored.". Instead, I get a NullPointerException in the line 83 [_log.warn(message, null);] of the method: addDependency(DependencyNode node), because the _log variable is null at this point since the Orderer object is constructed with a null log variable in RegistryImpl.getOrderedConfiguration. Cheers, Siddhartha Argollo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: (Noob:) How To Contribute A Custom Validator
How I did it: public static void contributeFieldValidatorSource(MappedConfiguration configuration) { configuration.add("myvalidator", new MyValidator()); } Steven Coco wrote: I'm REALLY swimming lost here, however I want to use a custom Validator for a form Select widget. I have the server side down OK. I figured I would try to attach the validator in the template as well -- t:validator="NotEnumElementValidator=UNSELECTED" -- but I don't know how to contribute the validator so I can use it here. I'm trying obvious things like in my ApplicationModule class: public static Validator<...> build(); and public static NotEnumElementValidator buildNotEnumElementValidator(); But no luck trying! I can't find the concrete example in the documentation. Can anyone tell me how I'm supposed to do this? --About this validator too: it is supposed to take an Enum element that is an invalid selection from a list: I use the old rogue method of having the first item in the Select list say something like "[You must select...]" and then test if the user has chosen some other item. Is this still a modern method of validating a Select element? This kind of validator seems like it would be a nice fit with the Bean edit form, which seems to support enums too. Anyway, thanks in advance. Ciao. Steev Coco. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Siddhartha Argollo Técnico Judiciário TRE-BA [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[T5] StackMapTable format error: bad class index
Hi all, First of all: I'm using the 5.0.5 snapshot with JBoss 4.0.5-GA. I have a component named LoginView. It shows the login status of the user. The thing is, if I implement the beginRender method in this way: @Inject private SecurityService security; void beginRender(MarkupWriter writer) { if( this.security.getAuthentication().isAuthenticated() ) { ... writer.write(this.security.getAuthentication().getUserName()); } else ... } The application works fine. But, if I change the code to this: @Inject private SecurityService security; void beginRender(MarkupWriter writer) { Authentication auth = this.security.getAuthentication(); if( auth.isAuthenticated() ) { ... writer.write(auth.getAuthentication().getUserName()); } else ... } I receive the following exception: An unexpected application exception has occurred. ... * java.lang.ClassFormatError StackMapTable format error: bad class index ... Stack trace o java.lang.Class.getDeclaredConstructors0(Native Method) o java.lang.Class.privateGetDeclaredConstructors(Unknown Source) o java.lang.Class.getConstructors(Unknown Source) o org.apache.tapestry.internal.services.ReflectiveInstantiator.findConstructor(ReflectiveInstantiator.java:65) o org.apache.tapestry.internal.services.ReflectiveInstantiator.(ReflectiveInstantiator.java:53) I just want to know if this is a bug, or if I´m missing something, or if I´m going crazy! Thanks. Sid. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]