You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Mindaugas Genutis <mi...@elinara.ktu.lt> on 2003/08/26 18:50:40 UTC

Form submit invoked twice?

Hello,

I have a strange behaviour in my record adding page - the record is added 
twice. I must have done something wrong with the page initialization. In 
what cases can such behaviour be expected?

My formSubmit method looks like this:

+-----------------------------------------+
    public void formSubmit(IRequestCycle requestCycle)
    {
        mUserManager.addUser(mUser);

	// Redirecting to another page.
        UsersPage usersPage = (UsersPage)requestCycle.getPage("Users");
        TableView tableView = 
(TableView)usersPage.getComponent("tableView");
        tableView.reset();

        requestCycle.activate(usersPage);
    }
+-----------------------------------------+


My form in my page.html looks like this:

+-----------------------------------------+
<form jwcid="@Form" listener="ognl:listeners.formSubmit">
  ...
         <tr>
            <td>
                Last Name
            </td>
            <td>
                <span class="input_text" jwcid="inputLastName@TextField" 
value="ognl:user.lastName"/>
            </td>
  ...
</form>
+-----------------------------------------+

Thanks,

-- 
Kaunas Regional Distance Education Center
Programmer
Phone: +370 674 05232
WWW: http://distance.ktu.lt