I don't think AjaxForm can do normal submits easily Perhaps it's better to use a normal Form and AjaxEventSubmit components.
See http://svn.sourceforge.net/viewcvs.cgi/tacos/trunk/demo/docroot/WEB-INF/tests/EventSubmitNormalForm.html?view=markup and notice the submitNormal parameter http://tacos.sourceforge.net/components/AjaxEventSubmit.html Slyško Pavol wrote: > Hi. > > I have the following AjaxForm in which I would like to use the Tapestry > Submit component with a listener to update my page and open a others page. > <form jwcid="[EMAIL PROTECTED]:AjaxForm"> > <input jwcid="[EMAIL PROTECTED]" value="ognl:myValue1"/> > <!-- others inputs --> > > <br/> > <input jwcid="[EMAIL PROTECTED]" value="literal:Submit" > listener="listener:openPage1"/> > <!-- others submits --> > </form> > I would like to set submited values to page properties and activate this page. > public void openPage1(IRequestCycle cycle) { > MyOther1Page myPage1 = (MyOther1Page)cycle.getPage("mytest/MyOther1"); > // init page with submited values > myPage1.setMyProperty1(getMyValue1()); > > cycle.activate(myPage1); > } > > If the Submit button is clicked first time the form is updated. But the > listener is not called becose the method AbstractSubmit.isClicked() returns > false for the Submit component. The 'mySubmit1' parameter is not in the cycle > parameters. > The cycle parameters: {submitname=, submitmode=, > service=[Ljava.lang.String;@92d6d2, processScripts=true, > component=[Ljava.lang.String;@557d7e, formids=myValue1,mySubmit1, > myValue1=value 1, page=[Ljava.lang.String;@a1e7ad, rand=723945964, > updatedirect=false, dojoRequest=true, widgetids=} > > If the Submit button is clicked second time the form is updated, the listener > is called and the others page is opened with submited value. > The cycle parameters: {submitname=, submitmode=, service=direct, > component=myForm, mySubmit1=Submit, formids=myValue1,mySubmit1, > myValue1=value 1, page=mytest/MyForm} > > If I use an AjaxSubmit component > <input jwcid="[EMAIL PROTECTED]:AjaxSubmit" value="literal:Submit" > listener="listener:openPage1"/> > the form is updated and the listener is called. But the page is opened > without initialized property (maybe page redirect). > > I found a solution in the mailing list that works on IE (not FF): > <input jwcid="[EMAIL PROTECTED]" value="literal:Submit" > listener="listener:openPage1" onClick="return postmyFormForm(this);"/> > The FF script executions error: ev.preventDefault is not a function. dojo.js > (line 3546) > The IE cycle parameters: {submitname=, submitmode=, service=direct, > component=myForm, mySubmit1=Submit, formids=myValue1,mySubmit1, > myValue1=value 1, page=mytest/MyForm} > > Can you help me? > The AjaxForm is required and I need to call different listeners to open > initialized pages. The page properties are not persitent. > > Tacos: tacos4-beta-2 > FF: 1.5 > IE: 6 > > Best regards, > Pavol > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Tacos-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/tacos-devel > > ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Tacos-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tacos-devel
