The document element allows you to load an application document (Microsoft Word, Microsoft Excel, PDF, and so on) into an application.
When you create document elements:
Applications built with the document element may require that the Web browser plug-in for the application in which the document was authored be installed on the machine from which the user is browsing before they can view the application’s content. For example, to view an application with PDF content, the Adobe Acrobat Reader plug-in for your Web browser must be installed on the machine from which you are browsing. Refer to your Web browser’s Internet site for more information.
If you upload a document with the same name as a previously uploaded document, the second document overwrites the first, unless you create a subdirectory below the upload directory and upload the second document to the subdirectory.
Document elements must be saved with the IFRAME attribute.
You can use only the default template except for the content types text/HTML and text/plain.
You cannot import or export a document application across servers.
You can create a document application with a new content type that is not included in the drop-down menu if there is an application that supports the plug-in.
You must set the content type of document element applications to the correct type.
Applications that use the document element (except for the content types text/HTML and text/plain) can contain only one element.
Creating a document element
Log in to Mobile Web Studio, select Build | Applications, right-click in the detail view, and select New Aggregated Application.
In the Application Builder, click the down arrow beside the Add button and select Document Element.
In the Document Element Definition window, complete these fields:
Document to Upload – enter the full path to the document you want to upload, or click Browse to search for and select the document.
Destination Location – accept the default folder name or append the default name with an additional folder name. Enter only the folder name; that is, do not enter the complete path. This is the location to which the document is uploaded.
You can configure the default upload folder name in global.properties.xml.
See the Unwired Accelerator Administration Guide.
The parent location of the document root folder must have “write” permissions.
Mobile Web Studio creates a document root level directory on the drive of your UA installation and uses the current user’s login name as the default folder. For example, if the default for the Destination Location displays “Smith”, and the UA installation drive is D:\, the uploaded document is saved to D:\tmp\PortletDocs\Smith.
To create a different folder using this structure, enter another file name after the name that displays in the Destination Location field. For example, if the field displays “Smith” and you enter “\Smith,” the file is uploaded to D:\tmp\PortletDocs\Smith\Smith.
Document Name – this is automatically filled in when you click Upload.
Content Type – select the content type of the document, for example, “application/msword.
If you do not see the content type you want, select Add New from the drop-down list to add a new content type.
New Content Type – displays only when you select Add New from the Content Type drop-down list. Enter the new type in this format:
[application | image | text]/plug-in
name
There must be an application and the plug-in installed
for the content type specified. See “Adding new content types”.
Click Upload. When a message displays confirming that the upload was successful, click OK.
The length of time before the confirmation message
displays depends on the document’s size.
Click Next.
In the Finish window, in Element Name, enter a name for the element and click Finish.
In the Application Builder, click Save. See “Saving applications”.