Re: T5: PrintWriter weirdness

2007-05-23 Thread Howard Lewis Ship
You can also return a StreamResponse, which is probably easier to implement that ActionResponseGenerator. On 5/22/07, Ben Sommerville [EMAIL PROTECTED] wrote: Bill, When you return void from an actionLink method the default response of tapestry is to render the page. To just return the

Re: expert needed

2007-05-23 Thread Ben Acker
Cool. I would just handle all of it within a listener method. You could use a direct link for your tabs and handle forms based upon which tab you're currently using. If the content within the tab is defined within your page anyway, you could just tack the listener method on the page and access it

RE: T5: PrintWriter weirdness

2007-05-23 Thread Ben Sommerville
Doh! I missed that. StreamResponse is much better. i.e. return new TextStreamResponse(text/plain,val); thanks Ben -Original Message- From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] Sent: Wednesday, 23 May 2007 4:20 PM To: Tapestry users Subject: Re: T5: PrintWriter

how to use more than one parameters in DirectLink

2007-05-23 Thread Heping Zhang
hi, all, I know how to use binding parameters in DirectLink if there is only one parameter. However now I want two parameters and it keeps say No listener method named 'gotoPage' suitable for no listener parameters found . I doubt I use it incorrectly. I write it this way: component

T4.1.2 and JSON

2007-05-23 Thread Denis Burlaka
Hi, All I need to implement the next logic. The form component sends AJAX JSON request to the server, server makes the list of items and returns it back as JSON object, on the client side I need to populate the table from that list. I think I must implement my own component derived from

Re: how to use more than one parameters in DirectLink

2007-05-23 Thread Andrea Chiumenti
nearly! component id=gotoPage type=DirectLink binding name=listener value=listener:gotoPage/ binding name=parameters value=ognl:{profession,address}/ /component ciao, kiuma On 5/23/07, Heping Zhang [EMAIL PROTECTED] wrote: hi, all, I know how to use binding parameters in

Re: how to use more than one parameters in DirectLink

2007-05-23 Thread Heping Zhang
Thank you!

Re: Developing Tapestry applications in IntelliJ IDEA

2007-05-23 Thread Hugo Palma
There's also great work going on here http://mevenide.codehaus.org/mevenide-idea/index.html. The site is out of date, but i've exchanged a few emails with Ralf that is developing it and i actually got it working from a svn build. It's looking good. My guess is that the JetBrains folks are

Re: how to use more than one parameters in DirectLink

2007-05-23 Thread Stephane Decleire
You should use something like this : binding name=parameters value=ognl:{profession,address}/ and since tap4, your listener could have a signature like this (with the wright types for your parameters) : public IPage gotoPage(Profession profession, Address address) Stephane Heping Zhang a

Re: T5: PrintWriter weirdness

2007-05-23 Thread Bill Holloway
Well, the value being written out contains markup that I want passed through with no changes. writer,print() and TextStreamResponse both encode the markup. writer.writeRaw(value) does it nicely. Bill On 5/23/07, Ben Sommerville [EMAIL PROTECTED] wrote: Doh! I missed that. StreamResponse is

Re: T5: PrintWriter weirdness

2007-05-23 Thread Nick Westgate
What are you losing? I'm sending back html fine with: return TextStreamResponse(text/html, html.toString()); Cheers, Nick. Bill Holloway wrote: Well, the value being written out contains markup that I want passed through with no changes. writer,print() and TextStreamResponse both encode the

Re: expert needed

2007-05-23 Thread Paul Stanton
Hmm.. I guess what I don't get is how you can submit a form from a DirectLink component. Are you saying to move my form handling to within my border component and include it/exclude it based on current page? If my tabs all call a listener method via a DirectLink the request will be made

Re: expert needed

2007-05-23 Thread Nick Westgate
Paul Stanton wrote: Hmm.. I guess what I don't get is how you can submit a form from a DirectLink component. I'm guessing you can't, unless you emulate what LinkSubmit does: http://tapestry.apache.org/tapestry4.1/components/form/linksubmit.html In my Tapestry 3 apps I actually used form

What are benefits of pure HTML templates?

2007-05-23 Thread Lobanov Igor
Dear community, Could you tell me what are benefits of using pure HTML approach to creating templates for your pages? As I understand it is one of primary selling points of Tapestry framework. However I failed to find any justification for this approach other that you can give it to your HTML

Re: What are benefits of pure HTML templates?

2007-05-23 Thread Christian Haselbach
Quoting Lobanov Igor [EMAIL PROTECTED]: Considering all of these, decision to use pure HTML templates looks like completely arbitrary and the matter of taste of Mr. Howard Lewis Ship. However I suppose I missed an important point here, so I would be very grateful if somebody shed light on this

Re: how to use more than one parameters in DirectLink

2007-05-23 Thread Heping Zhang
Thank you, I've tried and it works. It is more conveniency. Thank you all!

