You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by mu...@apache.org on 2007/06/10 01:16:42 UTC

svn commit: r545811 - /struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/remoteforms/index.jsp

Author: musachy
Date: Sat Jun  9 16:16:42 2007
New Revision: 545811

URL: http://svn.apache.org/viewvc?view=rev&rev=545811
Log:
Add examples to remote forms

Modified:
    struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/remoteforms/index.jsp

Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/remoteforms/index.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/remoteforms/index.jsp?view=diff&rev=545811&r1=545810&r2=545811
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/remoteforms/index.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/remoteforms/index.jsp Sat Jun  9 16:16:42 2007
@@ -64,7 +64,7 @@
 </s:form>
 
 <br /><br />
-Remote form whose submit is cancelled:<br/>
+Submit outside form:<br/>
 <s:form
         id='theForm5'
         cssStyle="border: 1px solid green;"
@@ -72,15 +72,39 @@
         method='post'>
 
     <input type='text' name='data' value='Struts User'>
+</s:form>
+<sx:submit value="GO5" formId="theForm5" targets="two"/>
 
-    <sx:submit value="GO5" targets="theForm5" beforeNotifyTopics="/beforeSubmit"/>
+<br /><br />
+<s:url id="remoteUrl" namespace="/remoteforms" action="AjaxRemoteForm"/>
+Submit outside form, href in submit tag:<br/>
+<s:form
+        id='theForm6'
+        cssStyle="border: 1px solid green;"
+        method='post'>
 
+    <input type='text' name='data' value='Struts User'>
 </s:form>
+<sx:submit value="GO6" formId="theForm6" targets="two" href="%{#remoteUrl}"/>
 
 <br /><br />
-A form with no remote submit (so should not be ajaxified):<br/>
+Remote form whose submit is cancelled:<br/>
 <s:form
         id='theForm7'
+        cssStyle="border: 1px solid green;"
+        action='AjaxRemoteForm'
+        method='post'>
+
+    <input type='text' name='data' value='Struts User'>
+
+    <sx:submit value="GO7" targets="theForm7" beforeNotifyTopics="/beforeSubmit"/>
+
+</s:form>
+
+<br /><br />
+A form with no remote submit (so should not be ajaxified):<br/>
+<s:form
+        id='theForm8'
         cssStyle="border: 1px solid green;"
         action='AjaxRemoteForm'
         method='post'>