Re: T4: How to set the option value for the Option component?

2007-10-04 Thread Nick Westgate
Well, not using Select and Option, which I presume you are using for a reason. PropertySelection is more customizable. Cheers, Nick. Joshua Jackson wrote: Looks like I have no other option here. Thanks Nick. :) On 10/5/07, Nick Westgate <[EMAIL PROTECTED]> wrote: Use the source. That's dele

Re: T4: How to set the option value for the Option component?

2007-10-04 Thread Joshua Jackson
Looks like I have no other option here. Thanks Nick. :) On 10/5/07, Nick Westgate <[EMAIL PROTECTED]> wrote: > Use the source. That's delegated to the surrounding Select: > http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/Option.java?view=

Re: T4: How to set the option value for the Option component?

2007-10-04 Thread Nick Westgate
Use the source. That's delegated to the surrounding Select: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/Option.java?view=markup Looks like you'll have to copy Option and start hacking. Cheers, Nick. Joshua Jackson wrote: Dear all,

Re: How can this be made session safe?

2007-10-04 Thread Tom Davies
On 05/10/2007, at 8:14 AM, Robert A. Decker wrote: I have a question about this demo: http://lombok.demon.co.uk/tapestry5Demo/test/actionlink/one here's the source: http://lombok.demon.co.uk/tapestry5Demo/test/actionlink/onesource When I use this demo and look at the generated source code I s

Re: T5: Newbie question - creating and accessible a new page

2007-10-04 Thread Nick Westgate
This should work if you restarted the server after creating the new page. Hugo just posted he is having problems with template reloading in 5.0.6. Your problem might be related. Cheers, Nick. jblier wrote: Although the tutorial Guess Hi/Lo (5.0.5) lets me access the guess page directly, I'm t

T4: How to set the option value for the Option component?

2007-10-04 Thread Joshua Jackson
Dear all, I have statically set up an Option component as such: But the html rendered as such: Male Female I need to set up the value to be male and female instead of 0 and 1. Is this possible in Tapestry. I couldn't find it in the Option and Select component document. Thanks in advance. --

Re: coercion error?

2007-10-04 Thread Nick Westgate
Note there are cleaner ways of writing the HTML. The "Tapestry Way" is to to get components to do the work for you. You could use your own link component or an Action or (*)PageLink: main (*) This will work for ActionLink, but PageLink currently doesn't support "disabled". (There is already a J

Re: [T5] Component Parameters

2007-10-04 Thread Nick Westgate
You would use the "prop:" binding prefix or an expansion. Please see "Binding Expressions" and "Expansions": http://tapestry.apache.org/tapestry5/tapestry-core/guide/parameters.html http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html The prop binding language is very simple, s

Re: [T5] every user sharing the same session

2007-10-04 Thread Nick Westgate
This is less a Tapestry topic and more of a web dev/J2EE topic. Web servers usually use a cookie to identify the session. If you open a new window in the same browser, the same cookie is supplied, therefore the same session. If you open a new browser instance, then it will be in a new session. U

Re: Eclipse code assist/intellisense

2007-10-04 Thread robert.sanders
I think the WTP plugin works w/ HTML completion, but I've never tried it with T5. You may need to poke around under the Preferences > General > Content Types and Preferences > General > Editors > File Associations to get it to recognize *.tml files as an HTML variant. You might also try Aptan

Re: [T5] every user sharing the same session

2007-10-04 Thread Robert A. Decker
Sorry for the follow-up so soon, but what I'm basically wondering is if I have to write my own Session manager? I would have to create a Session object at user log in (I don't think I'd even bother using an ASO), save that in my session manager, put it's id in all forms and hyperlinks so th

[T5] every user sharing the same session

2007-10-04 Thread Robert A. Decker
I'm working on an application where a user logs into the action and from there every action they take is audited by being saved in the database, tied to that user in the database. I've been trying to follow the examples, but it seems that in my app all users share the same session when I us

RE: [T5] Component Parameters

2007-10-04 Thread Jean-Philippe Steinmetz
Thanks for the response. I think for most cases going the @Parameter(defaultPrefix="literal") approach is probably the best one. However I am curious, if I do set the defaultPrefix as literal how would I be able to use a variable in my template? For instance if I wanted to do where 15 is the val

