| Package | mx.rpc.livecycle |
| Class | public class DocumentReference |
| Inheritance | DocumentReference Object |
If the document is not yet on the server, use the LiveCycle Remoting upload servlet to get the document to the server and create a DocumentReference using the URL returned by the servlet.
| Property | Defined By | ||
|---|---|---|---|
![]() | constructor : Object
A reference to the class object or constructor function for a given object instance.
| Object | |
| contentType : String
String code for content type of document.
| DocumentReference | ||
| fileRef : String
Populated when the reference type is FILE.
| DocumentReference | ||
![]() | prototype : Object
[static]
A reference to the prototype object of a class or function object.
| Object | |
| referenceType : int
Reference Type - one of three supported types described above.
| DocumentReference | ||
| REF_TYPE_FILE : uint = 2 [static]
Reference to a Document on the LiveCycle ES server via its directory location.
| DocumentReference | ||
| REF_TYPE_INLINE : uint = 3 [static]
Document contents are not referred to, but are included with this object.
| DocumentReference | ||
| REF_TYPE_URL : uint = 1 [static]
Reference to a Document via a URL to LC server provided by
the LiveCycle ES DocumentManager.
| DocumentReference | ||
| url : String
Populated when the reference type is URL.
| DocumentReference | ||
| xml : String
Populated for an XML document when its contents are passed in-line.
| DocumentReference | ||
| contentType | property |
public var contentType:String
String code for content type of document. For example, "text/xml".
| fileRef | property |
public var fileRef:String
Populated when the reference type is FILE.
| REF_TYPE_FILE | property |
public static var REF_TYPE_FILE:uint = 2
Reference to a Document on the LiveCycle ES server via its directory location.
| REF_TYPE_INLINE | property |
public static var REF_TYPE_INLINE:uint = 3
Document contents are not referred to, but are included with this object.
| REF_TYPE_URL | property |
public static var REF_TYPE_URL:uint = 1
Reference to a Document via a URL to LC server provided by the LiveCycle ES DocumentManager.
| referenceType | property |
public var referenceType:int
Reference Type - one of three supported types described above.
| url | property |
public var url:String
Populated when the reference type is URL.
| xml | property |
public var xml:String
Populated for an XML document when its contents are passed in-line.
private function startUpload():void
{
fileRef.addEventListener(Event.SELECT, selectHandler);
fileRef.addEventListener("uploadCompleteData", completeHandler);
try
{
var success:Boolean = fileRef.browse();
}
catch (error:Error)
{
trace("Unable to browse for files.");
}
}
private function selectHandler(event:Event):void {
var request:URLRequest = new URLRequest("http://SERVER:PORT/remoting/lcfileupload")
try
{
fileRef.upload(request);
}
catch (error:Error)
{
trace("Unable to upload file.");
}
}
private function completeHandler(event:DataEvent):void
{
var params:Object = new Object();
var docRef:DocumentReference = new DocumentReference();
docRef.url = event.data as String;
docRef.referenceType = DocumentReference.REF_TYPE_URL;
}
If the document is already on the server and its file location is known, set the referenceType field to REF_TYPE_FILE and the fileRef field to the location of the file on the server. For example:
var docRef:DocumentReference = new DocumentReference();
docRef.fileRef = "C:/temp/file1";
docRef.referenceType=DocumentReference.REF_TYPE_FILE;
If the document is already on the server and its URL is known, set the referenceType field to URL and the url field to the REF_TYPE_URL. For example:
var docRef:DocumentReference = new DocumentReference();
docRef.url = "http://localhost:8080/DocumentManager/1168728809000/7855483216115920647";
docRef.referenceType=DocumentReference.REF_TYPE_URL;
Flex clients will receive objects of type DocumentReference.as for LC operations that return Documents as output parameters. The DocumentReference object's referenceType will let the client know whether the content is in the DocumentReference object itself, DocumentReference.xml (the case for XML documents) or needs to be retrieved via a URL, DocumentReference.url. The DocumentReference.contentType field will let the client know the type of document.
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/common/langref/mx/rpc/livecycle/DocumentReference.html