Re: Minimum and Maximum Validators in 4.0

2006-02-17 Thread Paul Ferraro
You will want to use the following translator binding: translator="translator:number" Paul Howard Lewis Ship wrote: > At the root of this is that the value comes up as a string, and if you > don't tell Tapestry otherwise, it stays a string ... but needs to be a > Number for max and min validator

Re: number-translator doesn't return a zero

2006-03-06 Thread Paul Ferraro
The NumberTranslator has an omitZero property, which by default is true (personally, I think the more intuitive default value should be false). You can override this property in your translator binding like so: Paul Lukas Ruetz wrote: > hello list > > I have an integer value that is

Re: redirect after post

2006-03-09 Thread Paul Ferraro
The easiest way to handle redirect-after-post in Tapestry 4 is to change your listener method return an ILink instead of void. Tapestry will redirect accordingly. Paul Marc Ende wrote: > Hi there, > > I'm a completly newbe to tapestry but I've done my first steps and > everything works great. >

Re: [Q] 4.0: How to override RequestLocaleManager default implementation?

2006-03-15 Thread Paul Ferraro
To override the default implementation of a hivemind service, use the element in your hivemodule.xml. e.g. Paul Giampaolo Tomassoni wrote: > Dears, > > I need to relay on a session object instead of a client

Re: Any tips to preload application on startup?

2006-03-15 Thread Paul Ferraro
There are many ways to do this. Perhaps the most standard way is to register one or more javax.servlet.ServletContextListener objects in your web.xml. Details here: http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletContextListener.html Alternatively, if your initialization logic requires

Re: Any tips to preload application on startup?

2006-03-15 Thread Paul Ferraro
in 3.x? > > thanks, > > Mark > > > -Original Message- > From: Paul Ferraro [mailto:[EMAIL PROTECTED] > Sent: Wed 3/15/2006 8:59 AM > To: Tapestry users > Subject: Re: Any tips to preload application on startup? > > There are many ways to do this. P

Re: need "order the list" component

2006-01-13 Thread Paul Ferraro
Here's one I wrote using Tapestry 3.0: OrderField.jwc: http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd";> OrderField.js: function selectAll(element, selected) { for (var i = 0; i < element.length; ++i) {

Re: NumericField for customer Number? etc

2006-01-17 Thread Paul Ferraro
If you want to bind your field to a number with 10 digits, you should not need to write your own validator nor use custom logic in your listener. Try this: Paul Kent Tong wrote: > spm tapestryforums.com> writes: > > >> Here is what I would like: >> >> >> >> > value="v

Re: Where to report documentation issues?

2005-04-26 Thread Paul Ferraro
Log a bug in Jira (http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10573) and select "Documentation" as the component. Paul Patrick Yip wrote: From time to time I browse the API and online documents and noticed some obvious documentation issues, should I report it so it can be checked

Re: secure cookies

2005-04-26 Thread Paul Ferraro
There's no need to modify the Tapestry source: e.g. Cookie cookie = new Cookie("myname", "myvalue"); cookie.setSecure(true); cycle.getRequestContext().addCookie(cookie); Paul [EMAIL PROTECTED] wrote: only way to make cookies secure in Tapestry is to modify source ? public void addCookie(Cookie co

Re: ValidField and I18n.

2005-04-27 Thread Paul Ferraro
Andreas Andreou wrote: To the dev list: should we all provide our localized version (i have a greek one handy :) ) of ValidationStrings to be included in the next Tapestry release??? Yes! Create an entry in Jira and submit your localized validation messages. Paul

Re: Reload button causes wierd behavior

2005-04-28 Thread Paul Ferraro
Your url probably indicates a direct link (or similar) that triggers the onDoSthg listener of PageA, no? If you find this behavior undesirable, then you should redirect to PageB instead of simply activating it. Paul david joffrin wrote: Hi, I have just realized something today on my code, reall

Re: Reload button causes wierd behavior

2005-04-29 Thread Paul Ferraro
ectException(page); } } david joffrin schrieb: > Hi, > > No, my URL does not indicate anything like direct link, this is a > straight www.mydomain.com/foo/bar. > > Just to test, how can I programmaticly have a redirect rather than an > activation. > > Thanks. > DvJ &

Re: init something once