Re: coercion error?

2007-10-04 Thread Josh Canfield
HI Robert, An if/else looks like this: The if stuff the else stuff Josh On 10/4/07, Robert A. Decker <[EMAIL PROTECTED]> wrote: > > I kind of got around this by putting in my Layout.html: > > > > main > > > > And in Layout.java: >public boolean getIsMainSection() { >

Re: coercion error?

2007-10-04 Thread Robert A. Decker
I kind of got around this by putting in my Layout.html: main And in La

Re: [T5] Component Parameters

2007-10-04 Thread Josh Canfield
The problem with your first method is that you are trying to pass a literal but the default parameter type is property. Change it to: or or change the defaultPrefix in your Parameter to literal @Parameter(defaultPrefix="literal") The problem with the second method is that you are passing a

coercion error?

2007-10-04 Thread Robert A. Decker
I'm getting an error: "Could not find a coercion from type com.pgp.licenseserver.pages.Main to type com.pgp.licenseserver.pages._PGPLicenseServerPage. Available coercions:..." But my Main.java extends _PGPLicenseServerPage and so there shouldn't be any coercion necessary. And besides, wh

[T5] Component Parameters

2007-10-04 Thread Jean-Philippe Steinmetz
Hello All, I have a layout component that I use to wrap all my pages with the same HTML header/footer. I would like to be able to set the page name with this component. Ideally I would like it to look like: http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> Page content goes here

How can this be made session safe?

2007-10-04 Thread Robert A. Decker
I have a question about this demo: http://lombok.demon.co.uk/tapestry5Demo/test/actionlink/one here's the source: http://lombok.demon.co.uk/tapestry5Demo/test/actionlink/onesource When I use this demo and look at the generated source code I see nothing in the html that looks like a session ide

Eclipse code assist/intellisense

2007-10-04 Thread Heck, Bob
Does anyone know how to get code assist/intellisense when working on the HTML file in Eclipse with Tapestry 5? If so please explain the procedure for getting this working or point me to instructions. Thanks, Bob

T5: Newbie question - creating and accessible a new page

2007-10-04 Thread jblier
Although the tutorial Guess Hi/Lo (5.0.5) lets me access the guess page directly, I'm trying to do the same in my current org.example.myapp.pages running with 5.0.6-snapshot. In webapp I crated a Guess.tml file and in org.example.myapp.pages I created a Guess.java file. Both guess files are loadi

Re: New BeanEditForm property block data passing

2007-10-04 Thread Robin Helgelin
On 10/4/07, Robin Helgelin <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to add support for Daniel Jue's excellent SelectMultiple > component as a BeanEditForm property. > > The only thing I need now is how to pass information from the > page/component that contains the form to the property block

T5: Templates not reloading in latest snapshot

2007-10-04 Thread Hugo Palma
Anyone else having problems with template reloading in the 5.0.6-SNAPSHOT ? Class reloading works just fine, maybe the change of template file location and extension broke this feature. Thanks

Re: form post-redirect

2007-10-04 Thread Martino Piccinato
IExternalPage http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/IExternalPage.html You'll have to generate an IExternalLink http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/link/ExternalLink.html using the IExternalService (injected into the page) http://tape

[ANN] Trails 1.1.1 release

2007-10-04 Thread Kalle Korhonen
Hello "Trailers" :) Just as promised, we are happy to announce Trails 1.1.1 release! It feels it's been so long, even though it was less than six months ago we hit 1.0. The single biggest difference between 1.0 and 1.1 is the modularized architecture. The documentation gives you an overview

Re: [5.0.6-SNAPSHOT] Bug? isTraceEnabled missing when I switch to slf4j

2007-10-04 Thread Francois Armand
Christian Koeberl wrote: followup. Strange thing is - looking at the actuall log4j.Logger - it has an isTraceEnabled, so I'm really unclear as to why this would happen. The problem is the log4j lib in the Jetty ext directory - replace it with the newer log4j (1.2.12 or higher) version.

form post-redirect

