I think there's a good sample in the Tap 5 documentation :
http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry/corelib/components/Delegate.html

Stephane

Dmitry Shyshkin a écrit :
What do you want to achieve by returning Block from onSucess event?
As you can read from http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html Block is not a valid return value for listener method.

P.S.
I think it is a typo, but you return myBlock from method as declared as _void_.

Petros Petrou пишет:
The form below works fine when the Submit button is pressed but the exception
below is thrown when the myRadioButton is selected. It looks like the
onclick="this.form.submit()" is making it fail. Any ideas how I can solve
this ?


org.apache.tapestry.runtime.ComponentEventException
Return type org.apache.tapestry.internal.structure.BlockImpl can not be
handled.
MyPage.tml
<form t:id="myForm" zone="myZone">
   ...    <t:radio t:id="myRadioButton" onclick="this.form.submit()"/>
   ...
    <input t:type="submit"/>
</form>
<t:zone t:id="myZone">
   <t:block t:id="myBlock">
        ..... some text ...
   </t:block>
</t:zone>
MyPage.java
public class MyPage
{

    @Inject
    private Block myBlock;
...
   public void onSuccessFromMyForm()
   {
      return myBlock;
       }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to