T5: Best practice for rendering a dynamic component

2007-05-23 Thread Joel Wiegman
Hello all, I'm interested in rendering a component template that I can selectively declare. For example, I'd like to do something like the following: MyPage.java public class MyPage { @Component private Fruit myFruit; Object onAction(String switchValue) {

cannot pass String parameters if they are not encoded with ISO8859-1

2007-05-23 Thread Heping Zhang
hi, all, I write a button and its listener is a onOk method like this: public IPage onOk() { //... resultPage.setProfession(prof); resultPage.setAddress(add); System.err.println(resultPage.getProfession()+resultPage.getAddress() +resultPage.getProfession()+resultPage.getAddress()); return

Re: How to load a image dynamiclly in tapestry5.0.4

2007-05-23 Thread Phillip C. Rhodes
Sorry, I did not see your T5 requirement. This is for T4 - Original Message - From: Allen Guo [EMAIL PROTECTED] To: Tapestry users users@tapestry.apache.org Sent: Wednesday, May 23, 2007 12:01:04 PM (GMT-0500) America/New_York Subject: Re: How to load a image dynamiclly in tapestry5.0.4

Re: T5: Best practice for rendering a dynamic component

2007-05-23 Thread Howard Lewis Ship
The Delegate component is what you need: t:delegate to=fruit/ @Component private Apple _apple; @Component private Banana _banana; public Object getFruit() { if ( ... ) return _apple; return _banana; } With Tapestry, the construction of pages is static, fixed, unchanging, much like the

Re: T5: PrintWriter weirdness

2007-05-23 Thread Bill Holloway
I was getting html tags encoded as entities. I.e., p would come back as lt;pgt;. I hadn't thought of passing the html mime type! I'll try it and report back. Bill On 5/23/07, Nick Westgate [EMAIL PROTECTED] wrote: What are you losing? I'm sending back html fine with: return

Re: T5: PrintWriter weirdness

2007-05-23 Thread Bill Holloway
Yuppers. That's working! Bill On 5/23/07, Bill Holloway [EMAIL PROTECTED] wrote: I was getting html tags encoded as entities. I.e., p would come back as lt;pgt;. I hadn't thought of passing the html mime type! I'll try it and report back. Bill On 5/23/07, Nick Westgate [EMAIL PROTECTED]

Re: expert needed

2007-05-23 Thread Ben Acker
Paul, I apologize for recommending a 'dirty' way of solving your problem! You could just create a new component based on the AbstractSubmit class or the Submit component. That way you could utilize the form submission from AbstractSubmit. In addition, the html in your tab could display this new

T4.1.2 and JSON

2007-05-23 Thread Denis Burlaka
Hi, All I need to implement the next logic. The form component sends AJAX JSON request to the server, server makes the list of items and returns it back as JSON object, on the client side I need to populate the table from that list. I think I must implement my own component derived from

RE: T5: Best practice for rendering a dynamic component

2007-05-23 Thread Joel Wiegman
Hrm... I have the code setup as listed below, but I'm getting: org.apache.tapestry.ioc.internal.util.TapestryException: Component org.foo.pages.Start does not contain an embedded component with id 'apple'. Does it expect me to have a t:apple/ tag in the page even though I'm delegating the

Re: cannot pass String parameters if they are not encoded with ISO8859-1

2007-05-23 Thread Andreas Andreou
http://confluence.atlassian.com/display/DOC/Configuring+Tomcat's+URI+encoding On 5/23/07, Heping Zhang [EMAIL PROTECTED] wrote: hi, all, I write a button and its listener is a onOk method like this: public IPage onOk() { //... resultPage.setProfession(prof); resultPage.setAddress(add);

Re: T5: Best practice for rendering a dynamic component

2007-05-23 Thread Howard Lewis Ship
Absolutely. You can put it inside a t:block to keep it from rendering normally. On 5/23/07, Joel Wiegman [EMAIL PROTECTED] wrote: Hrm... I have the code setup as listed below, but I'm getting: org.apache.tapestry.ioc.internal.util.TapestryException: Component org.foo.pages.Start does not

Re: T5: New Validators and server side validation

2007-05-23 Thread Howard Lewis Ship
I agree: - onblur vs. onform submit - option to validate via server-round trip (especially for onblur) On 5/17/07, kranga [EMAIL PROTECTED] wrote: We just introduced client side validation for Tapestry fields using an ajax call back to the server side (with Tapestry 3). So you only write Java

Re: T5: Obtain Select Component.

2007-05-23 Thread alvaro tovar
hi juan, i am new user in t5, if you can show your code? alvaro On 5/22/07, Juan Maya [EMAIL PROTECTED] wrote: So i found out that i can change the id of the component with t:id. Pretty obvious. Sorry On 5/22/07, Juan Maya [EMAIL PROTECTED] wrote: Hi all, I am creating a new component

Re: T5: Obtain Select Component.

2007-05-23 Thread Juan Maya
Sure.. in the page template i have: select t:id=month model=monthModel value=month / and in tha java file @Component (id=month) private Select monthSelect; /** * @return the monthsModel */ public SelectModel getMonthsModel() { if (this.monthsModel == null){

t5: Date input component

2007-05-23 Thread Juan Maya
Hi all, i have been trying to create a new Date component that would help to enter dates using 3 select components. It would be something like this: select id=month/select id=day/select id=year/ However i don't know how to accomplish this. I have seen that i can do it creating a

T5 preferred way to make sure response content-type is utf-8?

2007-05-23 Thread Chris Poulsen
Hi All, I have had some trouble submitting some characters that are not included in iso-8859-1. My test page has a text field and an expansion showing the value from the text field. If i enter some random characters not included in iso-8895-1 then tapestry just displays ? instead.

Re: cannot pass String parameters if they are not encoded with ISO8859-1

2007-05-23 Thread Heping Zhang
oh, you always know the solution! Thank you!

Re: expert needed

2007-05-23 Thread Paul Stanton
thanks nick. Nick Westgate wrote: Paul Stanton wrote: Hmm.. I guess what I don't get is how you can submit a form from a DirectLink component. I'm guessing you can't, unless you emulate what LinkSubmit does: http://tapestry.apache.org/tapestry4.1/components/form/linksubmit.html In my

Re: T5: Best practice for rendering a dynamic component

2007-05-23 Thread Daniel Tabuenca
What I'm trying to do is related to this. It would be very useful to be able to get components from some pool (just like pages). Then I could dynamiclally render any component dynamically on any page using the Delegator. This is useful in dynamic pages where the page structure itself is highly

Re: T5: Best practice for rendering a dynamic component

2007-05-23 Thread Howard Lewis Ship
This is very easy in Tapestry; just put the components on another page, inject the page, and choose the component from that page. This same approach is what drives BeanEditForm and Grid: the ability to choose components or blocks to render at any particular time. On 5/23/07, Daniel Tabuenca

Re: What are benefits of pure HTML templates?

2007-05-23 Thread Nick Westgate
Hi Igor. In addition to the $remove$ suggestion from Jonathan, I'd like to point out that conversion from your designer's html to a Tapestry template is much simplified when compared to JSP etc. In many cases, but not all, the result (including components) are still editable by the designer.

Re: What are benefits of pure HTML templates?

2007-05-23 Thread Igor Lobanov
Christian Haselbach wrote: First of all, why wouldn't you want to use pure HTML templates? What are the benefits of using something else or even something new? Even though I (almost) never look at the templates using a special html editor or browser, there are two advantages: 1) If your

Re: expert needed

2007-05-23 Thread Paul Stanton
Nick (or anyone), two questions: 1. If I define the form in the border component, why doesn't listener=listener:page.formSubmit work? It seems I have to define a listener in the border component that delegates to the page method? 2. How do I read the value of the 'tag' attribute of a

Re: expert needed

2007-05-23 Thread Nick Westgate
I have no T4 project to test with, but in T3 I used OGNL expressions: getPage().listeners.submitForm getPage().submitTarget Cheers, Nick. Paul Stanton wrote: Nick (or anyone), two questions: 1. If I define the form in the border component, why doesn't listener=listener:page.formSubmit work?

Re: T5 preferred way to make sure response content-type is utf-8?

2007-05-23 Thread Nick Westgate
Hi Chris. Refer to this HowTo I just threw on the wiki: http://wiki.apache.org/tapestry/Utf8EncodingInT5 ... and feel the power of tapestry-ioc! ;-) It's still just a hack, but does the job for now. Cheers, Nick. Chris Poulsen wrote: Hi All, I have had some trouble submitting some

Re: expert needed

2007-05-23 Thread Nick Westgate
Isn't this just a field of your page base class? In T4 you can inherit, which should be great. In T3 I had to add the property to each .page file. Cheers, Nick. Paul Stanton wrote: thanks, listener=ognl:page.listeners.formSubmit works. anyone know how to read the 'tag' attribute once in the

Re: expert needed

2007-05-23 Thread Paul Stanton
Thanks, I've figured it out now, hadn't read the doc on 'selected' attribute :( Nick Westgate wrote: Isn't this just a field of your page base class? In T4 you can inherit, which should be great. In T3 I had to add the property to each .page file. Cheers, Nick. Paul Stanton wrote: thanks,

T5 GenericSelectionModel implementation

2007-05-23 Thread Daniel Jue
Hello list, I have some code that I'd like to donate. I really missed the bean selection model from Tap 4.1, so I made one that works with Tap 5.0.5. I think this is what I'm going to use throughout my application. I like to let my dropdowns act as directly as possible on my pojos. That way,