|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.faceless.pdf2.viewer2.ViewerFeature
org.faceless.pdf2.viewer2.ActionHandler
org.faceless.pdf2.viewer2.feature.FormSubmitActionHandler
public class FormSubmitActionHandler
Create a handler to handler "FormSubmit" actions.
| 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 Summary | |
|---|---|
FormSubmitActionHandler()
Create a new FormSubmitActionHandler |
|
| Method Summary | |
|---|---|
static FormSubmitActionHandler |
getInstance()
Deprecated. since 2.11 just calls the public constructor |
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. |
| Methods inherited from class org.faceless.pdf2.viewer2.ActionHandler |
|---|
toString |
| Methods inherited from class org.faceless.pdf2.viewer2.ViewerFeature |
|---|
getAllEnabledFeatures, getAllFeatures, getCustomJavaScript, getFeatureProperty, getName, isEnabledByDefault, setFeatureName, teardown |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
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 submitted
public 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 format
FDF.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 submitted
public 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 submitted
FDF.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 submitted
public 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 submitted
public 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.
| Constructor Detail |
|---|
public FormSubmitActionHandler()
| Method Detail |
|---|
public static FormSubmitActionHandler getInstance()
public boolean matches(DocumentPanel panel,
PDFAction action)
ActionHandlerPDFAction
matches in class ActionHandlerpublic void initialize(PDFViewer viewer)
ViewerFeature
initialize in class ViewerFeaturepublic 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 out
public void run(DocumentPanel docpanel,
PDFAction action)
ActionHandler
run in class ActionHandlerdocpanel - the DocumentPanel running the actionaction - the action
public 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 ALLANNOTATIONSflags - a logical or of the various flagsFDF
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||