public class FormSubmitActionHandler extends ActionHandler
timeout | The connection timeout value in milliseconds (0 is infinite) |
---|---|
readTimeout | The read timeout value in milliseconds (0 is infinite) |
This code is copyright the Big Faceless Organization. You're welcome to use, modify and distribute it in any form in your own projects, provided those projects continue to make use of the Big Faceless PDF library.
Constructor and Description |
---|
FormSubmitActionHandler()
Create a new FormSubmitActionHandler
|
Modifier and Type | Method and Description |
---|---|
void |
initialize(PDFViewer viewer)
Called when the feature is first added to a viewer
|
boolean |
matches(DocumentPanel panel,
PDFAction action)
Return true if this ActionFactory can handle the specified
PDFAction |
void |
run(DocumentPanel docpanel,
PDFAction action)
Run the specified action
|
void |
setReadTimeout(int timeout)
Set the timeout in milliseconds that should be used when reading from
a URL.
|
void |
setTimeout(int timeout)
Set the timeout in milliseconds that should be used when connecting
to a URL.
|
void |
submit(DocumentPanel docpanel,
String url,
String method,
String[] fields,
int annotations,
int flags)
Submit the document form.
|
toString
getAllEnabledFeatures, getAllFeatures, getCustomJavaScript, getFeatureProperty, getFeatureURLProperty, getName, isEnabledByDefault, setFeatureName, teardown
public static final int FLAG_EMPTYFIELDS
submit(org.faceless.pdf2.viewer2.DocumentPanel, java.lang.String, java.lang.String, java.lang.String[], int, int)
meaning empty fields should be submittedpublic static final int FLAG_INCREMENTAL
submit(org.faceless.pdf2.viewer2.DocumentPanel, java.lang.String, java.lang.String, java.lang.String[], int, int)
meaning incremental updates should be submitted (not currently implemented)public static final int FLAG_CANONICALDATES
submit(org.faceless.pdf2.viewer2.DocumentPanel, java.lang.String, java.lang.String, java.lang.String[], int, int)
meaning dates should be submitted in canonical formatFDF.getCanonicalDate(org.faceless.pdf2.FormElement)
,
Constant Field Valuespublic static final int FLAG_FKEY
submit(org.faceless.pdf2.viewer2.DocumentPanel, java.lang.String, java.lang.String, java.lang.String[], int, int)
meaning the Filename should be submittedpublic static final int FLAG_EMBEDFORM
submit(org.faceless.pdf2.viewer2.DocumentPanel, java.lang.String, java.lang.String, java.lang.String[], int, int)
meaning the Form should be emdedded in the FDF (not currently implemnted)public static final int FLAG_NMKEY
submit(org.faceless.pdf2.viewer2.DocumentPanel, java.lang.String, java.lang.String, java.lang.String[], int, int)
meaning the annotation PDFAnnotation.getUniqueID()
should be submittedFDF.setIncludeUniqueID(boolean)
,
Constant Field Valuespublic static final int NOANNOTATIONS
submit(org.faceless.pdf2.viewer2.DocumentPanel, java.lang.String, java.lang.String, java.lang.String[], int, int)
meaning no annotations should be submittedpublic static final int ALLANNOTATIONS
submit(org.faceless.pdf2.viewer2.DocumentPanel, java.lang.String, java.lang.String, java.lang.String[], int, int)
meaning all annotations should be submittedpublic static final int USERANNOTATIONS
submit(org.faceless.pdf2.viewer2.DocumentPanel, java.lang.String, java.lang.String, java.lang.String[], int, int)
meaning only annotations where the
author
matches the current user
.public FormSubmitActionHandler()
public boolean matches(DocumentPanel panel, PDFAction action)
ActionHandler
PDFAction
matches
in class ActionHandler
public void initialize(PDFViewer viewer)
ViewerFeature
initialize
in class ViewerFeature
public void setTimeout(int timeout)
timeout
- the number of milliseconds to wait while connecting to a URL before timing outpublic void setReadTimeout(int timeout)
timeout
- the number of milliseconds to wait while reading from a URL before timing outpublic void run(DocumentPanel docpanel, PDFAction action)
ActionHandler
run
in class ActionHandler
docpanel
- the DocumentPanel running the actionaction
- the actionpublic void submit(DocumentPanel docpanel, String url, String method, String[] fields, int annotations, int flags)
Doc.submitForm
JavaScript method.docpanel
- the DocumentPanelurl
- the URL the submit will be made tomethod
- the format - one of FDF, XFDF, HTML, HTMLGET, XML, or PDFfields
- the list of field names to include - may be null (for all fields). List will be moderated by the FLAG_EMPTY
parameterannotations
- one of NOANNOTATIONS
, USERANNOTATIONS
or ALLANNOTATIONS
flags
- a logical or of the various flags
FDF
Copyright © 2001-2017 Big Faceless Organization