2007-10-04 Thread Patrick Kelly
Hi, I am having some trouble with a post-redirect in tapestry 4. First, I have two pages, lets call them pageMain and pageForm. I have a direct link using a listener with parameters from pageMain to pageForm. On pageForm I have a simple form with a submit button that calls a listener t

Re: T5: retrieve user defined parameter at start of Tapestry

2007-10-04 Thread Christian Köberl POI
Hello Angelo! Angelo Chen wrote: > > I tried to do following, but does not work: > 1. i added a param in the web.xml: > > tapestry.app-package > org.test > > test > myparam > > You have to define each context parameter seperately:

Re: T5 Error in 5.0.5 palette.js

2007-10-04 Thread Joel Wiegman
Just tacking onto the thread that a patch is available for the problem discussed in this thread: https://issues.apache.org/jira/browse/TAPESTRY-1745 Seems like a pretty unintrusive fix... Anxiously awaiting for a committer to test and include... Howard Lewis Ship wrote: > > Please add this a

Re: retrieve resource as a stream

2007-10-04 Thread Daniel Jue
Peter, look here and see if this helps: http://wiki.apache.org/tapestry/Tapestry5HowToCreateADynamicPDF I use almost the same code for pulling up images. Maybe I should add it to the wiki. package com.mycompany.myapp.model.services; import java.io.InputStream; import org.apache.log4j.Logger;

Re: T5: Domain level localization

2007-10-04 Thread Angelo Chen
Hi Kristian, Thanks for the super fast reply, it's surprised me! alias service looks the T5 way to go for that, but kind of advanced topic, u did give me some directions, let me study those areas first before asking more questions. A.C. kristian.marinkovic wrote: > > you have to put in all t

Re: T5: Domain level localization

2007-10-04 Thread Kristian Marinkovic
you have to put in all the methods into your AppModule class... they should work as is. die Alias Service is needed to replace an existing service with a new service that has the same interface. Tapestry has the ThreadLocale service that uses the ThreadLocaleImpl implementation. By contributing t

Re: T5: Domain level localization

2007-10-04 Thread Angelo Chen
Hi Jerome, Thanks, filter looks easier, you meant we will set the locales in the filter based on the domain then 'chain' to the T5 filter/servlet? but I seem not able to find a setLocale in the request? any hint? A.C. Jérôme BERNARD wrote: > > Maybe a servlet filter? > > > Jérôme. > > On 1

Re: T5: Domain level localization

2007-10-04 Thread Angelo Chen
Hi Kristian, Thanks for the reply, it's kind of difficult for a Tapestry newbie to understand that code, will try to research some more on the topic of alias first and come back later. A.C. kristian.marinkovic wrote: > > you could create your own ThreadLocale object that has > the request obje

Re: T5: retrieve user defined parameter at start of Tapestry

2007-10-04 Thread Angelo Chen
Hi Chris, I tried to do following, but does not work: 1. i added a param in the web.xml: tapestry.app-package org.test test myparam 2. then i tried to access it in the program: @Inject private ApplicationGlobals globals; System

New BeanEditForm property block data passing

2007-10-04 Thread Robin Helgelin
Hi, I'm trying to add support for Daniel Jue's excellent SelectMultiple component as a BeanEditForm property. The only thing I need now is how to pass information from the page/component that contains the form to the property block page. Enviromental? -- regards, Robin

Re: T4.1.3: "Upgrade" from 4.1.2 problem with messages

2007-10-04 Thread Malin Ljungh
On 10/3/07, andyhot <[EMAIL PROTECTED]> wrote: > > Patrick, you've already commented on > https://issues.apache.org/jira/browse/TAPESTRY-234 > and Jesse has reopened it > > Malin, i'm wondering, what's the VM's default locale? Uhmm... how do I know? /Malin Patrick Klein wrote: > > Hello! > > >

Re: T4: Create a combo box without static binding

2007-10-04 Thread Joshua Jackson
Thanks Martino, I've updated it with: On 10/4/07, Martino Piccinato <[EMAIL PROTECTED]> wrote: > If you write > > > > ognl correctly resolve "false" as the literal "false" value in java. > > You have to write something like: > > > > and then implemente the "selected" property in your page/comp

Re: T4: Create a combo box without static binding

