Re: Easy Way to create a select model?

2010-01-29 Thread Andrew Court
Hi Andy, I find the easiest way to populate a select list is just to pass it a Map of values. Something like the following: public Map getMonthsModel() { Map model = new LinkedHashMap(); model.put(1, "Jan");

Re: Tapestry Resources and Velocity Templates

2009-11-16 Thread Andrew Court
Look at setting the file.resource.loader.path property http://static.springsource.org/spring/docs/2.5.6/reference/view.html#view-velocity-advancedconfig http://static.springsource.org/spring/docs/2.5.6/reference/view.html#view-velocity-advancedconfig Andrew Jonhy Pear wrote: > > Hi! > > I

Re: t5: how to use Blackbird?

2009-06-22 Thread Andrew Court
Blackbird use is in the documentation http://tapestry.apache.org/tapestry5.1/guide/ajax.html under Client-side Logging Angelo Chen wrote: > > Hi, > > cool, this works, is there a way to turn this off in the production mode? > otherwise we have to remove those Logging.info("you are impossible

Re: Access unique clientId in AjaxFormLoop iteration

2009-05-02 Thread Andrew Court
Anybody? What I'm looking for is the equivalent of the "index" parameter of the loop component. How can this be done with AjaxFormLoop? Andrew Andrew Court wrote: > > Each new iteration of AjaxFormLoop generated by an addRowLink event > appends a unique ident

Re: t5: appending a query string to a page name?

2009-05-02 Thread Andrew Court
In order to do what you ask I believe you have to manually pull the querystring parameters out of the request: mysearch/results?country=US&state=NY @Inject private RequestGlobals requestGlobals; void onActivate() { Request req = requestGlobals.getRequest(); String country = re

Access unique clientId in AjaxFormLoop iteration

2009-04-29 Thread Andrew Court
Each new iteration of AjaxFormLoop generated by an addRowLink event appends a unique identifier to the clientId of elements in the form of -120f481f67e Is it possible to access this value directly in order to pass it as a parameter in onclick events for example? Something like: such that aft

Re: problems when using FormFragment in a loop

2009-04-28 Thread Andrew Court
Did anyone find a resolution (or file a JIRA) for this issue? I'm encountering exactly the same problem with formFragments in a loop. Only the final loop iteration is updated on form submit and all the rest ignored. Seems like a really fundamental problem with the formFragment component and ha

Re: [REQUEST] Live T5 web sites, quotes, marketting

2009-04-26 Thread Andrew Court
https://reservations.guestlogic.com/book?id=nz1 Although a work in progress, this site demonstrates the flexiblity of T5 to integrate with other technologies. It's a hotel booking system that combines T5, DWR, Spring and Velocity. With T5 it all just slots together. No fuss, no bother. A

Re: Hidden field encoder problem

2009-04-06 Thread Andrew Court
just something i'm overlooking? Andrew Robert Zeigler wrote: > > There's a fundamental difference between text field and hidden field: > one is intended for direct user-input data, and the other is not. > Hence, the use of translator vs. encoder. > > Robert >

Hidden field encoder problem

2009-04-06 Thread Andrew Court
I'm seeing an issue with the new Hidden field component in 5.1.0.2. I've written a ValueEncoder to translate between string and java.sql.Date, but this throws a class cast exception when used as the encoder parameter for the hidden field. If I use a regular TextField component and use a ValueTra

Re: Return page from ajax request

2008-08-24 Thread Andrew Court
onentPageElementImpl$15.handleResult(ComponentPageElementImpl.java:1008) > at > org.apache.tapestry5.internal.services.EventImpl.storeResult(EventImpl.java:67) > > > Thanks, > Markus > > > > On Sun, Apr 27, 2008 at 11:06 PM, Andrew Court <[EMAIL PROTECT

Custom translator broken in 5.0.14

2008-08-12 Thread Andrew Court
Hi, I've just upgraded to 5.0.14 and encountered an exception with a previously working java.sql.Date translator bound to a textfield. Exception reads: Could not convert 'sqlDateTranslator' into a component parameter binding: Unknown translator type 'sqlDateTranslator'. Configured translators a

Return page from ajax request

2008-04-27 Thread Andrew Court
Hi all, In T5, from an Ajax request, is it possible to redirect to a different page? What I'm trying to do is something like below: Object onSomeAjaxRequest(){ if(some condition){ exit xhttp and jump to a different page } else{ return xhttp response to same page } } But this doesn't

T5: Return javascript in zone markup

2008-04-12 Thread Andrew Court
Hi all, I don't know if this functionality has been built into the zone component yet (using 5.0.11 release), but what I'm trying to do is return additional javascript along with html markup in an ajax response. Is this possible, and if so how would one go about doing it? And while I'm here, I'v