Earlier versions of T5 had a subtle bug. If you used a t:submit component without an explicit component id (no t:id attribute), it would be assigned the default id "submit". On the client side, form.submit (normally a JavaScript function) would be replaced with a reference to the submit element.
Solution? Give your t:submit component an explicit id. On Thu, Apr 1, 2010 at 5:39 AM, Thiago H. de Paula Figueiredo <thiag...@gmail.com> wrote: > On Thu, 01 Apr 2010 02:25:48 -0300, LiborGMC <l.pre...@gmc.net> wrote: > >> I've tried use Opera debugger just make sure that JS code with submit form >> is called. Yes it is. > > I've tested your code in Opera 10.10 in Linux and it worked perfectly. I > just added a link to submit the: > > <a href="#" id="link" > onclick="document.getElementById('paTableForm').submit()">Submit</a> > > I haven't used JavaScript the right (using a listener instead of onclick) > way because I wanted to do a test in a short time. > > By the way, there's a LinkSubmit component in Tapestry. > >> Java page: >> @IncludeJavaScriptLibrary("context:js/index.js") >> public class Index { >> >> �...@inject >> private ComponentResources resources; >> >> �...@property >> �...@persist >> private String name; >> >> �...@property >> �...@persist >> private String result; >> >> public Object onSubmitFromPaTableForm(){ >> return getCurrentPageName(); >> } > > If you want this page to be rendered, return void or null. In you above > method, you're forcing a redirect that is not needed. > > >> @OnEvent(component="handleAction") >> public Object handleAction(){ >> System.out.println( name); >> result = name; >> return getCurrentPageName(); >> } > > This method is never invoked because there isn't a handleAction component. > Thus, the result field is never updated. > >> This code works for me on Firefox 3 and IE8. It doesn't work on Safari 4, >> Opera 9.64. > > What do you mean by this code doesn't work? > > -- > Thiago H. de Paula Figueiredo > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and > instructor > Owner, software architect and developer, Ars Machina Tecnologia da > Informação Ltda. > http://www.arsmachina.com.br > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org