X-Application 4.1.1 for environments without JavaScript

Hi,

Tamino X-Application uses JavaScript for actions like submitting the content of forms to the server and committing changes. In some environments JavaScript is disabled by default i.e. X-Application applications do not work as expected. Attached you find a workaround for building an X-Application application without JavaScript code, i.e. browsers without JavaScript will be able to use such an X-Application.

Prerequisites:
The context parameter

coded</pre> in <pre class="ip-ubbcode-code-pre">web.xml</pre> has to be set to true<BR><BR><B>Building Instructions:</B><BR><BR><UL TYPE=SQUARE><BR><LI>Replace the file <pre class="ip-ubbcode-code-pre">src/com/softwareag/xtools/xapplication/jsp/JspTag.java</pre><BR>with the attached file.<BR><LI>Do a <pre class="ip-ubbcode-code-pre">build quick</pre><BR><LI>Copy the resulting X-Application jar file <pre class="ip-ubbcode-code-pre">lib/debug/xapplication.jar</pre><BR>to your webapplication's <pre class="ip-ubbcode-code-pre">lib directory</pre>.<BR></UL><BR><BR><B>CODING Instructions</B><BR><BR>In each form that is associated with an X-Application action<BR>(like commit, abandon,...) include the following input tag:<BR><BR><pre class="ip-ubbcode-code-pre"><input type="hidden" name=":coded" value=""/></pre><BR><BR>When the servlet engine executes the page the appropriate :coded value is<BR>inserted into the hidden input field instead of JavaScript code.<BR><BR>The following example demonstrates how commit / abandon actions<BR>are implemented in the <A HREF="http://tamino.demozone.softwareag.com/demoXmlSecurity/XmlSignatureDemo/index.jsp" TARGET=_blank>Xml Signature Demo</A> without using JavaScript:<BR><BR><pre class="ip-ubbcode-code-pre">
<!-- START X-Application commit action -->
<form name="modify" method="post" action="<c:url value='/customer/display.jsp'/>">
<xapp:action type="commit"><input type="hidden" name=":coded" value=""/></xapp:action>

.... here comes the form (content of XML document) .....

</form>
<!-- END X-Application commit action -->



<!-- START X-Application abandon action -->
<form action="<c:url value='/customer/index.jsp'/>" method="post">
<xapp:action type="abandon"><input type="hidden" name=":coded" value=""/></xapp:action>&nbsp;&nbsp;&nbsp;
<input type="submit" value="Abort" title="do NOT store document"/></form>
<!-- END X-Application abandon action -->



Best regards,


Jan Harmsen
Software Engineer
Software AG
JspTag.java (23.6 KB)

Hello,

thanks for this contribution. If there are no arguments against the solution Jan introduced, we will take over the code and make this solution available for a next version of X-Application.

Please give me feedback to this topic if anyone knows any reason why we should NOT adopt Jan’s idea.

Many thanks.

Bye,
Christian.