T5: Submit Button in Custom Component, Form in Page

2009-11-26 Thread CarmenG
I have a page with a form, nested within the form is a custom component with a select box and a submit button. When the submit button is clicked I want to download either a PDF or Excel file based on the value of the select box. I know the event for the submit button cannot return a value and I

Re: T5: Submit Button in Custom Component, Form in Page

2009-11-26 Thread Ulrich Stärk
If you use the submit component, it will fire a selected event. By handling that, you can detect which button was clicked and act accordingly. HTH, Uli Am 26.11.2009 23:12 schrieb CarmenG: I have a page with a form, nested within the form is a custom component with a select box and a submit

Re: T5: Submit Button in Custom Component, Form in Page

2009-11-26 Thread CarmenG
Sorry Uli that doesn't help me as the onSelected event cannot return a value, the download file in my case. Can you elobarate a bit more? What I have read so far have only been examples of Forms and Submit components on the same page/component where you would have private String type;

Re: T5: Submit Button in Custom Component, Form in Page

2009-11-26 Thread Thiago H. de Paula Figueiredo
Em Thu, 26 Nov 2009 20:41:59 -0200, CarmenG car...@synect.com escreveu: Sorry Uli that doesn't help me as the onSelected event cannot return a value, the download file in my case. Can you elobarate a bit more? onSelect() cannot, but onSuccess() can return a StreamResponse containing your

Re: T5: Submit Button in Custom Component, Form in Page

2009-11-26 Thread Ulrich Stärk
Events are passed up the component hierarchy until handled, so just handle the selected event in your page class. Alternatively have your special component fire its own event (use ComponentResources for that) based on what button was clicked and handle that. That's probably the cleaner way to

T5:Submit component

