tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerry Chen <kongxingzhu...@163.com>
Subject Re: The Form Submit can't Work!
Date Mon, 01 Dec 2008 04:54:57 GMT

Thank dalahoo !

I use T5.0.16 JAR.I try your codes in my project .But I find it not to
work.I try to insert a Breakpoint in the "onSuccessFormDownloadFile()" .It
doesn't stop in the method after my clicking "Export File" Button. 

I have tried to add below code.

StreamResponse onSubmit()
{
.......
}

I find it can work.

I think I can't  make out the method invoked by "Btn_Down" or "Btn_Search"
when we use above code.Though I can add a private property to distinguish
the method invoked by which Botton in my Page,I think it is so tired to
handle the click event.

So Everyone have some suggestion to me.

Thanks!



 

dalahoo wrote:
> 
> Hi Gerry,
> 
> Try to change you method name to : onSuccessFormDownloadFile
> 
> or use Annotation  :
> 
> @OnEvent(value = "submit", component = "Btn_Down")
> StreamResponse onSubmitFormDownloadFile() {
> ....
> 
> 
> 
> 
> 
> On Mon, Dec 1, 2008 at 2:55 AM, Gerry Chen <kongxingzhu001@163.com> wrote:
> 
>>
>> Hi Everyone:
>>
>>   I'm a new Tapestry user. I'm interesting in developing Web Program with
>> Tapestry Framwork.But I have some problem in my project.
>>  This question is the Form Submit Event can't be invoked When I click
>> "Export File" Button in my Page.
>>
>>  My Program looks like this:
>>
>>  SearchGoodsInfo.tml
>>
>>  This tml file hava tow Forms.
>>
>>  <t:Form id="queryForm">
>>         <input type="submit" t:type="submit" t:Id="Btn_Search"
>> t:value="Find" class="button_bg"/>
>>  </t:Form>
>>
>>  <t:Form t:id="DownloadFile">
>>                <input type="submit" t:type="submit" t:Id = "Btn_Down"
>> t:value="Export File" class="button_bg"/>
>>  </t:Form>
>>
>>   SearchGoodsInfo.java
>>
>>   The Event handler in java file like this:
>>
>>   StreamResponse onSubmitFormDownloadFile()
>>  {
>>
>>    ........
>>    StreamResponse responseDown = new XlsFileAttachmet(insFile);
>>    return responseDown;
>>
>>  }
>>
>>  The Extension .java file only have a form submit Event with "Export
>> File"
>> Button.I use below code to handle another button. That is working finely.
>>
>>   @OnEvent(value="selected",component = "Btn_Submit")
>>   public void onSearch()
>>  {
>>    .........
>>  }
>>
>>
>>  But the onSubmitFormDownloadFile method can not work!How can I catch the
>> "DownloadFile" form submit event.
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/The-Form-Submit-can%27t-Work%21-tp20765310p20765310.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 
> 
> -- 
> sincerely yours
> M. H. Shamsi
> 
> 

-- 
View this message in context: http://www.nabble.com/The-Form-Submit-can%27t-Work%21-tp20765310p20766130.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Mime
View raw message