View comments | RSS feed
Package com.adobe.livecycle.formsservice.client
Classpublic class FormsResult
InheritanceFormsResult Inheritance Object

Provides access to the Forms service processing results, such as the data content, the transformation result, and the content type. For example, in order to display a form in a client web browser, you write the data stream obtained using this object to a client web browser. To obtain a data stream, invoke the getOutputContent method. A FormsResult object is returned by the following FormsServiceClient methods:



Public Methods
 MethodDefined by
  
This constructor is for internal use only.
FormsResult
  
FormsResult(short action, String options, String tratransformationID, String formQuery, long pageNumber, long pageCount, List attachments, Document validationErrorsList, String clickedBtn, Document xMLData)
This constructor is for internal use only.
FormsResult
  
short getAction()
Indicates the processing state associated with the Forms service result.
FormsResult
  
Retrieves the attachments.
FormsResult
  
String getCharSet()
Returns the character set encoding value; for example, ISO-8859-1, UTF-8, SHIFT_JIS.
FormsResult
  
String getClickedBtn()
Returns an XML Architecture Scripting Object Model (SOM) expression identifying the last button that was clicked on a form.
FormsResult
  
Returns the content type that describes the data content generated by the Forms service.
FormsResult
  
String getFormQuery()
Retrieves the form query.
FormsResult
  
String getLocale()
Gets a locale value that is used by the Forms service to send validation messsages to client devices, such as web browsers, as part of HTML transformations.
FormsResult
  
String getOption(String opt)
Retrieves the specified option.
FormsResult
  
String getOptions()
Retrieves the options.
FormsResult
  
Returns data content generated by the Forms service.
FormsResult
  
If the content type is text-based, this method returns the data content that is generated by the Forms service as a string; otherwise, it returns an empty string (binary content is accessible using the getOutputContent method).
FormsResult
  
Returns the output type value that specifies how a form that is rendered as HTML is displayed.
FormsResult
  
If the content type contains XML or HTML data, the transformation result is stored as well-formed XML, which can be retrieved as this string.
FormsResult
  
Retrieves the page count.
FormsResult
  
Retrieves the page number.
FormsResult
  
Although a client application indicates an output format preference, this value represents the actual transformation performed.
FormsResult
  
Gets a list of validation errors as UTF8-encoded XML.
FormsResult
  
Retrieves the XML data.
FormsResult
  
void setCharSet(String charSet)
For internal use only.
FormsResult
  
void setContentType(String contentType)
For internal use only.
FormsResult
  
void setOutputContent(Document contentDoc, String sContentType)
Sets the output content.
FormsResult
  
void setOutputXML(Document outputXML)
Sets the output XML.
FormsResult
  
void setTransformationID(String transformationID)
For internal use only.
FormsResult
Constructor Detail
FormsResult()
public FormsResult()

This constructor is for internal use only. Use the return value from the specified methods.

FormsResult() 
public FormsResult(short action, String options, String tratransformationID, String formQuery, long pageNumber, long pageCount, List attachments, Document validationErrorsList, String clickedBtn, Document xMLData)

This constructor is for internal use only. Use the return value from the specified methods.

Parameters
action
 
options
 
tratransformationID
 
formQuery
 
pageNumber
 
pageCount
 
attachments
 
validationErrorsList
 
clickedBtn
 
xMLData
Method Detail
getAction()
public short getAction()

Indicates the processing state associated with the Forms service result. Client applications can query this value to determine whether interaction between the Forms service and web browser is complete. The value 0 (Submit) indicates that validated XML data is available. In this situation, interaction is complete. However, if the value is 1 (Calculate), the data content contains calculation results that must be returned to the web browser so that the user can view the results. These values are valid:

Returns
A short value that specifies the processing state associated with the Forms service.
getAttachments() 
public List getAttachments()

Retrieves the attachments.

Returns
The attachments.
getCharSet() 
public String getCharSet()

Returns the character set encoding value; for example, ISO-8859-1, UTF-8, SHIFT_JIS. You can set the character set encoding value by invoking the RenderOptionsSpec object's setCharset method.

Returns
The character set encoding value.

See also

getClickedBtn() 
public String getClickedBtn()

Returns an XML Architecture Scripting Object Model (SOM) expression identifying the last button that was clicked on a form. A SOM expression references objects, properties, and methods within a particular Document Object Model (DOM). The following example is a SOM expression: Untitled[0].main[0].ButtonHello[0]

where Untitled and main represent the form's XML hierarchy. The name of the button on the form is ButtonHello. For information about the XML Architecture, go to http://partners.adobe.com/asn/tech/pdf/xmlformspec.jsp.

Returns
A SOM expression identifying the last button that was clicked on a form.
getContentType() 
public String getContentType()