2007-10-04 Thread Martino Piccinato
If you write ognl correctly resolve "false" as the literal "false" value in java. You have to write something like: and then implemente the "selected" property in your page/component, e.g.: public abstract boolean getSelected(); public abstract void setSelected(boolean selected); On 10/4/

T4: Create a combo box without static binding

2007-10-04 Thread Joshua Jackson
Dear all, Today I got an error regarding binding in Tapestry 4.1.3 as such: Binding with value false (StaticBinding[false]) may not be updated. 36 37 38 39 The problem is on line 37. How do I create an unstatic binding for property selected? Why can't I hardcode this? Thanks in advance. --

Re: T5: retrieve user defined parameter at start of Tapestry

2007-10-04 Thread Christian Köberl POI
Angelo Chen wrote: > > I'm thinking of putting some parameters in web.xml and retrieve them when > the application starts, any hint how to do this? Thanks. > A.C. > Create a new Service, Inject the ApplicationGlobals and get the parameters out of the ServletContext in ApplicationGlobals. Chris

Re: T5: Mixin on Form does not work as expected

2007-10-04 Thread Nick Westgate
Looks plausible. Add it to JIRA so it doesn't get lost! Cheers, Nick. Kristian Marinkovic wrote: Hi howard, i think i was able to localize the root cause of the exception if you confirm it i'll add a JIRA ComponentPageElementImpl is responsible for calling the render phase methods of th

RE : Re: [T5] Annotations are too static

2007-10-04 Thread Julien HENRY
It's not really client-side validation. Is the onValidate called by an AJAX request? IMHO checking if a field is filled when a checkbox is checked should not require a full page refresh. --- Robin Helgelin <[EMAIL PROTECTED]> a écrit : > On 10/4/07, Julien HENRY <[EMAIL PROTECTED]> wrote: > > I

Re: T5: Domain level localization

2007-10-04 Thread Kristian Marinkovic
you could create your own ThreadLocale object that has the request object injected and contribute it to the alias service. i haven't tried it myself but it should look something like that: public static void bind(ServiceBinder binder) { binder.bind(ThreadLocale.class, DomainThrea

Re: T5: How do i reference components and pages from libraries in templates ?

2007-10-04 Thread Hugo Palma
I would prefer that to the previous virtual folder solution. This would make path resolution much simpler and get rid of all the complex path resolution stuff that would have to be done with the virtual folder solution. Howard Lewis Ship wrote: I'll try and find it later. A thought that occu

Re: T5: Domain level localization

2007-10-04 Thread Jérôme BERNARD
Maybe a servlet filter? Jérôme. On 10/4/07, Angelo Chen <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm not so sure if this Tapestry related, my T5 app can switch locales > between English and Chinese using > persistentLocaleService.set(Locale.SIMPLIFIED_CHINESE); > > Now I like the localization also

Re: [T5] Annotations are too static

2007-10-04 Thread Robin Helgelin
On 10/4/07, Julien HENRY <[EMAIL PROTECTED]> wrote: > I have a page with a big form allowing user to > create/update a card. The form has 2 submit buttons. > One for creating/updating the card as draft (only card > name input field is required), and one for validating > the card. The validation cre

RE: T5: Mixin on Form does not work as expected

2007-10-04 Thread Kristian Marinkovic
Hi howard, i think i was able to localize the root cause of the exception if you confirm it i'll add a JIRA ComponentPageElementImpl is responsible for calling the render phase methods of the components. It calls the setupRender method on the attached Mixins then the components and then the

Re: basic ASO question

2007-10-04 Thread Peter Stavrinides
In Tapestry 4 with Hivemind you could scope an ASO (session, global), which I found very useful, I have noticed in T5 ASO's are session scoped, how do you scope a service/class across all sessions in T5?, I guess just use it as static? Peter Robert A. Decker wrote: In the docs they use the e

Re: T4.1.3: "Upgrade" from 4.1.2 problem with messages

2007-10-04 Thread Patrick Klein
Hello! Thnx for the heads up, I just saw it. For the fallback issue in the translation I just added the bug https://issues.apache.org/jira/browse/TAPESTRY-1803 Regards, Patrick Patrick, you've already commented on https://issues.apache.org/jira/browse/TAPESTRY-234 and Jesse has reopened