Re: FindBugs and the @Inject annotation on global fields

2012-06-08 Thread Martin Strand
I use constructor injection for all services, so Findbugs works as expected there. But I've had to disable Findbugs for page/component classes since there is so much magic going on there. On Fri, 08 Jun 2012 17:32:20 +0200, Ray Nicholus wrote: Is anyone using FindBugs in a T5 project? If so

Re: Tapestry 5.3.4-rc-5

2012-06-06 Thread Martin Strand
On Thu, 07 Jun 2012 02:24:35 +0200, Cezary Biernacki wrote: "* The semantics of volatile variables have been strengthened to have acquire and release semantics. In the original specification, accesses to volatile and non-volatile variables could be freely ordered. Aha, so does this mean that

Re: Tapestry 5.3.4-rc-5

2012-06-06 Thread Martin Strand
On Wed, 06 Jun 2012 23:29:52 +0200, Kalle Korhonen wrote: On Wed, Jun 6, 2012 at 1:51 PM, Cezary Biernacki wrote: On 06 June 2012 21:20:02 +0200 Howard Lewis Ship wrote: http://tapestryjava.blogspot.com/2012/06/synchronized-considered-harmful.html I am curious is there a reason to not use

Re: Showing text with line breaks converted to or

2012-04-18 Thread Martin Strand
On Wed, 18 Apr 2012 20:32:12 +0200, Tim wrote: On 18/04/2012 1:25 PM, Martin Strand wrote: Another option is to leave the code as it is right now and fix this with CSS instead: p.mytext { white-space: pre; } I originally did it this way, but I found that really long lines didn&#

Re: Showing text with line breaks converted to or

2012-04-18 Thread Martin Strand
On Wed, 18 Apr 2012 19:47:11 +0200, Thiago H. de Paula Figueiredo wrote: On Wed, 18 Apr 2012 14:06:02 -0300, Tim Koop wrote: Is there some way I can convert eol's to or something? Like doing this conversion yourself using String.replaceAll() and using OutputRaw in the template? If y

Re: miss key

2011-12-08 Thread Martin Strand
On Fri, 09 Dec 2011 04:15:04 +0100, dick_hu wrote: When I move the project from windows to linux,there are some strange problem happened. One of them is not find the App.properties's key. If I should do some config when I from windows to linux. Rename the file to "app.properties" (lower ca

Re: pagecatalog still visible in production mode

2011-12-08 Thread Martin Strand
You could configure your servlet container so that it doesn't return the proxy IP as request.remoteAddr, but instead uses the X-Forwarded-For header and returns the real client IP. For Jetty, this is just a matter of setting forwarded=true on the connector http://wiki.eclipse.org/Jetty/Howto/Co

Re: pagecatalog still visible in production mode

2011-12-08 Thread Martin Strand
If I'm not mistaken there is no way to remove a contribution. So if a proxy or load balancer were to mess up Request.getRemoteAddr(), you would have to decorate ClientWhitelist to remove the localhost whitelisting, right? On Thu, 08 Dec 2011 16:29:43 +0100, Howard Lewis Ship wrote: Try acces

Re: FileSystem asset source

2011-12-08 Thread Martin Strand
On Thu, 08 Dec 2011 18:10:26 +0100, Dimitris Zenios wrote: Any example of an asset source that loads assets from filesystem? There is an old Jira issue for this, perhaps you could look at the patch provided and see if that helps? https://issues.apache.org/jira/browse/TAP5-423 The issue is

Re: T5.3: do we still need AssetProtectionDispatcher?

2011-12-07 Thread Martin Strand
What if there is no trailing slash, won't that give you a directory listing anyway? On Wed, 07 Dec 2011 22:29:45 +0100, Lenny Primak wrote: Jira created: https://issues.apache.org/jira/browse/TAP5-1779 On Dec 7, 2011, at 2:25 PM, David Rees wrote: On Wed, Dec 7, 2011 at 10:53 AM, Lenny Pr

Re: Template parsing vulnerable to whims of default charset

2011-12-07 Thread Martin Strand
On Wed, 07 Dec 2011 19:08:19 +0100, Kalle Korhonen wrote: 2011/12/6 Robert Coie : On Tue, Dec 06, 2011 at 04:49:42PM -0800, Kalle Korhonen wrote: What's your JVM's file.encoding set to? (e.g. -Dfile.encoding=UTF-8). The default for most JVMs is *not* UTF-8. Tapestry assumes UTF-8 throughout.

Re: SimpleRequestWrapper and LinkTransformer

