234 IBM Workplace Forms: Guide to Building and Integrating a Sample Workplace Forms Application
<jsp:include page='<%=formText%>'/>
-->
</SCRIPT>
<p><br>
<jsp:setProperty name="RedPaperC2A" property="formText" value='test' />
<% } else { %> <%--Here is the else in case No form is selected yet--%>
Please select a form to be displayed in the Select form portlet <%}%>
6.4 Parking the Workplace Forms Viewer in the Portal
Embedding an XFDL form in an HTML page allows users to view forms inside the portal
environment. Furthermore, it allows application designers to manipulate the embedded form
like any other HTML object. Unlike other embedded objects, such as HTML or XML forms,
embedded XFDL forms maintain user data even after the Web page is changed or refreshed.
To embed a form, you must use two HTML elements:
objects — An object allows you to display non-HTML data in the browser. It also allows
you to define the size and borders of an object.
scripts — The script contains and loads the form.You can also use other scripts to contain
data that is used to modify the form, such as XML instances.
The HTML
object is a placeholder. It specifies the location where the object will be displayed
in relation to the other elements on the Web page.
The
script element is not displayed as part of the Web page, so it can be placed anywhere in
your HTML code.
Tip: The only piece of code required to display the IBM Workplace Forms viewer in a
portlet is the following which you can add to any JSP. This is a simpler method of showing
this integration.
<OBJECT id="Object1" height=640 width=700 border="0"
classid="CLSID:354913B2-7190-49C0-944B-1507C9125367">
<PARAM NAME="XFDLID" VALUE="XFDLData">
<PARAM NAME="refresh_url" VALUE="envAware.html">
<PARAM NAME="TTL" VALUE="17">
<PARAM NAME="retain_Viewer" VALUE="off">
</OBJECT>
<SCRIPT language="XFDL" id="XFDLData"
type="application/vnd.xfdl; wrapped=comment">
<!--
<jsp:include page='<%=formText%>'/>
-->
</SCRIPT>