Returns the content type that describes the data content generated by the Forms service. These values are valid:

If the content type is text/html, the character set value is appended; for example, text/html; charset="ISO-8859-1".

Returns
A string value that specifies the content type.
getFormQuery() 
public String getFormQuery()

Retrieves the form query.

Returns
The form query.
getLocale() 
public String getLocale()

Gets a locale value that is used by the Forms service to send validation messsages to client devices, such as web browsers, as part of HTML transformations.

Returns
The currently used locale value.
getOption() 
public String getOption(String opt)

Retrieves the specified option.

Parameters

opt

Returns
getOptions() 
public String getOptions()

Retrieves the options.

Returns
The options.
getOutputContent() 
public Document getOutputContent()

Returns data content generated by the Forms service. Depending on the action value, the content may be sent back to the originating client device (such as a web browser) or may be available for further processing by the client application. For information about using this method to render a form or handle a submitted form, see Rendering Forms.

Returns
A com.adobe.idp.Document object representing the data content generated by the Forms service. The content format may contain XML, HTML, or PDF data.

Throws
UnsupportedEncodingException

See also

getOutputString() 
public String getOutputString()

If the content type is text-based, this method returns the data content that is generated by the Forms service as a string; otherwise, it returns an empty string (binary content is accessible using the getOutputContent method).

Returns
A string that represents the data content that is generated by the Forms service.

See also

getOutputType() 
public int getOutputType()

Returns the output type value that specifies how a form that is rendered as HTML is displayed. The following values are valid:

Returns
Returns the output type value that is used by the Forms service.
getOutputXML() 
public Document getOutputXML()

If the content type contains XML or HTML data, the transformation result is stored as well-formed XML, which can be retrieved as this string. The XML data can be parsed, modified, and placed into an IOutputContext interface, which updates its state to reflect changes. The setOutputXML method is used for this purpose.

Returns
A well-formed XML string that represents the content that is generated by the Forms services.

See also

getPageCount() 
public long getPageCount()

Retrieves the page count.

Returns
The page count.
getPageNumber() 
public long getPageNumber()

Retrieves the page number.

Returns
The page number.
getTransformationID() 
public String getTransformationID()

Although a client application indicates an output format preference, this value represents the actual transformation performed. In most cases, these values match but not always.

Returns
A string value that specifies the transformation identifier.
getValidationErrorsList() 
public Document getValidationErrorsList()

Gets a list of validation errors as UTF8-encoded XML. This is useful for client applications that want to access errors directly after the call but before any content is returned. The following is valid format:

 <validationerrors>
 <!-- page level errors -->
 <pages />
 <!-- field level errors -->
 <fields>
   <field>
   <name>rootsubform[1].FFField1[1]</name>
   <message>Mandatory Field</message>
  </field>
 </fields>
</validationerrors>

Returns
A com.adobe.idp.Document object containing UTF8 encoded XML data.
getXMLData() 
public Document getXMLData()

Retrieves the XML data.

Returns
The XML data.
setCharSet() 
public void setCharSet(String charSet)

For internal use only. Do not use

Parameters

charSet

setContentType() 
public void setContentType(String contentType)

For internal use only. Do not use

Parameters

contentType

setOutputContent() 
public void setOutputContent(Document contentDoc, String sContentType)

Sets the output content.

Parameters

contentDoc — The output content.
 
sContentType — The content type.

setOutputXML() 
public void setOutputXML(Document outputXML)

Sets the output XML.

Parameters

outputXML — The output XML.

setTransformationID() 
public void setTransformationID(String transformationID)

For internal use only. Do not use

Parameters

transformationID





Comments


GS_Enterprise said on Feb 8, 2008 at 8:30 AM :
The XML returned by getValidationErrorsList seems to be different from the sample in the documentation.
I'm getting a far shorter XML, like:
<?xml version="1.0" encoding="UTF-8"?>
<validationErrors>
<m d="2008-02-08T17:21:21.031+01:00" ref="xfa[0].form[0].form1[0].#subform[0].intMinVenti[0]" sev="ve" tid="1440.148"/>
</validationErrors>
GS_Enterprise said on Feb 11, 2008 at 9:07 AM :
A minor followup to my own post. If a field actually includes a validation error message, then you'd get something like <m d="2008-02-11T17:46:31.363+01:00" ref="xfa[0].form[0].form1[0].#subform[0].intMinVenti[0]" sev="ve" tid="4636.5304">The value must be less than 20</m> rather than just <m d="2008-02-08T17:21:21.031+01:00" ref="xfa[0].form[0].form1[0].#subform[0].intMinVenti[0]" sev="ve" tid="1440.148"/>

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/javadoc/com/adobe/livecycle/formsservice/client/FormsResult.html