2009年6月9日 星期二

Tapestry: LinkSubmit problem for browsing back

The way to fix it:Copy the LinkSubmit.jwc and LinkSubmit.java file from Tapestry. Rename it and extend to LinkSubmit.java

// make sure the submit function is on the page (once)

if (cycle.getAttribute(ATTRIBUTE_FUNCTION_NAME) == null)

{

Add This =>>body.addInitializationScript("document." + formName + "._linkSubmit.value = null;");

body.addBodyScript("function submitLink(form, elementId) { form._linkSubmit.value = elementId; if (form.onsubmit == null form.onsubmit()) form.submit(); }");

cycle.setAttribute(ATTRIBUTE_FUNCTION_NAME, this);}

Please refer this to http://mail-archives.apache.org/mod_mbox/jakarta-tapestry-dev/200506.mbox/%3C594252918.1118656487914.JavaMail.jira@ajax.apache.org%3E
Posted at 5/25/2006 08:10:00 PM

沒有留言:

張貼留言