2008-10-21 Thread James Sherwood
Hello, I am playing around with T5 and I have a submit inside of a form component like this: TML: input type=submit t:type=submit t:id=submitButton value=Submit/ Java: @OnEvent(component = submitButton) void onSubmitButton() { System.out.println(Submit button was

Re: T5:Submit component

2008-10-21 Thread Thiago H. de Paula Figueiredo
Em Tue, 21 Oct 2008 14:38:41 -0300, James Sherwood [EMAIL PROTECTED] escreveu: @OnEvent(component = submitButton) void onSubmitButton() { System.out.println(Submit button was pressed!); } } The Submit components fires the selected event, not the submit event. So

[T5] Submit does not fire selected event when using disabled property

2008-09-27 Thread Harald Geritzer
hi all, im am having some sort of wizard with previous and next submits, which i want to disable depending on the actual step. the strange thing is, if one of the submits has the property disabled set to false it submits the form but does not fire the selected event. anybody else discovered

Re: [T5] Submit does not fire selected event when using disabled property

2008-09-27 Thread Ulrich Stärk
Works fine here. 2 submit components, one with disabled=true, the other with disabled=false, and the select event from the submit component with disabled=false gets fired just as expected. Maybe you could show us some code so we can try to figure out what's wrong with it. Uli Harald Geritzer

Re: [T5] Submit does not fire selected event when using disabled property

2008-09-27 Thread Harald Geritzer
sorry, seems to be my fault. i just did not know that first the form submission is processed and afterwards setupRender ist called. i had some intializing logic in my setupRender function which is needed for calculating the submit's disabled state. harald

RE: T5: Submit Event Handlers

2008-01-29 Thread Adam Ayres
/releases/5.0.9/tape stry-core/src/main/java/org/apache/tapestry/corelib/components/Submit.ja va?view=markup Thanks, Adam -Original Message- From: Mark W. Shead [mailto:[EMAIL PROTECTED] Sent: Monday, January 28, 2008 10:15 PM To: users@tapestry.apache.org Subject: T5: Submit Event

T5: Submit Event Handlers

2008-01-28 Thread Mark W. Shead
I am having problems getting an event handler to fire for a submit button. Here is the relevant part from the .tml form t:type=form t:id=myForm input type=submit value=Submit t:type=submit t:id=submitButton/ /form and here is the handler from the .java file:

[T5] Submit control event handler cannot redirect?

2007-08-08 Thread Kolesnikov, Alexander GNI
I am playing with a simple T5 application that has two pages: Start and Another. The Start page contains the following: p a href=# t:type=ActionLink t:id=actionRedirectDisplay Another page/a /p t:form t:id=theForm input type=submit value=Submit/ t:submit

Re: [T5] Submit control event handler cannot redirect?

2007-08-08 Thread Denny
The error message is clear. This type of event does not support return values from event handler methods. Please take a look at http://wiki.apache.org/tapestry/Tapestry5HowToUseForms Dealing with multiple submits Capter. On 8/8/07, Kolesnikov, Alexander GNI [EMAIL PROTECTED] wrote: I am

RE: [T5] Submit control event handler cannot redirect?

2007-08-08 Thread Kolesnikov, Alexander GNI
'select' event? What exactly we are selecting when pressing a Submit button? Why its event is not 'action'? -Original Message- From: Denny [mailto:[EMAIL PROTECTED] Sent: 08 August 2007 10:06 To: Tapestry users Subject: Re: [T5] Submit control event handler cannot redirect? The error

RE: [T5] Submit control event handler cannot redirect?

2007-08-08 Thread Kolesnikov, Alexander GNI
Thank you very much, Nick! -Original Message- From: Nick Westgate [mailto:[EMAIL PROTECTED] Sent: 08 August 2007 10:21 To: Tapestry users Subject: Re: [T5] Submit control event handler cannot redirect? Think of it this way: the answer is no if you supply t:defer=false, because

Re: [T5] Submit control event handler cannot redirect?

2007-08-08 Thread Nick Westgate
The natural flow of form submission is to update internal state with posted values from the form and then render the result page. Whether that is the same page (which is often the case) or not is usually decided at the end of the form processing. So the select events simply notify us of which

RE: [T5] Submit control event handler cannot redirect?

2007-08-08 Thread Kolesnikov, Alexander GNI
I see, Nick. Things are much simpler with ActionLink because it isn't a form component. Thanks a lot! Alex -Original Message- From: Nick Westgate [mailto:[EMAIL PROTECTED] Sent: 08 August 2007 10:44 To: Tapestry users Subject: Re: [T5] Submit control event handler cannot redirect

Re: [T5] Submit component doesn't render the label?

2007-06-22 Thread Dan Adams
okay, i'll do that. Just thought it was a little weird that the component accepted a formal parameter that is never used. On Thu, 2007-06-21 at 07:35 -0700, Howard Lewis Ship wrote: I suppose it could; I've been trying to minimize what T5 does in this area, i.e., ou should bind the (informal)

Re: [T5] Submit component doesn't render the label?

2007-06-22 Thread Howard Lewis Ship
The label parameter is implicit in thethe Field interface, you could also put a label on a Submit (not sure why). It's possible that Submit should not be a Field, but simply be Field-like. On 6/22/07, Dan Adams [EMAIL PROTECTED] wrote: okay, i'll do that. Just thought it was a little weird

[T5] Submit component doesn't render the label?

2007-06-21 Thread Dan Adams
I have the following: t:submit t:id=formSubmit class=button label=prop:buttonLabel / which results in: input class=button id=formSubmit name=formSubmit type=submit The component has this which looks like it never uses the label parameter: void beginRender(MarkupWriter writer) {

Re: [T5] Submit component doesn't render the label?

2007-06-21 Thread Howard Lewis Ship
I suppose it could; I've been trying to minimize what T5 does in this area, i.e., ou should bind the (informal) value parameter (which is what is used as the label). On 6/21/07, Dan Adams [EMAIL PROTECTED] wrote: I have the following: t:submit t:id=formSubmit class=button

Re: T5 submit

2007-03-19 Thread Anjana Gopinath
Pablo, Thanks a lot for helping me. I tried the options you suggested. It looks like OnEvent(value=selected, ---) doesnt take a return type. i get the exception given below. Event 'selected' from com.truenorth.quote.pages.AddService:addapps received an event handler method return value

Re: T5 submit

2007-03-19 Thread Howard Lewis Ship
onSelectFromLogin() { ... } onSelectFromHelp() { ... } Store a value in these event handler methods. Return that value from onSubmitFromForm(). Submit components should be related to the Form and the data editted by the Form, so they are not allowed to abort the processing of the Form early.

Re: T5 submit

2007-03-19 Thread Anjana Gopinath
Thanks a lot for helping me out, howard. It works now. Anjana Gopinath True North Technology 11465 John's Creek Parkway, Suite 300 Duluth, GA 30079 [EMAIL PROTECTED] On Mar 19, 2007, at 10:22 AM, Howard Lewis Ship wrote: onSelectFromLogin() { ... } onSelectFromHelp() { ... } Store a

T5 submit

2007-03-16 Thread Anjana Gopinath
Hi How to specify a listener method in T5? I have a page with multiple submit buttons and need to navigate to a different page when the user clicks on a particular button. i tried doing this @OnEvent(component = deleteApp) String deleteApp() {

Re: T5 submit

2007-03-16 Thread Pablo Ruggia
You have two choices: 1) Using naming convention: public String onSubmitFromMyForm(){ return AnotherPage; } Where Submit is the event name and MyForm is the component id. 2) Using annotations: @OnEvent(value=SUBMIT, component=myForm) public String onSubmitFromMyForm(){

Re: T5 submit

2007-03-16 Thread Peter Beshai
Note that you have more values to choose from than simply SUBMIT (note, you can use the value submit -- case insensitivity). You may be interested in only having your method called if the form submits successfully, in which case you would use the value success. You can view the list of event

Re: T5 submit

2007-03-16 Thread Anjana Gopinath
Thanks Peter and Pablo I tried giving both options suggested by Pablo input t:type=Submit value=Select applications t:id=addApps / @OnEvent(value = submit,component=addApps) void addApps(){ System.out.println(---here ); // return

Re: T5 submit

2007-03-16 Thread Pablo Ruggia
Can you send us your page template and class ? On 3/16/07, Anjana Gopinath [EMAIL PROTECTED] wrote: Thanks Peter and Pablo I tried giving both options suggested by Pablo input t:type=Submit value=Select applications t:id=addApps / @OnEvent(value = submit,component=addApps)

Re: T5 submit

2007-03-16 Thread Anjana Gopinath
Pabloi have attached  a simple html and page class.Thanks a lot for looking into this. AddService.java Description: Binary data Anjana GopinathTrue North Technology11465 John's Creek Parkway, Suite 300Duluth, GA 30079[EMAIL PROTECTED] On Mar 16, 2007, at 4:01 PM, Pablo Ruggia

Re: T5 submit

2007-03-16 Thread Pablo Ruggia
The Form fire this this events: submit, success, prepare, validate and failure. The Submit component only fires selected event. So, if you use the form component, you have to use submit or success events. If you are listening to the button, then use selected event. So you have to put something