2005-05-02 Thread Paul Ferraro
Other locations that come to mind are: a servlet context listener, overriding the init() method of the Tapestry servlet, or the global object facility. Paul Erik Hatcher wrote: On May 2, 2005, at 3:03 PM, sastan wrote: Hello, i want to initialize something (e.g. do some work) before the first

Re: init something once

2005-05-02 Thread Paul Ferraro
, 2005, at 5:15 PM, Paul Ferraro wrote: Other locations that come to mind are: a servlet context listener, overriding the init() method of the Tapestry servlet, or the global object facility. Global, though, will be instantiated on the first call to getGlobal() though, not on startup. Right

Re: Stale Link

2005-05-03 Thread Paul Ferraro
How are you redirecting in your listener? I suspect that's where the problem is... Paul Alberto Lepe wrote: Here is the challenge: I have a List of Image's File name, with an ImageSubmit to delete them, like: image1.jpg [X] image2.jpg [X] Quite simple. I press on the [X] and the image is del

Re: Stale Link

2005-05-03 Thread Paul Ferraro
PageRedirectException does not actually redirect. It simply activates the specified page. Consequently, reloading the page reexecutes the form submit causing a stale link exception since the number of form elements has changed between rewind and render. To actually redirect, try the following:

Re: Getting StringValidator's messages from your own .property file

2005-05-03 Thread Paul Ferraro
Ed Cohen wrote: How do I replace the StringValidator's messages with ones in my own .property file? Implement getMyMinimumLengthMessage() accordingly. Also, a quick ognl question. In a .page file, is there a way to get to the page's getMessage("xyz") method? Instead of an ognl expressi

Re: tapestry 4.0 ognl lib missing in workbench.war

2005-05-07 Thread Paul Ferraro
Actually, this is not a license issue at all. The workbench build script needs to be updated to include ognl as a runtime library (not just compile-time). I'm in the process of fixing this now. Paul seloha . wrote: It did cross my mind that it was something to do with the license but I though

Re: Popup and DirectLink

2005-05-09 Thread Paul Ferraro
Yes - all link components have a "renderer" parameter. Bind this to an instance of org.apache.tapestry.contrib.link.PopupLinkRenderer. Paul Scott F. Walter wrote: Hi, Is there a way to have a popup where the url for the popup window is a @DirectLink. I looked at the PopupLink inside the contri

Re: Simple loop for Select