2011-12-03 Thread Martin Strand
Add a static import to the top of your module class and it will compile fine: import static org.apache.tapestry5.ioc.OrderConstraintBuilder.after; On Sat, 03 Dec 2011 07:25:44 +0100, angelochen wrote: "after" not accepte, btw, i'm still using 5.2.6 Martin Strand-4 wrote

Re: SimpleRequestWrapper and LinkTransformer

2011-12-02 Thread Martin Strand
contributeRequestHandler(OrderedConfiguration configuration) { configuration.add("basicPathRequestFilter", new basicPathRequestFilter(pathServices)); } Martin Strand-4 wrote public void contributeRequestHandler(OrderedConfiguration configuration,

Re: SimpleRequestWrapper and LinkTransformer

2011-12-02 Thread Martin Strand
I'm doing these kind of arbitrary rewrites with a custom RequestFilter, sounds like that would suit your needs. Here's an example: public class YourRequestFilter implements RequestFilter { @Override public boolean service(Request request, Response response, RequestHandler handler) th

Re: onValidate in T5.2.6

2011-12-01 Thread Martin Strand
13 +0100, angelochen wrote: Thanks, does it work the same? what my approach will be, replace all 'onValidateForm' with 'onValidate' first in 5.2.6, and later upgrade to 5.3. Martin Strand-4 wrote On Fri, 02 Dec 2011 00:21:09 +0100, angelochen <angelochen960@.com> wrot

Re: onValidate in T5.2.6

2011-12-01 Thread Martin Strand
On Fri, 02 Dec 2011 00:21:09 +0100, angelochen wrote: hi, to uprade to 5.3, we need to replace all onValidateForm to onValidate, but does onValidate works in 5.2.6? Yes, the "validate" event works in Tapestry 5.2.6: http://tapestry.apache.org/5.2/apidocs/org/apache/tapestry5/EventConstants.

Re: Gave up on T5.3 for now ...

2011-11-27 Thread Martin Strand
On Sun, 27 Nov 2011 22:46:18 +0100, Gunnar Eketrapp wrote: T5.3 looks promising and it felt quite faster. The two major concerns where 1) My user types didn't work in forms. 2) Disabled field did not work in forms. (The value was not passed back) Of course I must have missed something obvio

Re: URL handling ..

2011-11-07 Thread Martin Strand
On Mon, 07 Nov 2011 07:46:47 +0100, Kalle Korhonen wrote: There's not been a T5 project where I haven't needed to override URLEncoder service. Take a look at T5's URLEncoderImpl, override it with your version and mark whichever characters you prefer as safe (i.e. not encoded). Kalle I chan

Re: Insert Stylesheet to the Head top

2011-10-31 Thread Martin Strand
On Mon, 31 Oct 2011 18:58:31 +0100, Thiago H. de Paula Figueiredo wrote: On Mon, 31 Oct 2011 11:48:04 -0200, Eugene Zhulkov wrote: Dear community! Hi! I'm facing a trouble that I can't solve. But I think it's solvable :) So I need to insert css stylesheet link to the top of the HEAD tag

Re: [T5.3] Using ResourceMinimizer to remove debugging code?

2011-10-31 Thread Martin Strand
On Mon, 31 Oct 2011 15:51:14 +0100, Jochen Kemnade wrote: Hi, after playing with the new Tapestry 5.3 features, an idea came to my mind. I'd like to "abuse" the ResourceMinimizer to remove debug code when running in production mode, i.e. calls to Tapestry.debug, T5.console.debug and the like.

Re: Tapestry failing to inject a service into a Translator with @Inject?

2011-10-16 Thread Martin Strand
On Sun, 16 Oct 2011 22:09:14 +0200, Julien Martin wrote: It might have to do with the way I contribute my Translator i.e.: @Contribute(TranslatorSource.class) public static void provideTranslators(MappedConfigurationTranslator> configuration) { configuration.add(Postcode.class, new Postcode

Re: ApplicationDefaults depends on itself

2011-10-10 Thread Martin Strand
On Mon, 10 Oct 2011 22:15:26 +0200, Greg Pagendam-Turner wrote: Hi, I'm trying to pull some of my config out of AppModule into config files. The config files are loaded via contributeSymbolSource. Some of these symbols are referred to in ApplicationDefaults. For some reason IOC thinks the

Re: JavascriptStack

2011-10-09 Thread Martin Strand
The User-Agent header is very unreliable (unless this is for an intranet) and you would also need to add "Vary: User-Agent" to defeat caching by shared proxies. It's probably better to use two stacks instead, and include the IE stack with a conditional comment. For example, I use this "IERe

Re: Console app with Tapestry IoC configuration

2011-09-21 Thread Martin Strand
On Wed, 21 Sep 2011 13:19:51 +0200, nquirynen wrote: if I do registry.getService(PolicyValueProviderSource.class) and pass this as a parameter to my DocumentGenerator's constructor it does work. Is this the way to go then? (my knowledge of Tapestry IoC is very small) Yes, that is t

Re: Problem pushing application to production

2011-09-19 Thread Martin Strand
Indeed, your BaseURLSource solution should have worked fine. I see you accidentally typed an extra "s" at the end of "contributeServiceOverrides" but it should have worked anyway since you used a @Contribute annotation... try removing the extra "s" ? On Mon, 19 Sep 2011 20:44:13 +0200, Mich

Re: Problem pushing application to production

2011-09-19 Thread Martin Strand
y since all SSL is being handled at the load balancer, correct? I apologize, I think I introduced that confusion at the beginning. --Michael On Sep 19, 2011, at 9:52 AM, Martin Strand wrote: Typically, when SSL is offloaded to an Apache proxy, that proxy should add a number of X-Forwarded-

Re: Problem pushing application to production

2011-09-19 Thread Martin Strand
Typically, when SSL is offloaded to an Apache proxy, that proxy should add a number of X-Forwarded-* headers to any requests sent to the backend. The servlet container then uses those headers to set up request.scheme, request.secure, request.remotAddr, etc so that they match the original requ

Re: [T5.3-beta-6] Not Ready For Production!

2011-09-15 Thread Martin Strand
On Wed, 14 Sep 2011 15:57:11 +0200, Steve Eynon wrote: Yep, looks like you can't inject SymbolSource into your ApplicationDefaults contribution method when ProdMode is set to true; bit of a pain because I was using it to extract my webapp version for setting as the tapestry.app-version. As

Re: missing css files in jetty

2011-09-10 Thread Martin Strand
Definitely sounds like tmpwatch. You can also create a "work" directory in ${jetty.home} and Jetty will use that for unpacked apps. Read more here: http://wiki.eclipse.org/Jetty/Reference/Temporary_Directories On Sat, 10 Sep 2011 23:25:20 +0200, Cezary Biernacki wrote: Hi, if you are ru

Re: redirect-after-post messes with my StreamResponse

2011-09-05 Thread Martin Strand
In the log you posted, messages are being logged from an "onSubmit" method, but the code you posted has an "onSuccess" method with no logging statements. Are you sure the code you posted is ever reached? Can you put a breakpoint in your onSuccess method and see if it is being invoked? On M

Re: redirect-after-post messes with my StreamResponse

2011-09-03 Thread Martin Strand
The class name of that StreamResponse suggests it is in the "components" package, where it will be transformed by Tapestry's classloading magic and treated as a "component". You need to move that class to another package to be able to use it as anything else (avoid packages named "pages", "co

Re: redirect-after-post messes with my StreamResponse

2011-09-02 Thread Martin Strand
I am doing something similar for a reporting form and it works as expected (in tap 5.2) 1. user fills out a few fields 2. user submits the form 3. onSuccess() returns a StreamResponse with a text file 4. a download dialog pops up in the browser Although I haven't looked closely into the matter,

Re: 100% CPU load after hot deploy of Tapestry 5 Application on Tomcat 6

2011-07-20 Thread Martin Strand
We've only got 5.2 apps runing on Jetty, but hot redeploy works great there and is even without the PermGen leak that was present in Tapestry 4. Anyway, here's how I would try to diagnose the problem: 1. Trigger the problem so that you have something consuming 100% CPU 2. Find the native ID

Re: T5: upload file, css styling

2011-07-19 Thread Martin Strand
That text is part of Chrome's user interface, I don't believe there's anything you can do to change it. Other browsers will display empty file inputs in a different manner. Martin On Tue, 19 Jul 2011 22:58:53 +0200, fante wrote: Hey all, I was using the T5 tapestry-upload for uploading fil

Re: Remove CSS & JS stacks in v5.3

2011-07-12 Thread Martin Strand
On Tue, 12 Jul 2011 17:13:52 +0200, stephanos2k wrote: It seems AssetStack was removed in v5.3. But I modified it to this (using Scala): def contributeJavaScriptStackSource(configuration: MappedConfiguration[String, JavaScriptStack]) { configuration.`override`("core", new Java

Re: Remove CSS & JS stacks in v5.3

2011-07-12 Thread Martin Strand
I'm doing something like this in 5.2, I suppose it ought to work in 5.3 too: public void contributeJavaScriptStackSource(MappedConfigurationJavaScriptStack> configuration) { List scripts = Collections.emptyList(); List stylesheets = Collections.emptyList(); configuratio

Re: T5: @Secure and https with subdomain

2011-06-27 Thread Martin Strand
On Tue, 28 Jun 2011 08:24:25 +0200, Angelo C. wrote: I have tried the @Secure, it will automatically direct to https:/sample.com/pay, now I have a special requirement, it should direct to: https://safe.sample.com/pay, any idea how to accomplish this? You can override the default implement

Re: Method arguments in template expansions

2011-06-25 Thread Martin Strand
Just remember that method names are not "shortened" in the same way property names are. i.e. invoking this method: public String getClass(String link) would look like: ${getClass('link1')} On Sun, 26 Jun 2011 01:33:39 +0200, Robert Zeigler wrote: Have you tried? :) ${} is using the prop

Re: T5 Reference page attributes from a component

2011-06-23 Thread Martin Strand
On Thu, 23 Jun 2011 23:18:39 +0200, Tony Nelson wrote: In our T4 app we made a lot of use of this type of construct: default-value="ognl:page.selectedColumn" /> This particular component is embedded 4 layers deep and was able to reach back all the way to Page class to get values. Is t

Re: T5: How to use context-param or init-param from web.xml in contributeApplicationDefaults?

2011-06-16 Thread Martin Strand
ApplicationDefaults is only one of many SymbolProviders, you don't need to configure that specific SymbolProvider to set the supported locales. There are other options, including support for .properties files or system properties. I prefer context parameters myself, everything should "just w

Re: T5: property expression language intelligence

2011-05-25 Thread Martin Strand
I agree with Robert. Also, the purpose of page-name stripping (as I understand it) was never to save a few characters when typing. It was to let page classes have unique and explicit names but still give them "pretty" URLs (where words are not repeated) /edit/user--> pages.edit.EditUser

Re: Versioned assets

2011-03-23 Thread Martin Strand
On Thu, 24 Mar 2011 00:45:56 +0100, Thiago H. de Paula Figueiredo wrote: On Wed, 23 Mar 2011 20:26:35 -0300, raulmt wrote: Cezary Biernacki wrote: On Thu, Mar 24, 2011 at 12:04 AM, Thiago H. de Paula Figueiredo < thiag...@gmail.com> wrote: > Why don't you set the application version symb

Re: Versioned assets

2011-03-23 Thread Martin Strand
Because that would defeat the purpose of automatic version management for /assets/ and we would have to rename every asset that changed between versions On Thu, 24 Mar 2011 00:04:29 +0100, Thiago H. de Paula Figueiredo wrote: Why don't you set the application version symbol of your appli

Re: Versioned assets

2011-03-23 Thread Martin Strand
On Wed, 23 Mar 2011 22:43:55 +0100, raulmt wrote: I wanted to know if there is a reason why Tapestry couldn't just answer the requests for assets independently of the requested version. I believe that it is better to answer with a newer version than to just not answering at all… In AssetDis

Re: [ANN] Tapestry 5 in Action MEAP started

2011-03-23 Thread Martin Strand
On Wed, 23 Mar 2011 20:10:28 +0100, Igor Drobiazko wrote: Dear all, I'm pleased to announce that the long awaited Tapestry 5 in Action book is available through MEAP now. For more details read here: http://blog.tapestry5.de/index.php/2011/03/23/tapestry-5-in-action-meap-started/ Grea

Re: Tapestry 5 - cache issue when accessed via proxy

2011-03-18 Thread Martin Strand
On Fri, 18 Mar 2011 12:39:03 +0100, Thiago H. de Paula Figueiredo wrote: On Fri, 18 Mar 2011 01:25:43 -0300, sunmoor007 wrote: Added the below method to AppModule.java public LinkCreationListener buildLinkCreationListener( LinkCreationHub hub) { Make the method

Re: How to specify a multi-parameter literal context?

2011-02-25 Thread Martin Strand
On Fri, 25 Feb 2011 15:48:57 +0100, Everton Agner wrote: You could instead use the prop: binding to create a list, like so: 'context2']">link is there any need to create any getter in the page class? since 'prop' is usually bound to a property/getter. I didn't know this approach.. No nee

Re: How to specify a multi-parameter literal context?

2011-02-25 Thread Martin Strand
On Fri, 25 Feb 2011 14:01:21 +0100, Richard Hill wrote: Hi, If I missed this in the docs, mailing list apologies. I am trying to render a page link with 2 context parameters: link This renders as "mypage/context1$002fcontext2", ie the "/" has been tap encoded. As such as opposed to: publ

Re: Tapestry 5 - cache issue when accessed via proxy

2011-02-20 Thread Martin Strand
If you want to use the exact same URL to serve different content, you'll need to make sure the response is never cached by the client. Add appropriate HTTP headers to the response: @Inject private Response response; void onActivate(...) { response.setHeader("Cache-Control", "no-cache"); re

Re: t5: @Secure and jetty

2011-01-22 Thread Martin Strand
If you want Jetty to listen on port 8080 too, you will need to add a connector for that: implementation="org.mortbay.jetty.security.SslSocketConnector"> ... 8080 http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin On Sat, 22 Jan 2011 10:36:00 +0100, Angelo C.

Re: utf-8 (swedish) characters in the URL

2011-01-13 Thread Martin Strand
Hi Mats. I believe you need to URLEncode those characters before returning them from your custom URLEncoder. This is what I'm doing and it works fine in our app - Unicode characters show up "pretty" in the address field. /searchresult/övrigt /searchresult/日本 PrettyURLEncoder.java: public

Re: @SessionState Bug?

2011-01-06 Thread Martin Strand
Tapestry will treat the two as the exact same SessionState since they both are java.util.List - the Boolean/String type parameters will not help differentiate between the two. It is possible to get around this by changing one of them to Collection/Iterable/ArrayList/etc so that they use two d

Re: T5: archiving a page

2010-12-30 Thread Martin Strand
If Java is not required, you could use CutyCapt to render the page: http://cutycapt.sourceforge.net/ It supports jpeg, pdf and more. On Thu, 30 Dec 2010 16:23:15 +0100, Angelo C. wrote: Hi, Is there a way to archive a page? say render it into a jpeg or a pdf ? Angelo -

Re: Should Tapestry phone home?

2010-10-11 Thread Martin Strand
I don't like this idea. Perhaps I'm one of those privacy-minded people since we use Tapestry in a security sensitive context (credit cards). I remember some time ago when we looked at upgrading Quartz and were surprised to see the new version trying to dial home in a similar manner (by def

Re: Is there any way to render the "get" method of form?

2010-09-28 Thread Martin Strand
On Tue, 28 Sep 2010 18:47:17 +0200, Manuel Sugawara wrote: On Tue, Sep 28, 2010 at 11:24 AM, Martin Strand < do.not.eat.yellow.s...@gmail.com> wrote: Of course is a matter of taste but I rather have http://localhost/?q=c%E1lculo+diferencial< http://localhost/?q=c%C3%A1lculo+di

Re: Is there any way to render the "get" method of form?

2010-09-28 Thread Martin Strand
On Tue, 28 Sep 2010 17:58:35 +0200, Manuel Sugawara wrote: On Tue, Sep 28, 2010 at 7:08 AM, Thiago H. de Paula Figueiredo wrote: On Tue, 28 Sep 2010 05:41:50 -0300, Lutz Hühnken wrote: Of course I am willing to learn. What would be the "Tapestry way" of implementing this? Use For

Re: throw new PageRedirectException

2010-09-23 Thread Martin Strand
On Thu, 23 Sep 2010 04:43:28 +0200, asianCoolz wrote: IEngineService pageService = getPageService(); String pageName = "NextTapestryPage"; ILink link = pageService.getLink(false, pageName); throw new RedirectException(link.getAbsoluteURL()); if page is IPage, and i set parameter

Re: throw new PageRedirectException

2010-09-22 Thread Martin Strand
This is in Tapestry 4, right? To send the client to a different URL you can throw a RedirectException instead: void redirectToNextPage() { IEngineService pageService = getPageService(); String pageName = "NextTapestryPage"; ILink link = pageService.getLink(false, pageName); throw new R

Re: Versioned assets

2010-09-07 Thread Martin Strand
On Tue, 07 Sep 2010 13:14:02 +0200, LLTYK wrote: What it should do is instead insert some sort of hash of the file's contents in the url. Then whenever your file changes the browser won't pick up the previous cached version, but if your app version changes and the file doesn't, the url rema

Re: OT: Web Services

2010-08-29 Thread Martin Strand
On Sun, 29 Aug 2010 19:35:11 +0200, Jim O'Callaghan wrote: I'm aware this is off topic, but since there are so many people on the list with a broad skill set am hoping I can learn from their experiences / heartbreak. I am evaluating various WS stacks for interfacing with a system - curren

Re: [T5.2] Javassist 3.12.1.GA checksum error

2010-08-25 Thread Martin Strand
Yes, I came acoss this too but "solved" it by temporarily turning off checksum validation in nexus... :\ On Mon, 23 Aug 2010 13:26:13 +0200, Blower, Andy wrote: I'm trying to migrate our application to T5.2, but I'm getting a checksum error with Javassist 3.12.1.GA C:\tmp>fciv -sha1 j

Re: [ANNOUNCEMENT] tapestry-watchdog 0.0.1 released!

2010-05-31 Thread Martin Strand
There's still the usual List-Id: users.tapestry.apache.org so filtering should work as normal On Mon, 31 May 2010 05:51:28 +0200, Paul Stanton wrote: not offended, just distracted .. since the email isn't addressed 'to:users@tapestry.apache.org' it misses my current mail filter and popp

Re: RenderSupport Scope

2010-05-30 Thread Martin Strand
If you want to declare a global function from within Tapestry.onDOMLoaded, you can simply add it to the windows object: window.myGlobalFunction = function() { doCoolStuff(); } You can then access that function from anywhere if you prefer to do things this way: Martin On Sun, 30 May 2010

Re: Using / Injecting Tapestry 5 services in objects that are *not* components / pages / services

2010-05-25 Thread Martin Strand
On Tue, 25 May 2010 12:07:05 +0200, Andreas Berg wrote: The only way I see so far is to pass the service as parameters or by constructor to my domains objects, which is not very nice. What's bad with constructor injection? I would personally even prefer to have constructor injection in compon

Re: Tapestry5 template name simplification

2010-05-10 Thread Martin Strand
In my experience, this strategy automatically gives prettier URLs in most cases but still allows you to have unique class names that make sense: .details.CustomerDetails --> /details/customer/123 .details.PaymentDetails --> /details/payment/123 .list.CustomerList --> /list/customer .list.

Re: How to load tml files from the filesystem instead of classpath?

2010-05-05 Thread Martin Strand
Decorating will probably work, but you can also construct the service from within your contributing method: public static void contributeServiceOverride(MappedConfiguration configuration, @ContextProvider AssetFactory contextAssetFactory, ComponentClassResolver componentClassResolver) { co

Re: How to load tml files from the filesystem instead of classpath?

2010-05-05 Thread Martin Strand
On Wed, 05 May 2010 22:50:00 +0200, MauricioF wrote: Ideally I´d like to register in my module a new implementation of PageTemplateLocator Any other idea how can I do this? (If you think override PageTemplateLocator is not the right thing..) Thanks Yes, that's what you need to do. You can o

Re: t5: properties files

2010-03-19 Thread Martin Strand
Don't know if I understand your question, but if you want to read .properties in UTF-8 format you can do this with JDK 6: new Properties().load(new InputStreamReader(yourInputStream, Charset.forName("UTF-8"))); On Fri, 19 Mar 2010 07:31:12 +0100, Angelo Chen wrote: Hi, As I understand,

Re: Replicating t:id into component html id

2010-02-20 Thread Martin Strand
Tapestry will generate an id automatically and render it as an 'id' attribute if you invoke getClientId() on the PageLink in question. This is the typical use case where you would run a short script to manipulate the element, something like this: Hello document.getElementById("${myPageLink.cl

Re: integrating a web services stack

2010-02-17 Thread Martin Strand
Same here - would have preferred #1 but implemented #2 because it was much simpler On Wed, 17 Feb 2010 13:09:25 +0100, Peter Stavrinides wrote: Hi Uli, I opted out of 3, since I don't use Spring, so thought it would be overkill bringing too much baggage. I would love to see an actual examp

Re: T5: Testing service scope

2010-02-17 Thread Martin Strand
Hmm, why different instances? Wouldn't every thread see the same proxy instance? Martin On Wed, 17 Feb 2010 12:17:35 +0100, Ulrich Stärk wrote: Querying the registry for the same service from different threads should yield different instances when using the perthread scope. Just test that. N

Re: Problem: T 5.1.0.5 renders JavaScript comment tag as regular html comment tag

2010-02-12 Thread Martin Strand
Tapestry will remove all HTML comments from the output. If you don't put the in there it will work fine: document.write("Hello World!"); On Fri, 12 Feb 2010 18:22:44 +0100, DavidWei wrote: Thanks for reply. I understand the browser executes javascript codes. The problem I have is if I

Re: T4: forward browser to an external web site

2010-02-07 Thread Martin Strand
t solution. On Sun, 07 Feb 2010 18:37:15 +0100, Ivano Luberti wrote: Yes I had already tought of a solution like taht but I was hoping for a clean tapestry solution like the you suggested me with the link. Thanks anyway. Would instead be possible with T5? Martin Strand ha scritto: For POST

Re: T4: forward browser to an external web site

2010-02-06 Thread Martin Strand
to submit a form and not simply a link. But checking twice the docs of the web site I have to forward to, I see I can use a link. Thanks for now Martin Strand ha scritto: If you just want to redirect the client to another URL, return an ILink from your form listener: public ILink formSubmitListe

Re: T4: forward browser to an external web site

2010-02-03 Thread Martin Strand
If you just want to redirect the client to another URL, return an ILink from your form listener: public ILink formSubmitListener() { // Do work // ... return new StaticLink("http://www.example.com/";); } Martin On Wed, 03 Feb 2010 10:39:23 +0100, Ivano Luberti wrote: Hello, I'm tryi

Re: [ANNOUNCEMENT] New Tapestry 5 book

2009-11-12 Thread Martin Strand
Same here, but I came to my senses when my friend reminded me that my German is limited to high school level - "Herr Ober, zahlen bitte" :D On Thu, 12 Nov 2009 12:07:40 +0100, Inge Solvoll wrote: I'm even considering buying it in german, even though my german isn't too good :) On Thu, Nov 1

Re: how can i construct external url with querystring???

2009-10-28 Thread Martin Strand
Maybe you want String.format instead? String.format("http://somesite.com/ath/?param1=%s¶m2=%s";, param1, param2) On Wed, 28 Oct 2009 11:11:37 +0100, sameerkhare wrote: That's right... createPageRender() is to create internal link, Thats why i am not able to create external link by this m

Re: UTF-8 vs ISO-8859

2009-10-21 Thread Martin Strand
Also, JDK 6 added another load() method, so you can use properties.load(new InputStreamReader(in, utf8)) to load utf8 files. On Wed, 21 Oct 2009 10:35:22 +0200, Ulrich Stärk wrote: A bit of explanation: Normally, property files are expected to be ISO-8559-1 encoded [1]. When there are chara

Re: UTF-8 vs ISO-8859

2009-10-21 Thread Martin Strand
ISO-8859 is only the default for java.util.Properties, not for Tapestry. http://java.sun.com/javase/6/docs/api/java/util/Properties.html#load(java.io.InputStream) You can configure Eclipse to use UTF-8 for *.properties if you go to Preferences --> General --> Content Types That way you don't hav

Re: tapestry 5.1.0.5 versus 5.0.14, ckeditor, javarebel

2009-10-18 Thread Martin Strand
On Sun, 18 Oct 2009 08:32:43 +0200, Argo Vilberg wrote: 2009/10/18 Martin Strand Are you using renderSupport.addScript(...) in example #1? In example #1 i use @IncludeJavaScriptLibrary({"js/ckeditor/ckeditor.js","js/ckeditorconfig.js"}) What I meant was: ho

Re: tapestry 5.1.0.5 versus 5.0.14, ckeditor, javarebel

2009-10-17 Thread Martin Strand
of ckeditorconfig.js? CKEDITOR.replace( 'editor1', { skin: 'kama', height: 250, }); I don't see any "height: 400" in your 5.0 version so how did you set the height in that version? On Sun, 18 Oct 2009 00:38:13 +0200, Argo Vilberg wrote: 2009/10/17 Martin Strand A

Re: tapestry 5.1.0.5 versus 5.0.14, ckeditor, javarebel

2009-10-17 Thread Martin Strand
Are you using renderSupport.addScript(...) in example #1? I think 5.0 --> 5.1 changed where included includes are placed. 5.0 placed them at the end of your tag so referencing CKEDITOR in the template (example #2) would not work since that script would be rendered before including ckedi

Re: [T5] Get Response data

2009-10-14 Thread Martin Strand
Not really answering your question but if you want to cache entire pages I would recommend using a caching proxy such as squid or varnish. Of course it depends on your specific use case... On Thu, 15 Oct 2009 04:11:20 +0200, iapilgrim wrote: Hi all, I'm using T5.1.0.5. My goal is to get pag

Re: Tapestry 5 Submit Form from Javascript

2009-10-14 Thread Martin Strand
an read about that in the documentation if you're interested. Martin On Thu, 15 Oct 2009 02:11:27 +0200, Lindsay Ridgeway wrote: Martin Strand-4 wrote: Perhaps something like this? Thanks for your reply, Martin. I appreciate the time you put into it. I've continued e

Re: Tapestry 5 Submit Form from Javascript

2009-10-14 Thread Martin Strand
Perhaps something like this? Not tested at all but I suppose it ought to work. in your template: window.onload = function () { alert('about to submit'); document.forms[0].firstChild.value = 'i just set the hidden value'; document.forms[0].submit(); }; in your cla

Re: Tapestry 5 Submit Form from Javascript

2009-10-14 Thread Martin Strand
I'd also like to have multiple Java methods that receive control depending on which submit button is clicked. You can accomplish this with the Submit component, which fires an event of your choice, e.g. @Component(parameters = "event=buttonOneClicked") private Submit buttonOne; void onButtonO

Re: [T4] Two users see the same data - problem with ASO objects

2009-10-13 Thread Martin Strand
Hmm, it sounds unlikely that different sessions would get mixed up like that. Perhaps the problem is with some other variable that happens to be visible to several users? I haven't done Tap4 in a while, but maybe you could look for: - any field in a page class, they should probably all be abstra

Re: T5.1 submit not working

2009-10-05 Thread Martin Strand
On Mon, 05 Oct 2009 23:24:38 +0200, Thiago H. de Paula Figueiredo wrote: Em Mon, 05 Oct 2009 11:35:24 -0300, formpost escreveu: public void onSubmit() { for(Item i : items) { System.out.println("onSubmit: " + i.isToBeDeleted()); } } The event fired by the Submit compone

Re: Strange java applet behavior with T5

2009-09-30 Thread Martin Strand
On Wed, 30 Sep 2009 22:32:50 +0200, shymon wrote: My template is as follows: http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"; xmlns:p="tapestry:parameter"> and activation context methods: void onActivate(String eid) { setEid(eid); } List onPass

Re: Bean editor model for User already contains a property model for property 'account'

2009-09-29 Thread Martin Strand
I didn't read the entire thread, but if this particular field has no setter you can add a synthetic property with model.add("account", null) and then provide a proper block override as outlined in the guide under "Property Editor Overrides": http://tapestry.apache.org/tapestry5.1/guide/beaneditf

Re: About regexps on Tapestry

2009-09-20 Thread Martin Strand
There are java specific operators that match letters: \p{javaLowerCase} \p{javaUpperCase} So to make sure a string only contains letters (in any language) you could do this: ^[\p{javaLowerCase}\p{javaUpperCase}]+$ If you're using Eclipse you might find this plugin handy, it allows you to test

Re: t5: URLWriting and non t5 site

2009-08-10 Thread Martin Strand
> container? this might open possibilities integrating php apps into t5 app, > some more info on this? > > Angelo > > > Martin Strand-4 wrote: >> >> If you're running the PHP app from your servlet container I suppose this >> could be doable if Tapestry rew

Re: t5: URLWriting and non t5 site

2009-08-10 Thread Martin Strand
That depends on your setup... If you're running both applications through an Apache instance (with mod_php and a proxy to your servlet container) you could rewrite the request there with mod_rewrite, before it even reaches Tapestry. I don't think you'll be able to change the Host header, but per

Re: Enum.toString() not honored by t:Select component

2009-07-09 Thread Martin Strand
Tapestry looks for a label in your message catalog, if none is found it uses name() to automatically create a proper label. toString() is not used. To fix your problem, put this in the message catalog (YourPage.properties): oms = OMS payment = Payment On Thu, 09 Jul 2009 08:28:18 +0200, Baldu

Re: T5 Persistence Question

2009-07-08 Thread Martin Strand
Perhaps the form submission leads to an url without parameters: /yourpage.form.action but then results in a redirect to /yourpage?t:state=... where the state is visible? In T4, if you returned null from a listener it would render the current page. T5 redirects back to the current page before the

Customizing Translator messages?

2009-07-01 Thread Martin Strand
Validation messages can easily be overridden for a specific component, eg password-required-message = You forgot to type your password! Is there a way to do the same with Translators - override messages on a per-component basis? onParseClientFromXXX(...) could work, but I'd prefer to reuse the

Re: t5: turning off logging for jetty

2009-06-29 Thread Martin Strand
The Jetty plugin is well documented: http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin Here's another tip that might be interesting if you're using Windows: http://docs.codehaus.org/display/JETTY/Files+locked+on+Windows On Mon, 29 Jun 2009 15:38:49 +0200, Peter Stavrinides wrote: > Tha

Re: Re: [T5.1] @SessionState an generic pages

2009-06-23 Thread Martin Strand
On Tue, 23 Jun 2009 22:32:25 +0200, nille hammer wrote: > That's the trick! Thinking about your hint I rewrote GenericEntityPage a > bit. Code follows: > > /** >* @return the page to be forwarded to in case value does not exist as > SSO >*/ > protected abstract Obje

Re: Switch from Prototype to jQuery?

2009-06-10 Thread Martin Strand
On Wed, 10 Jun 2009 17:21:57 +0200, Onno Scheffers wrote: >> >> The problem is: how would Tapestry do that? Not using any framework? >> This would mean the committers would need to spend an awful lot of >> time rewriting something that Javascript frameworks already do. Not >> only this, but also

Re: [Tapestry 4.1] how to get ServletContext inside a service

2009-05-29 Thread Martin Strand
There's a full reference here: http://tapestry.apache.org/tapestry4.1/tapestry-framework/hivedoc/ I haven't tried it myself but this should work: see http://tapestry.apache.org/tapestry4.1/tapestry-framework/hivedoc/module/tapestry.globals.html Martin On Fri, 29 May 2009 13:51:53 +0200, Ivano

  1   2   3   >