Re: weird ognl problem

2006-05-04 Thread Paul Cantrell
Just a sanity check: Make sure that the OGNL is referring to the class you think it is, not some other class that just happens to have an isShowMessages() method. You could do this by renaming isShowMessages() to isShowMessagesFoobar (), and make sure that this causes a "no property" excepti

Best way to record an error in a listener

2006-05-04 Thread Paul Cantrell
Tapestry's new validation framework covers a few of the basic constraints one might want on a field: not empty, greater than zero, etc. However, I often find myself doing additional validation in a listener method, as part of the processing. For example, I can't write a generic "Incorrec

Re: Insert/Update pages and Hibernate

2006-05-03 Thread Paul Cantrell
ing, though -- I appreciate the necessity of a data- buffer at the UI level, particularly when dealing with a persistence mechanism that can potentially leave objects in an indeterminate state. Thanks again, Jim -Original Message- From: Paul Cantrell [mailto:[EMAIL PROTECTED]

Re: Insert/Update pages and Hibernate

2006-05-02 Thread Paul Cantrell
27;m just pouting, though -- I appreciate the necessity of a data- buffer at the UI level, particularly when dealing with a persistence mechanism that can potentially leave objects in an indeterminate state. Thanks again, Jim -Original Message- From: Paul Cantrell [mailto:[EMAIL P

Re: Insert/Update pages and Hibernate

2006-05-02 Thread Paul Cantrell
an API that could potentially mutate them, since I need to keep the original data around (the user input). But I've never seen anyone doing this, so I'm asking about this situation here because either I'm missing something or a lot of other people are. Jim -Original

Re: Insert/Update pages and Hibernate

2006-05-02 Thread Paul Cantrell
There are several practices you can use to avoid painting yourself into this corner: (1) Probably the best and simplest: Use a straightforward transaction- per-request model, and don't ever hold on to persistent objects between requests.* Instead, hold on to the IDs of your persistent obj

Re: ASO and browser cookie disabled [SOLVED or BUG?]

2006-05-02 Thread Paul Cantrell
Cookies will, of course, manage the session if you bypass Tapestry completely and just do ... but it doesn't sound right that PageLink behaves that way inside a form. If nobody comes up with a good answer on the list, I'd say file it in Jira. On May 2, 2006, at 2:12 PM, Oscar Picasso wro

Re: ASO and browser cookie disabled

2006-05-02 Thread Paul Cantrell
Normally, Tapestry does handle this for you -- or rather, it passes the job along to the servlet container, which will usually append a ";jsessionid=" to your requests. However, if you're bypassing Tapestry to generate links directly -- for example, by using a plain old in your page, i

Re: Generic creation of an ICallback: surely there's a better way?

2006-05-01 Thread Paul Cantrell
lt like trying to re-create the state of the current request. On 5/1/06, Paul Cantrell <[EMAIL PROTECTED]> wrote: My original email on this topic generated discussion -- but alas, it was all about whether to split this list (agreed that's a bad idea), and not about the actual question.

Re: Generic creation of an ICallback: surely there's a better way?

2006-05-01 Thread Paul Cantrell
ove this code? Is there some utility I'm missing that does this for me? Is this a valid approach that I should be submitting to Tapestry? Anyone? Anyone? Beuller? This is on Tapestry 4.0.1, BTW. :P Cheers, Paul On Apr 30, 2006, at 11:50 PM, Paul Cantrell wrote: I want to creat

Re: Is it time to break the list up into 3.x and 4.x?

2006-05-01 Thread Paul Cantrell
st up into 3 and 4. -Original Message----- From: Paul Cantrell [mailto:[EMAIL PROTECTED] Sent: Sun 4/30/2006 10:50 PM To: Tapestry users Subject: Generic creation of an ICallback: surely there's a better way? I want to create a generic utility method to check whether a user is

Generic creation of an ICallback: surely there's a better way?

2006-04-30 Thread Paul Cantrell
I want to create a generic utility method to check whether a user is logged in, and redirect them to a login page if necessary. To do this, I need to create an ICallback in the general case. In other words, I don't know whether I'm create an ExternalCallback or a PageCallback or a DirectCal

Re: [Slightly OT]Double quotes in OGNL

2006-04-04 Thread Paul Cantrell
True enough -- " might do the trick. Uglier but still possible are expressions like ((char) 34) Not sure how far down the primitive typecasting road OGNL will go, though. Curious to see if anybody knows of a clean way Paul On Apr 4, 2006, at 2:09 PM, Jesse Kuhnert wrote: If all e

Re: Ruby vs Tapestry

2006-03-07 Thread Paul Cantrell
sly the realm of php, perl, etc.), while Tapestry is built for larger teams. But Rails is unique because it erodes the "large team" ground a little; individuals and smaller teams can do things that would have previously required a dozen or two programmers. On Mar 7, 2006, at 1:26 PM,

Re: Ruby vs Tapestry

2006-03-07 Thread Paul Cantrell
;Ruby aims for simplicity and rapid development at the expense of some robustness." Cheers, P On Mar 7, 2006, at 10:25 AM, Paul Cantrell wrote: Interesting discussion, but I don't think anybody has hit on the really important stuff yet. Those more knowledgable can correct me if I'm w

Re: Ruby vs Tapestry

2006-03-07 Thread Paul Cantrell
Interesting discussion, but I don't think anybody has hit on the really important stuff yet. Those more knowledgable can correct me if I'm wrong: *** Rails is based on a dynamically typed language (Ruby), Tapestry on a statically typed one (Java) with a dynamically typed template languag

Re: Gavin King's comment about presentation code and CSS in Javaposse podcast

2006-02-16 Thread Paul Cantrell
In theory, establish a clean content / presentation split between HTML and CSS is a pleasing idea. In practice, it's a bunch of starry-eyed crack-smoking idealism. My $0.02. P On Feb 16, 2006, at 11:16 PM, Chris Hughes wrote: I agree with Gavin's sentiment that, in general, you want to do

Re: [OT] 3.163 + 0.001 = ???

2006-01-24 Thread Paul Cantrell
Uh, I that was a just a typo or a copy and paste mistake or something. I get the expected result on my JVM, too. On this subject: IIRC, Tapestry internally uses double instead of BigDecimal in its number translator -- even if your final input property is declared a BigDecimal or and integer

Re: Changing standard validation messages

2006-01-18 Thread Paul Cantrell
it's not in JIRA it will probably never be remembered. (It probably is already, but not sure) On 1/18/06, Paul Cantrell <[EMAIL PROTECTED]> wrote: A warning for those who use this hack: your app will mysteriously break when a future version of Tapestry adds a new validation mess

Re: Changing standard validation messages

2006-01-18 Thread Paul Cantrell
A warning for those who use this hack: your app will mysteriously break when a future version of Tapestry adds a new validation message, and it isn't in your custom .properties file! I know this from experience. I agree that it would be really nice to have a better way to customize this.

Re: Friendly URL help in Tap 4.0

2006-01-16 Thread Paul Cantrell
There is a caveat here: If you are using a case-insensitive file system (as I believe both Windows and OS X defaults are), and if your container explodes the .war instead of working out of the archive (as I believe Tomcat does by default), then Home.html and home.html are the same file -- t

Re: Advice on templating

2006-01-16 Thread Paul Cantrell
Jerome -- My understanding is that Tapestry looks up components by .jwc file, not by .html file. I agree that the duplicated near-empty .jwcs are a little irritating, and it would be nice if the common case that amounts to a page include (body yes, informal no) were the default and .jwcs co

Re: simplification?

2006-01-16 Thread Paul Cantrell
On Jan 15, 2006, at 7:22 PM, Martin Strand wrote: On Mon, 16 Jan 2006 01:36:17 +0100, Paul Cantrell <[EMAIL PROTECTED]> wrote: (1) Make component infer the type from the return type of the getter. It is just silly that I have to say "TextField" twice in a row:

Re: simplification?

2006-01-15 Thread Paul Cantrell
ons would be simplified further, perhaps I would start using @Component. I just can't think of any particular simplification, what did you have in mind? On Sun, 15 Jan 2006 18:33:53 +0100, Paul Cantrell <[EMAIL PROTECTED]> wrote: The reason you can't do this in the page file i

Re: simplification?

2006-01-15 Thread Paul Cantrell
The reason you can't do this in the page file is that it would make it impossible to have a meaningful DTD. Of course, you can do essentially the same thing in your HTML: Cheers, Paul On Jan 15, 2006, at 8:15 AM, Martin Strand wrote: How about using attributes instead of the

Re: Friendly URL help in Tap 4.0

2006-01-15 Thread Paul Cantrell
After you've doubled-checked that all the Tap dependency jars are up to date, try quitting Tomcat, deleting its work/ and and temp/ (if it exists), then starting it again. Sometimes it hangs on to old config files in a very weird way. P On Jan 14, 2006, at 8:58 PM, Brian K. Wallace wrote:

Re: Tapestry 4.0 is NOT Java 1.3 compliant

2006-01-13 Thread Paul Cantrell
Agreed to that -- but if it's not 1.3 compatible, the web site shouldn't say it is. I really, really feel for people stuck on old JDKs. The least we can do for them is give them accurate information about what tools will work! P On Jan 13, 2006, at 1:34 PM, Chris Chiappone wrote: I kin

Re: page events, in what order? when and how?

2006-01-12 Thread Paul Cantrell
Not as much as it could -- that page doesn't say anything at all about the rewind cycle. That's certainly info that ought to be in the docs. (Ted, I don't know the answer to your question. Sorry.) Cheers, P On Jan 12, 2006, at 11:39 AM, Joe Trewin wrote: Does this help? http://jakarta.ap

Re: How to manually render the given page?(Tapetsry 3.03)

2006-01-12 Thread Paul Cantrell
Vincent -- your original question isn't quite clear. You can do this: IPage myListener(...) { ... IPage otherPage = cycle.getRequestCycle("OtherPage"); otherPage.setSomeProperty(...); return otherPage; } What is it t

Re: Library 'contrib' not found in application namespace.

2006-01-11 Thread Paul Cantrell
From the manual (http://jakarta.apache.org/tapestry/UsersGuide/ configuration.html): The specification is normally stored under WEB-INF. In fact, Tapestry performs a search to find the specification: • On the classpath, as defined by the org.apache.tapestry.application-specification conf

Re: Best Practice (Hibernate, Spring, Tapestry)

2006-01-11 Thread Paul Cantrell
The Hibernate folks are a lot more excited about long sessions and detached objects than I am. (It's hard not to get attached to a fun feature once you've implemented it!) Personally, I think they make the app harder to write: there's much more worrying about stale data and scalability. For

Re: Tapestry 4.0 Release Notice on TheServerSide

2006-01-09 Thread Paul Cantrell
It seems to me that Howard was (rightly) trying to head of some of the more flame-inducing advocacy that can come out of well-meaning but strong-headed passion. It did come off sounding a little bit like marching orders, perhaps, but I think he meant "guidelines" when he said "guidelines."

Re: [ANNOUNCE] Tapestry 4.0 (final)

2006-01-07 Thread Paul Cantrell
The release looks good here in Minneapolis. Congratulations to the Tapestry team! Well done! Cheers, Paul On Jan 7, 2006, at 12:44 PM, Howard Lewis Ship wrote: After nearly two years of work, the Tapestry development team is proud to announce the next major release of the Tapestry web appli

How to get LinkFactoryImpl to stop caching contextPath?

2006-01-07 Thread Paul Cantrell
I want my app to be accessible at several different paths, each of which has the same set of pages and same directory structure, but a different configuration, e.g.: /myapp/conf1/SomePage.html /myapp/conf2/SomePage.html ...both get mapped internally to: /myapp/SomePa

Re: Rewriting URLs: is something missing?

2006-01-04 Thread Paul Cantrell
ec to affect all pages and components. On 1/4/06, Rusty Phillips <[EMAIL PROTECTED]> wrote: -Original Message- From: Paul Cantrell [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 04, 2006 3:22 PM To: Tapestry users Subject: Re: Rewriting URLs: is something missing? You're misu

Re: Rewriting URLs: is something missing?

2006-01-04 Thread Paul Cantrell
ding (and admittedly, I might not be), this doesn't have anything to do with encoding: Using the URL: http://localhost/tap/app?page=Home causes tapestry to look for the file "Home.html" to generate the page. -Original Message- From: Paul Cantrell [mailto:[EMAIL PROTECTED] Sent: W

Re: Rewriting URLs: is something missing?

2006-01-04 Thread Paul Cantrell
?!!?? What you're describing is exactly what friendly URLs do ... and the doc page you mention describes how to do it. Looks like you just missed it. Read the section on "encoder." http://jakarta.apache.org/tapestry/UsersGuide/friendly- urls.html#encoder Cheers, Paul On Jan 4, 200

Re: changing an external link to use https

2006-01-03 Thread Paul Cantrell
You might be able to fix it by doing something like this: public class MyDecoder extends org.apache.tapestry.workbench.RequestDecoder { public DecodedRequest decodeRequest(HttpServletRequest request) { DecodedRequest result = super.decodeRequiest(request);

Re: Removing page specs

2005-12-29 Thread Paul Cantrell
I believe he's reusing a single java class between multiple pages. That's an approach I steer away from -- I like to have each class model one specific page, and act as a facade to the more reusable model objects. However, it's a valid approach. Chris -- I don't believe it's possible to map

Re: Tapestry 4.0 CRUD application

2005-12-28 Thread Paul Cantrell
I think it's the docs that make it feel complex. They've accumulated a lot of cruft from previous versions, and don't quite make clear how very simple it is to actually use 4.0. Having gone to Tapestry from a fair amount of Struts development, and prototyped with (and rejected) JSF for my c

Re: Tapestry 4.0 CRUD application

2005-12-28 Thread Paul Cantrell
You're welcome to take a look at my latest little side project, which does some basic database to and fro stuff using Hibernate. It's Tapestry 4.0, and I've tried to use new features to be as concise as possible. WARNING: I make no guarantees *whatsoever* that I'm using best practices, so d

Re: Possible bug in T4 rc-2?

2005-12-27 Thread Paul Cantrell
This apparently resulted from HTMLDescriptionReceiver touching a previously uncached expression when calling ExpressionCache.getCompiledExpression(). The easy solution looks like the right one: modify line 345 of HTMLDescriptionReceiver.java from this: Iterator i = values.iterator

Re: jsp @include equivalent

2005-12-27 Thread Paul Cantrell
Components secretly (actually, not so secretly) function as includes. To include MyInclude.html: You may have to create a MyInclude.jwc to go with it. Your includes can also take parameters and (unlike JSP) render the enclosed body -- read the docs on the "Border" component. Chee

Re: Maximum WebResponse.contentLength

2005-12-27 Thread Paul Cantrell
The HTTP spec says: "Any Content-Length greater than or equal to zero is a valid value." So pretty clearly, the protocol allows it, and ServletReponse ought to declare it as long instead of int. I'm note sure whether FTP or Samba are actually any easier or more reliable than HTTP

Re: What gives with number validation?

2005-12-26 Thread Paul Cantrell
ant. We plan on fixing this at a minimum in 4.1, but it'll probably make its way back out to 4.0 as well. On 12/26/05, Paul Cantrell <[EMAIL PROTECTED]> wrote: You're right -- adding this binding does the trick: "translator=translator:number" It seems wrong t

Re: Strange URL rewriting behaviour

2005-12-26 Thread Paul Cantrell
Are you getting the 404 from Apache or Tomcat? (If the former, perhaps your JkMount directive isn't matching the rewritten URL...?) P On Dec 26, 2005, at 5:39 PM, skydiverx wrote: Hi, When I run my application in with just Tomcat everything works like a charm, but when I move my weba

Re: What gives with number validation?

2005-12-26 Thread Paul Cantrell
le to others, I would be willing to work on implementing them Cheers, Paul On Dec 26, 2005, at 2:56 PM, Jesse Kuhnert wrote: No you're right. This is something I recently discovered as wellUnfortunately you'll have to also give it a "translator" binding. I think

What gives with number validation?

2005-12-26 Thread Paul Cantrell
I have a text field in a form, and I want to make sure that the user enters a positive integer into it. I'm utterly befuddled about how to accomplish this in a tidy way using Tapestry's new validation system. Here's my component: @Component( type="TextField", id="bookQuantity",

Re: Stateless links?

2005-12-23 Thread Paul Cantrell
Isn't ExternalLink for pages that implement IExternalService, and still get processed by Tapestry? I think GenericLink, , or just a bare are the options Daniel is looking for. Cheers, P On Dec 23, 2005, at 5:37 AM, Ron Piterman wrote: or ExternalLink Daniel M Garland wrote: Hi all, Wh

Re: [DISCUSS] JDK 1.5 for Tapestry 4.1?

2005-12-20 Thread Paul Cantrell
+1 for pervasive generics support! On Dec 20, 2005, at 3:05 PM, Howard Lewis Ship wrote: With Tapestry 4.0 winding down, some of us are already looking forward to Tapestry 4.1. Now, we would hope that 4.1 will not have as long a life cycle as 4.0, which was 50% too long. I would hope for a f

Re: Tried JSF ... Tapestry Rocks!!!

2005-12-20 Thread Paul Cantrell
Agreed to those reasons. The good argument I see for breaking the inheritance requirement is that it would let one just instantiate a page object straight up, instead of having to worry about getting it from the cycle, clearing fields from previous requests, etc. The Tapestry lifecycle as i

Re: Urgent url issues updrading from beta10 to beta11 or later

2005-12-20 Thread Paul Cantrell
It might have something to do with changes to the behavior of getServletPath() (which I had an argument with uncharacteristically grumpy HLS about on JIRA). Try add this: String fullServletPath = encoding.getServletPath() + StringUtils.defaultString(encoding.getPathInfo()); ...th

Re: page flow configuration

2005-12-19 Thread Paul Cantrell
FWIW, I find that returning an IPage from a listener method is much easier than cycle.activate() in most cases Cheers, Paul On Dec 19, 2005, at 8:28 PM, Mazhar, Osman (Home Office) wrote: That's fine. I just wanted to make sure I don't write any code that is already written. I think I'

Re: Slightly OT - Hibernate Lazy Loading with Spring and Tapestry

2005-12-19 Thread Paul Cantrell
n_with_dao On 12/19/05, Stephane Decleire <[EMAIL PROTECTED]> wrote: Could you explain your custom SqueezeAdaptor approach a bit more ? It seems very interesting ! Stephane Paul Cantrell wrote: open and close the Hibernate session using a servlet filter, keep the session on a ThreadLocal

Re: Slightly OT - Hibernate Lazy Loading with Spring and Tapestry

2005-12-19 Thread Paul Cantrell
If i now deside, that there was something wrong with data submited, i would rollback. But problem is that other sessions from other users are seeing my rollbacked changes. What? If that's true, either you're not actually rolling back, or you're hanging on to persistent objects across reques

Re: Preventing URL hacking in tapestry 3.0.2

2005-12-18 Thread Paul Cantrell
What mechanism are you using to ensure that the user is logged in when the page is requested? It doesn't magically happen by itself; you need to put a check somewhere in the page. You might put it in your listener method, or you might implement PageAttachListener or some such In any c

Re: Slightly OT - Hibernate Lazy Loading with Spring and Tapestry

2005-12-18 Thread Paul Cantrell
open and close the Hibernate session using a servlet filter, keep the session on a ThreadLocal while it's open, and never keep persistent objects in the session (keep their keys instead). Spring already supply a suitable filter that does this, org.springframework.orm.hibernate3.support.OpenSe

Re: Slightly OT - Hibernate Lazy Loading with Spring and Tapestry

2005-12-18 Thread Paul Cantrell
This has come up on the Tapestry list before. A less radical and perhaps less convoluted solution -- if your application can handle a one-db-session-per-request model, which is not true for everyone -- is to open and close the Hibernate session using a servlet filter, keep the session on a

Re: Validate max length of non single byte string (eg. Chinese characters)

2005-12-17 Thread Paul Cantrell
Note that a string has no single well-defined length in bytes -- it depends on the encoding. This hypothetical validator would thus need to take an encoding as a parameter, and you'll have to make sure it matches your DB's encoding. Be careful! It's a sticky problem. That said, it would be

Re: Parameter annotation

2005-12-16 Thread Paul Cantrell
It sounds like it should work. Have you tried it with "getShowDescription" instead of "isShowDescription"? If that fixes the problem, it *definitely* belongs in JIRA. And if it doesn't ... well, I'm not sure, but it very well still may. Cheers, Paul On Dec 16, 2005, at 7:47 PM, Scot

Re: can information stored in the page be cleaned after user leave these page automatically?

2005-12-15 Thread Paul Cantrell
Yes -- but the easiest way to clean stuff up is to let Tapestry manage it for you by writing abstract property accessors: public abstract String getArticleTitle(); public abstract void setArticleTitle(String title); If you declare properties that way, Tap will handle their lifecycle

Re: Is there any way to display a Date as text in the format I wondering?

2005-12-15 Thread Paul Cantrell
Right. Here's an example: format="ognl:dateFormat"/> public DateFormat getDateFormat() { return dateFormat; } private static final DateFormat dateFormat = new SimpleDateFormat ("-MMM-dd HH:mm"); I believe you can also inline the format in the page, though it's a bit messier:

Re: OmniGroup CrashCatcher Report for OmniWeb (5.1.2 (v563.60) (10/24/05))

2005-12-14 Thread Paul Cantrell
wrote: On Dec 14, 2005, at 11:49, Paul Cantrell sent a crash report including: USER DETAILS trying "live examples" at tacos.sourceforge.net Interesting. I also just made OmniWeb crash by going to the Partial Component rendering demo and clicking on one of the "deta

Re: How to include Javascript with correct absolute path?

2005-12-14 Thread Paul Cantrell
ur Border? That writes a base tag that sets the path for all referenced files in the HTML relative to its href's attribute value. On 12/14/05, Paul Cantrell <[EMAIL PROTECTED]> wrote: Tried it, but it doesn't help. Don't really see why it would -- the problem is that

Re: How to include Javascript with correct absolute path?

2005-12-14 Thread Paul Cantrell
at 1:23 PM, Patrick Casey wrote: Did you try the swiss army knife of paths the single dot :)? e.g. src = "./js/dojo/dojo.js" --- Pat -----Original Message- From: Paul Cantrell [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 14, 2005 11:19 AM To:

How to include Javascript with correct absolute path?

2005-12-14 Thread Paul Cantrell
I'm trying to use Tacos, and have run into the problem of including dojo. Tacos recommends I include dojo like this: The trick is that my pages have a custom URL structure involving slashes, so that the path for a page might look like this: /myapp/article/6738 ...and instead of

Re: Further simplifying Tapestry (was: tapestry to JSF conversion)

2005-12-12 Thread Paul Cantrell
And wizards are helpful when you are not familiar with the application of the tool, they are a friendly introduction to doing something. Agreed, but ideally, the tool should be so elegant and self- explanatory that its natural interface is itself a friendly introduction. Obviously that's id

Re: tapestry to JSF conversion

2005-12-12 Thread Paul Cantrell
After Tapestry 4 is final, the next project needs to be to create a comprehensive developers toolset IMO. It's the wizards and autopromts that get the beginners roped in. Spindle would seem to make a logical place to start. Good. Even better: aggressively removing configuration and redund

Re: tapestry to JSF conversion

2005-12-12 Thread Paul Cantrell
Again, tests do not prove absence of unknown bugs. Incorrect. A white box test, tests every permutation of the code, and reveals all possible outcomes. Um, noo ... that is impossible, unless you have an infinite amount of time to wait for your tests to complete. Covering every statemen

Re: DirectLink to a listener in a different page

2005-12-12 Thread Paul Cantrell
People ask this question constantly (including me, when I started learning Tapestry). The short answer, as I understand it, is no. There are two ways to do what you want to do here: (1) Call the listener in CustomerPage, and have it return OrderPage. (2) Have OrderPage implement IExternalPage

Re: tapestry to JSF conversion

2005-12-12 Thread Paul Cantrell
And my point is, and has been that static type checks are a false illusion of "safety". So are tests. P _ Piano music podcast: http://inthehands.com Other interesting stuff: http://innig.net ---

Re: tapestry to JSF conversion

2005-12-12 Thread Paul Cantrell
It's definitely too harsh to say that tests "don't help much." Good tests can help a great deal. They can also be a pain in the ass to maintain ... but they can help if done well. *However*, Konstantin's fundamental point is a good one: tests can't prove your code is correct. Actually, no a

Re: Creating an external url link

2005-12-12 Thread Paul Cantrell
You probably want your page to implement IExternalPage, and use the external service to call it. This allows convenient parameter passing -- your activateExternalPage() method can do any necessary setup. I spent some time grappling with parameter passing and page lifecycle before I figured

Re: adding a custom Type converter

2005-12-09 Thread Paul Cantrell
I've done this, and it works quite well. You need to implement the interface org.apache.tapestry.util.io.SqueezeAdaptor, something like this: public class DomainObjectSqueezeAdaptor implements SqueezeAdaptor { public static final char PREFIX = '*'; private static final Pattern

page-service-encoder for external service no longer working

2005-12-07 Thread Paul Cantrell
Having been away from my Tapestry project for a while, I just upgraded from 4.0b6 to 4.0rc1. Something that worked before is now broken. I map the extension "html" to pages using the external service, as follows: service="external" /> When I bring up my app's home page,

Re: off topic which dev. laptop

2005-09-21 Thread Paul Cantrell
I also have a 1.6 GHz PB / 1G ram. Compatibility is excellent: Tapestry, Hibernate, Eclipse, Tomact, PostgreSQL, Apache, etc etc all run just fine. As others have written, Apple tends to be a little behind the curve on Java updates, and raw performance is acceptable but not as good. A 2GH

Re: Close Hibernate session on every request

2005-09-19 Thread Paul Cantrell
This should be fine for performance, unless your site has an extremely high load. You can use a servlet filter to do this. Cheers, Paul On Sep 19, 2005, at 7:43 AM, Michal Hlavac wrote: Hello, I am using tapestry 4. I created UniwebBasePage extends BasePage there is method: protecte

Re: DataSqueezer in T4

2005-09-14 Thread Paul Cantrell
This one keeps coming up. The Tapestry team has their documentation work cut out! Implement the interface org.apache.tapestry.util.io.SqueezeAdaptor. Create WEB-INF/hivemodule.xml if you don't already have it, and add the following: object="instance:com.whatever.myapp.MyCustom

Re: How to avoid rewind a list?

2005-09-12 Thread Paul Cantrell
If you implement it using the For component, you can set volatile=true. (This is risky business, though.) Cheers, Paul On Sep 12, 2005, at 4:10 AM, Jun Tsai wrote: hi ,all I have a form includes a checkbox group component.I find If I submit the form,it will call my getListData method agai

Re: Tapestry 4 beta 5: Persistent property problem on home page

2005-09-07 Thread Paul Cantrell
Sample code would be helpful. P On Sep 7, 2005, at 4:39 PM, Joey Solis wrote: Platform: Tapestry 4 beta 5 Problem Description: Persistent properties on a page declared as the home-page are not persisted on the first set, but revert back to their initial values. On subsequent sets the pro

Re: performance question

2005-09-07 Thread Paul Cantrell
I'm not sure that's entirely fair -- PHP will outstrip Java on the first request for sure, but a Tapestry + OR app with some decent caching should be able to outshine PHP by a factor of 2x or more, even on individual requests. Pat is completely correct, though: it's about the right tool for

Re: Transaction handling. Where?

2005-08-30 Thread Paul Cantrell
Agreed that it might be possible to make the "transient session" idea work very nicely, but I really think you're making a mountain of a molehill. Hibernate has worked smoothly in the webapps I've done. Cheers, Paul On Aug 30, 2005, at 11:43 PM, Patrick Casey wrote: Anyway, I was jus

Re: Transaction handling. Where?

2005-08-30 Thread Paul Cantrell
a that I have control of and one for "user" updates that I might have to roll back. That way I can always flush my system session and selectively flush the user session. Of course that means twice the number of DB connections, dogs and cats living together, etc, etc, etc. It&

Re: Transaction handling. Where?

2005-08-30 Thread Paul Cantrell
If you open & close your ThreadLocal session from a *servlet filter* instead of trying to finagle it into the tapestry lifecycle, everything is peachy -- at least in my limited experience. For rollbacks, implement a preventCommit() method your code can call on error. In the filter, you eith

Re: Localization: problem with charset

2005-08-30 Thread Paul Cantrell
If the problem is with properties files, the issue is a general Java one, nothing to do with Tapestry. Properties files are ascii only; you must use escape sequences. Read these: http://java.sun.com/developer/JDCTechTips/2003/tt0506.html http://java.sun.com/j2se/1.5.0/docs/tooldocs/wi

Re: Focus in Tapestry 4 forms

2005-08-29 Thread Paul Cantrell
An addition / alternative: provide a Javascript hooks for pages to perform arbitrary actions (e.g. focusing the first input field) when: (1) form was just requested, not submitted; (2) fields are in error; (3) no fields are in error ...or something along those lines. On Aug 29, 2005, at 3:15

Re: The hardest problem ever

2005-08-29 Thread Paul Cantrell
I believe the code Mark gave works only if the parameters are what Tapestry calls "squeezable," meaning that they can be encoded as a string in the URL. If your parameters aren't serializable, or shouldn't be serialized, write a custom SqueezeAdaptor. http://www.google.com/search?q=tape

Re: The hardest problem ever

2005-08-28 Thread Paul Cantrell
I think (1) is on the right track, and although I don't really know how to do this either, it looks like you should examine the source code for ExternalService (or DirectService if you like). If you're in 4.0, the key lines are: private LinkFactory _linkFactory; ... Object[]

Re: Persistance or not?

2005-08-24 Thread Paul Cantrell
I'm writing a mostly-stateless app, and in it I often do similar things -- in your example, Details would have an init(productId) method, and doShowDetails() would call details.init(productId). It works just fine, as far as I can tell. On Aug 24, 2005, at 9:03 AM, Alan Chandler wrote: The

Re: Initialization when called from PageService?

2005-08-23 Thread Paul Cantrell
ageRenderListener(PageRenderListener listener) in your Page constructor (at least that what I do, unless someone has a better idea :-) - Original Message - From: "Paul Cantrell" <[EMAIL PROTECTED]> To: "Tapestry users" Sent: Thursday, August 18, 2005 2:16

Re: Application slowing down

2005-08-22 Thread Paul Cantrell
This is completely correct. If you're going to use the Hibernate long-term session pattern, you have to explicitly *remove* objects from the session when you're done with them. (That's one of the reasons I don't much like the long-term session pattern.) Take this to a Hibernate mailing list

Re: Ajax autocomplete

2005-08-22 Thread Paul Cantrell
If you're willing to do the DHTML to display the suggestion box, the Tacos Part / PartialCall components would help you build this. On Aug 22, 2005, at 12:09 PM, Chris Chiappone wrote: Does anyone have or know of a good autocomplete input field component for tapestry? One that is similiar t

Re: How to create custom data squeezer for tapestry 4?

2005-08-22 Thread Paul Cantrell
Implement the interface org.apache.tapestry.util.io.SqueezeAdaptor. Create WEB-INF/hivemodule.xml if you don't already have it, and add the following: object="instance:com.whatever.myapp.MyCustomSqueezeAdaptor"/> The need for Tap 4 documentation is pretty dire! But at lea

Re: Tapestry headers & caching

2005-08-22 Thread Paul Cantrell
Alternatively, you can write a servlet filter that sets the HTTP headers. Do a google search on "servlet filter" if you're not familiar with them. On Aug 22, 2005, at 1:47 AM, Onno Scheffers wrote: Radim Burget wrote: Hi, I am using tapestry 3.0.3 (with Spring 1.2) could anyone help me

Re: Problem with abstract class "Unable to instantiate..."

2005-08-21 Thread Paul Cantrell
do nothing } To fully implement that interface, and I still get the same error... -Mensaje original- De: Paul Cantrell [mailto:[EMAIL PROTECTED] Enviado el: domingo, 21 de agosto de 2005 19:44 Para: Tapestry users Asunto: Re: Problem with abstract class "Unable to instantiate...

Re: Problem with abstract class "Unable to instantiate..."

2005-08-21 Thread Paul Cantrell
If you implement PageRenderListener, you also need a pageEndRender() method. Trying implementing just PageBeginRenderListener. Cheers, Paul On Aug 21, 2005, at 7:03 AM, Francisco A. Lozano wrote: Hello, I'm starting with tapestry 3. I have a page which I've marked as abstract, because

Re: How to close the brower Inside a Listener? (TP 3.0.3)

2005-08-18 Thread Paul Cantrell
ndow.close(); Not sure if that's exactly right, but hopefully it will help you figure it out. Cheers, Paul On Aug 18, 2005, at 11:16 AM, Patrick Yip wrote: Can you provide a simple example? Thanks. -Original Message----- From: Paul Cantrell [mailto:[EMAIL PROTECTED] Sent: T

Initialization when called from PageService?

2005-08-18 Thread Paul Cantrell
Is there a good way for a page to initialize itself if it's being called from the page service? A different way of asking this might be: is there a way to initialize values only if no listeners are being called? I have a few situations where values on the page are populated (in, say, page

Re: How to edit different data with one page (basically multiple "instances" of one page) ?

2005-08-18 Thread Paul Cantrell
The simpler approach may be to not use persistence at all -- make everything request-based, and pass values through hidden fields as necessary. Trying to make what you're describing work with the session is possible, but will be a headache. This is a good general strategy. I prefer not to k

Re: How to close the brower Inside a Listener? (TP 3.0.3)

2005-08-18 Thread Paul Cantrell
You could try having the listener redirect to a IPage that contains Javascript to close the browser window. On Aug 18, 2005, at 10:43 AM, Patrick Yip wrote: I have a simple form that have 2 submits that tied to 2 listeners. One submit is to Save and the other is to Cancel. Is it possible to

  1   2   >