2005-05-10 Thread Paul Ferraro
The Foreach component also accepts an iterator for its source parameter. I use a custom Iterator implementation to achieve simple looping behavior: ... where CounterIterator is defined as: public class CounterIterator implements Iterator { private int index; private int max; public Co

Re: empty TextField to null not empty string

2005-05-11 Thread Paul Ferraro
I think the easiest way to change this behavior globally is to implement your own TextField component: public abstract class TextField extends org.apache.tapestry.form.TextField { public void updateValue(String value) { getValueBinding().setString(((value != null) && (value.length()

Re: Validating a PropertySelection

2005-05-11 Thread Paul Ferraro
FYI, Tapestry 4.0 will include both: * an IPropertySelectionModel decorator for adding an initial label row to your model (exists as of alpha-1). * a "required" parameter In the meantime, you can obtain the desired behavior in 3.0 by combining the LabeledPropertySelectionModel class from the 4.0

Re: Pass Parameters with a PageRedirectException

2005-05-13 Thread Paul Ferraro
To implement POST->Redirect->GET, you need to use RedirectException, NOT PageRedirectException. Throwing PageRedirectException simply interrupts the current render cycle and activates the specified page within the same request. To generate the url required for RedirectException you will need to u

Re: just wondering..

2005-05-14 Thread Paul Ferraro
Yes - you will need to use the binding direction "form" for parameters that you want read during render and updated during rewind. More details on binding direction here: http://jakarta.apache.org/tapestry/doc/TapestryUsersGuide/spec.parameter.html Check out the Palette component in the contrib l

Re: IEngine replacement 4.0

2005-05-14 Thread Paul Ferraro
Check out the section on application state objects: http://jakarta.apache.org/tapestry/current/UsersGuide/state.html#state.aso Paul seloha . wrote: I am trying to write a Tapestry 4.0 application with reference to the workbench. Workbench uses: Visit visit = (Visit) cycle.getEngine().getVisit();

Re: Static Access to Visit Object?

2005-05-14 Thread Paul Ferraro
Is your interceptor set in your Hibernate Configuration object? or when you created your Hibernate Session? Ideally, you would set the interceptor when you create your session, so that your interceptor can be constructed using the current user. Something like: Session session = sessionFactory.op

Re: Decoding HTML in Tapestry

2005-05-15 Thread Paul Ferraro
Actually, OGNL /does/ support object indexed properties. Read more about it here: http://www.ognl.org/2.6.7/Documentation/html/LanguageGuide/indexing.html#N101C5 Paul Jijoe Vurghese wrote: I tried searching this forum, but didn't find anyone running into a similar situation. Here is what I have

Re: Border Component and Messages

2005-05-17 Thread Paul Ferraro
This is because pageEndRender() gets called at the end of both rewind and render. Your page should implement PageDetachListener and move your setMessage(null) code to the pageDetached() method. Paul Scott F. Walter wrote: Hi, I had a solution for displaying messages at the top of page that I th

Re: Delay component rendering

2005-05-17 Thread Paul Ferraro
Look at the code for the Form and Body components. They both have this behavior. Paul SG wrote: Hi, I wanted to know if there is a way to delay/postpone the rendering of a particular component programmatically. Here is the scenario - I have an error component, which works off of a collection of

Re: Tapestry 4.0 Unable to read OGNL expression

2005-05-26 Thread Paul Ferraro
In 4.0, component parameters have a default binding type. The default binding type for the "selected" parameter is ognl: http://jakarta.apache.org/tapestry/current/tapestry/ComponentReference/Submit.html Try this instead: selected="whichButton" tag="cancel" onclick="form.onsubmit = null;"/>

Re: Enum-Constants in property-spec initialize

2005-05-26 Thread Paul Ferraro
Use the ognl syntax for static fields: http://www.ognl.org/2.6.7/Documentation/html/LanguageGuide/staticFields.html e.g. @[EMAIL PROTECTED] Paul Schulte Marcus wrote: Can anyone help me with some ognl-Syntax? I want to init a page property with an Enum-Constant like this: type="com.bmw.ext

Re: Tapestry 4.0 Unable to read OGNL expression

2005-05-26 Thread Paul Ferraro
Yes - you guys are right. I think we should change the default binding of the tag parameter to literal, instead of ognl. Hensley, Richard wrote: or tag="literal:cancel" -Original Message- From: Mikaƫl Cluseau [mailto:[EMAIL PROTECTED] Sent: Thursday, May 26, 2005 2:36 PM To: Tapes

Re: Tapestry 4.0 Unable to read OGNL expression

2005-05-26 Thread Paul Ferraro
an expression though seems like a huge source of confusion for an extraordinarily minor saving in keystrokes. --- Pat -Original Message- From: Paul Ferraro [mailto:[EMAIL PROTECTED] Sent: Thursday, May 26, 2005 3:20 PM To: Tapestry users Subject: Re: Tapestry 4.0 Unable to read

Re: Why can't tapestry have LGPL code?

2005-05-29 Thread Paul Ferraro
Specifically, the GPL and LGPL have a "copyleft" clause. The Apache License does not. Read more about that here: http://www.gnu.org/licenses/licenses.html#WhatIsCopyleft Read more about Apache/GPL compatibility here: http://www.apache.org/licenses/GPL-compatibility.html Paul David Leangen wr

Re: load cookies to restart session

2005-05-29 Thread Paul Ferraro
I'm not sure what you mean... If your application server is configured to use cookies instead of forcing a session ID in the url, then if a logged in user closes his/her browser without logging out, and then open their browser again, the existing cookie will still be valid and the user's session wi

Re: disable submit button when pressed

2005-05-31 Thread Paul Ferraro
Correct me if I'm wrong, but if you disable the submit/image button before submitting the form, then the submit's value (or image submit's coordinates) will not be submitted as a form value. Since Tapestry relies on these values to determine which submit/image button was clicked, then the subm

Re: Getting HttpSession by ID

2005-06-01 Thread Paul Ferraro
Yes - but I would not recommend using it. It's part of the HttpSessionContext object that was deprecated some time ago because of the potential for abuse. http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSessionContext.html#getSession(java.lang.String) Paul Krutyakov Roman wrote:

Re: PropertySelection

2005-06-03 Thread Paul Ferraro
Yes (assuming that they contain different data), but your IPropertySelectionModel should ideally present a "view" of your collection - so you should easily be able to create a implementation class to handle each type of collection. Paul Vinicius Carvalho wrote: Well, once again I'm confused

Re: PropertySelection

2005-06-04 Thread Paul Ferraro
examples of this sort of thing. Erik On Jun 4, 2005, at 12:43 AM, Paul Ferraro wrote: Yes (assuming that they contain different data), but your IPropertySelectionModel should ideally present a "view" of your collection - so you should easily be able to create a implementati

Re: custom NumberValidator

2005-06-16 Thread Paul Ferraro
Look at org.apache.tapestry.form.translator.NumberTranslator in the 4.0 branch. It should be easy enough to adapt this to the 3.0 IValidator interface. Paul Eric Schneider wrote: Hi, Has anyone created a subclass of NumberValidator that includes a format attribute similar to the DateValida

Re: default-binding hell

2005-06-22 Thread Paul Ferraro
This has been an ongoing debate on the dev list. Both committers and users are split around whether or not this feature causes more confusion than it helps. There was even a vote (which failed) on whether or not to remove this feature. Check out the dev list archives and read what has been s

Re: Tapestry 4.0 validation

2005-06-28 Thread Paul Ferraro
The changes are fairly straight forward, though I haven't gotten around to formal documentation yet. In short, use a TextField in place of ValidField; in place of a single IValidator, you should specify a Translator (if the default is insufficient), and zero or more Validators. Validators and

Re: Tapestry 4 Validation Question

2005-07-03 Thread Paul Ferraro
Scott F. Walter wrote: So the format for the new validator syntax is : validator:/name/[,/property/[=/value/]]* My questions are: 1. If I create my own custom validator what do I specify for "name", is it the full qualified class path or do I need to some how register "name" with a full qua

Re: More Tapestry 4 Validation QUestions

2005-07-05 Thread Paul Ferraro
Scott F. Walter wrote: 1. Can I specify more than 1 parameter to a custom validator when you have multiple validators??? The reason I ask this, because if I specify validators to component like this: required,maxLen=4,minLen=1 The validators are sepertored by commas, so if I want multiple

Re: DirectLink to popUp window

2005-07-05 Thread Paul Ferraro
lows you to specify window 'features' ( like width, height, etc)? On 1/31/05, Paul Ferraro <[EMAIL PROTECTED]> wrote: Use a normal DirectLink, but specifiy org.apache.tapestry.contrib.link.PopupLinkRenderer as the renderer. Paul Jordan Redner wrote: Has anyone impleme

Re: DirectLink to popUp window

2005-07-05 Thread Paul Ferraro
assNotFoundException org.apache.tapestry.contrib.link.PopupLinkRenderer On 7/5/05, Paul Ferraro <[EMAIL PROTECTED]> wrote: Yes - look look at PopupLinkRenderer.setFeatures(...). e.g. ... where the popup bean is defined as: Paul Jer Kah wrote: Is there a way to use this technique or a simi

Re: ExternalPage in email

2005-07-05 Thread Paul Ferraro
Make sure you run the parameters through DirectLink.constructServiceParameters(...) so they are properly squeezed by the DataSqueezer. e.g. ILink link = service.getLink(cycle,cycle.getPage(),DirectLink.constructServiceParameters(params)); Paul Ralph Churchill wrote: It wasn't clear to me t

Re: ExternalPage in email

2005-07-06 Thread Paul Ferraro
does not exist - all parameters to a given service have a more structured representation (e.g. ExternalServiceParameter, DirectServiceParameter, etc.). Paul Kent Tong wrote: Paul Ferraro columbia.edu> writes: Make sure you run the parameters through DirectLink.constructServiceParamet

Re: Cancel listener?

2005-07-06 Thread Paul Ferraro
This doesn't answer your question, but... If you don't need access to the submitted values of your form within your listener method (as is typically the case) then you can easily (and more efficiently) implement a cancel button by combining any type of link component (e.g. DirectLink) with a o

Re: PropertySelection + Javascript

2005-07-11 Thread Paul Ferraro
No - but onchange can be specified as an informal parameter. e.g. onchange="doSomething()"> ... where doSomething() is a function defined in your IScript. Paul Muhariz Jabeer wrote: hey guys, does the PropertySelection component have something like an "onchange" property which you can bin

Re: 4.0b2: No validator named 'string' has been defined.

2005-07-13 Thread Paul Ferraro
'string' refers to a translator, not a validator. For the complete list of validators contributed to the Validators configuration point, see framework/src/descriptor/META-INF/tapestry.form.validator.xml in the source distribution. Since StringTranslator is the default translator for TextField

Re: Javascript - looping

2005-07-14 Thread Paul Ferraro
Your .script file should look something like this: Specification 3.0//EN" "http://jakarta.apache.org/tapestry/dtd/Script_3_0.dtd";>

Re: getEngine().getVisit() equivalent in tp4?

2005-07-14 Thread Paul Ferraro
Did you read the documentation section of Application State Objects (ASOs)? http://jakarta.apache.org/tapestry/UsersGuide/state.html#state.aso Paul Henri Dupre wrote: getEngine().getVisit() has been deprecated and if I understand with ASO, a call to getVisit() will create the visit. So how to

Re: Friendly URL Servlet Path Problem.

2005-07-22 Thread Paul Ferraro
How does your custom service implement IEngineService.getLink(...)? If you are closely adhering to the code outlined at http://wiki.apache.org/jakarta-tapestry/FriendlyUrls then this method should look something like this: public static final String SERVICE_NAME = "EnrollmentReportService"

Re: Possible Bug?

2005-07-22 Thread Paul Ferraro
I would expect the template parser to throw an exception in this case. A tag should not be allowed to specify the same attribute twice. As far as I know, this has not yet been addressed in 4.0. I would go ahead and create a jira entry. In the meantime, it would be great if Spindle could flag

Re: How to enable validting TextField client scripting and focused?

2005-07-24 Thread Paul Ferraro
FYI - In 4.0, client-side validation is enabled per form. e.g. ... Paul tapestrycn wrote: Hi, The ValidField component can easily enable client scripting and the text field rendered by the component is always focused,However,after upgrading to validating TextField in tapestry 4,the two fe

Re: could a component's property cannot be used as it's parameter?

2005-08-04 Thread Paul Ferraro
You need to define "logoutToPage" in your component specification as a parameter, not a property. Paul Pickerel Yee wrote: >I have a component, and define it in the .jwc as below: >allow-body="no" allow-informal-parameters="no"> > > > >and this component is be used in a page as blow: > >

Re: PropertySelection question

2005-08-08 Thread Paul Ferraro
Check out the org.apache.tapestry.link.ButtonLinkRenderer in the 4.0 codebase. You can implement your cancel button like this: renderer="ognl:beans.buttonRenderer">Cancel where buttonRenderer is a bean: class="org.apache.tapestry.link.ButtonLinkRenderer"/> Paul Ryan Wynn wrote: On a side

Re: How to specify a var to validators

2005-08-12 Thread Paul Ferraro
The validators binding is meant for static initialization parameters only. If you want to use dynamic initialization parameters, use the bean approach that you used in Tapestry 3. e.g. Jone.hwk wrote: Hi, I'd like to change the "maxLength" at runtime for the validator

Re: Validatable fields: should bound property be updated if in error?

2005-08-23 Thread Paul Ferraro
Ben is right. Currently, values are bound only if translation succeeds (this is essential), but before validation happens. This was done purposefully to support "Save" style logic, since validation errors can optionally be ignored in the triggered form listener by ignoring the value of IValidat

Re: Validatable fields: should bound property be updated if in error?

2005-08-23 Thread Paul Ferraro
g unwanted validation exceptions *inside* your domain objects that will prevent normal form processing from operating. On 8/23/05, Paul Ferraro <[EMAIL PROTECTED]> wrote: Ben is right. Currently, values are bound only if translation succeeds (this is essential), but before validation happen

Re: validators binding in T4

2005-08-26 Thread Paul Ferraro
Until then, you can still leverage the 3.0 style by specifying an ognl list to the validators parameter. e.g. ... Howard Lewis Ship wrote: In beta-5, due shortly, you will be able to define your pattern validator as a managed , and then reference the bean in your list as $name. li

Re: PageLink with button

2005-09-01 Thread Paul Ferraro
The ButtonLinkRenderer is new to Tapestry 4.0. Also, as of beta-5, it has been refactored to org.apache.tapestry.contrib.link along with the other link renderers. Here is the ButtonLinkRenderer class retrofitted for Tapestry 3.0. Note that since ILinkComponent.getTarget() was not added until 4

Re: Decimal rounding problems when working with currency.

2005-09-01 Thread Paul Ferraro
The NumberTranslator internally uses java.text.DecimalFormat to parse/format numbers. Unfortunately, DecimalFormat is only capable of parsing/formatting numbers with at most double precision or smaller. To work with BigDecimal (or BigInteger for that matter) you will need to write your own Tran

Re: disable the submit button

2005-09-08 Thread Paul Ferraro
Unfortunately, disabling the submit button in this manner will prevent your submit listener from being invoked since the value of the submit button (like any disabled form component) is not submitted with the form. This value is looked for by the submit component to determine whether or not to inv

Re: numberic valid field not showing zero

2005-09-09 Thread Paul Ferraro
A few betas ago, Howard introduced an "omitZero" property to NumberTranslator. Interestingly, omitZero is true by default. This means that, by default, 0's will be formatted as "", even though submitted "0"s are parsed as 0, and submitted ""s are parsed as null. I disagree that special treatment

Re: How to initialize app on startup

2005-09-14 Thread Paul Ferraro
There are many approaches one can take depending on your architecture. For simple web applications, I find it easiest to implement a javax.servlet.ServletContextListener. Place your application initialization code in the void contextInitialized(ServletContextEvent event) method. Register your l

Re: Unique Validator in Foreach loop

2005-03-31 Thread Paul Ferraro
Off the top of my head, try something like this: public class UniqueValidator implements IValidator { private Set valueSet = new HashSet(); public toObject(IFormComponent field, String input) throws ValidatorException { // Preliminary validation // Validate uniqueness i

Re: Dealing with session time-outs

2005-04-01 Thread Paul Ferraro
I suspect that your issue has to do with the way you are generating your url for RedirectException(). I would guess that the user's session id is not being encoded properly. Can you explain how you are generating your redirect url in step 3? To properly generate a non-SSL redirect to your login

Re: Dealing with session time-outs

2005-04-03 Thread Paul Ferraro
le.getEngine().getService(Tapestry.PAGE_SERVICE).getLink(cycle, cycle.getPage(), new String[] { "Account" }); throw new RedirectException(link.getAbsoluteURL("http", request.getServerName(), 80, null, true)); The difference from yours being the second parameter to the call to getAbso

Re: using InspectorButton

2005-04-04 Thread Paul Ferraro
To use the contrib library, include the following line in your .application file: I believe theserverside uses a servlet filter to intercept *.tss requests to trap and foward these requests to the appropriate Tapestry uri. Do a search in the user list archives and you'll find plenty on t

Re: using InspectorButton

2005-04-04 Thread Paul Ferraro
avets wrote: thanks a lot...and one more thing, .application file needs to be named same way as application or any name will do? Paul Ferraro wrote: To use the contrib library, include the following line in your .application file: I believe theserverside uses a servlet filter to intercept

Re: PageRedirectException

2005-04-06 Thread Paul Ferraro
Your MyProtectedPage should implement PageValidateListener. Move this logic into the corresponding pageValidate(PageEvent) method. Paul Scott F. Walter wrote: I am having a problem with going back to a login page after a session has timed out. I have a page called MyProtectedPage that all my p

Re: Submit component help

2005-04-12 Thread Paul Ferraro
When you submit a form via a submit button, the submit button's name and value are posted along with the form data. The Submit component relies on this information to determine whether or not to trigger its own listener. In HTML, when a form element is disabled, its name and value are not pos

Re: Does Tapestry 3.0.2...

2005-04-12 Thread Paul Ferraro
Yes, but you'll need to define their location relative to the WEB-INF directory in your .application file. e.g. Paul Mark Stang wrote: Hi, Does Tapestry 3.0.2 support putting files in sub-directories? I am starting to get a lot of .jwc, .page, and .html files? It would be easier if

Re: tacos Partials with 3.0.3 Friendly URLs

2005-04-12 Thread Paul Ferraro
The url generated by this script is specific to Tapestry's built-in Direct and Action services. Since FURLs overrides the url generation/parsing logic of these services, the script breaks. If you ask me, it would have been a better decision to copy logic from the getLink() method from Form rath

Re: FriendlyUrls Preferred Method for index.htm functionality

2005-04-14 Thread Paul Ferraro
If your Home.page is mapped to "index", why not map your Login.page to "admin/index". That way your servlet filter logic is easy. You might even be able to define "index.htm" as a welcome-file and do without the filter entirely. Paul Zachary Pinter wrote: I've just installed the FriendlyUrls pa

Re: Shared Janitor thread config

2005-04-14 Thread Paul Ferraro
Unfortunately, no. Paul Danny Angus wrote: Is there a configuration setting (In the servlet params perhaps?) I can use to change the Shared Janitor Thread "interval" I want to reduce it to help diagnose the root cause of an issue we have with stale links, and possibly increase it in production to m

Re: Shared Janitor thread config

2005-04-14 Thread Paul Ferraro
Actually, that's not possible. The shared janitor thread "locks" its interval after it is created inside getSharedJanitorThread(). setInterval(...) will result in an IllegalStateException() in the code below. Paul Kent Tong wrote: Danny Angus slc.co.uk> writes: Is there a configuration sett

Re: Shared Janitor thread config

2005-04-14 Thread Paul Ferraro
Yes - thanks for pointing that out. Kent Tong wrote: Paul Ferraro columbia.edu> writes: Actually, that's not possible. The shared janitor thread "locks" its interval after it is created inside getSharedJanitorThread(). setInterval(...) will result in an IllegalStateExcep

Re: ApplicationRuntimeException

2005-04-15 Thread Paul Ferraro
To summarize... Prior to 3.0.3, the Asset service, which is responsible for streaming private assets from the classpath, only required a single service parameter: the path to the resource. This was problematic since a rogue user could manipulate the url to fetch any resource such as your serve

Re: Redirects...

2005-04-15 Thread Paul Ferraro
The RedirectException() will forward (i.e. server-side) the request if a relative uri is specified. If the uri specified is absolute then it will perform a redirect (as in #2). When I need to redirect to a page, I perform the following: throw new RedirectException(cycle.getEngine().getService(T

Re: Service construction, friendly urls

2005-04-15 Thread Paul Ferraro
That should be configured in your servlet engine, *not* in Tapestry. If you don't want the servlet context in the url, then you should configure your servlet engine to use a servlet context of "/". Paul Henrik Vendelbo wrote: I need to do a bit of modification to the friendly urls implementatio

Re: accessing ServletContext

2005-04-15 Thread Paul Ferraro
s" Sent: Friday, April 15, 2005 7:34 PM Subject: Re: Service construction, friendly urls I did, but it doesnt seem to work. - Original Message - From: "Paul Ferraro" <[EMAIL PROTECTED]> To: "Tapestry users" Sent: Friday, April 15, 2005 7:18 PM Subject: Re: Se

Re: Code Generated Links

2005-04-17 Thread Paul Ferraro
Try this: Have your MenuBuilder component implement IDirect. IRequestCycle cycle = this.getPage().getRequestCycle(); Object[] parameters = new Object[] { menuItem }; // Here is where you would indicate the menu item String url = cycle.getEngine().getService(Tapestry.DIRECT_SERVICE).getLink(cycle,

Re: Number validator (admittedly, minutia) problem..

2005-04-17 Thread Paul Ferraro
I would recommend writing your own IValidator implementation that uses a java.text.DecimalFormat object to format and parse your values. Regrettably, Tapestry 3.0.x is missing some obvious IValidators like this one. Part of the reason, I think, is that there is so much duplication across impl

Re: Creating checkboxes for multiple select items.

2005-04-18 Thread Paul Ferraro
Have you looked at the contrib:MultiplePropertySelection component? It does exactly this. Paul Random Tapestry User wrote: Hi all, Not sure if I'm missing something here. I've read the book, and I know this must be something simple I have overlooked. I have a survey that the user needs to fill