|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.acesoft.aceoffix.WordRequest
public class WordRequest
Extracts data from the Word document submitted by AceoffixCtrl.
WordRequest is a important class. WordRequest object contains the data submitted by AceoffixCtrl. If you need to extract data from Word document you have to create WordRequest object. Make sure that WordRequest object is created and some DataRegions are specified to be submitted before you call AceoffixCtrl.openDocument method. Only the submitted DataRegions can be extracted from WordRequest object. WordRequest object only can be created in the server page specified by AceoffixCtrl.setSaveDataPage.
Constructor Summary | |
---|---|
WordRequest(HttpServletRequest request,
HttpServletResponse response)
Initializes a new instance of the WordRequest class. |
Method Summary | |
---|---|
void |
close()
Returns a success message to AceoffixCtrl. |
java.lang.String |
getFormField(java.lang.String name)
Gets the value with the specified name in the form fields of the page with AceoffixCtrl. |
WordReqDataRegion |
openDataRegion(java.lang.String dataRegionName)
Opens the specified DataRegion and returns a WordReqDataRegion object. |
void |
showPage(int width,
int height)
Prompt a custom dialog box to show the saving result. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WordRequest(HttpServletRequest request, HttpServletResponse response) throws java.lang.Exception, java.io.IOException
java.lang.Exception
java.io.IOException
Method Detail |
---|
public WordReqDataRegion openDataRegion(java.lang.String dataRegionName) throws java.io.IOException, java.lang.Exception
The following code example shows how to use the openDataRegion method to get data of the specified DataRegion.
WordRequest wreq = new WordRequest(request, response); String strCompanyName = wreq.openDataRegion("CompanyName").getValue(); String strProductName = wreq.openDataRegion("ProductName").getValue(); // After you get the values, you can save them to the database. wreq.Close();
dataRegionName
- The name of DataRegion.
java.io.IOException
java.lang.Exception
public void close() throws java.io.IOException
If the code for saving document executes successfully, you should call this method to return a success message to AceoffixCtrl. Typically, the close method should be called at the end of code in SaveDataPage.
java.io.IOException
public void showPage(int width, int height) throws java.io.IOException
After save document, if you want to prompt a custom dialog box to show the saving result, you can call this method. The message page shown in the dialog box is the current SaveDataPage. By default, the SaveDataPage will display nothing. You can add friendly messages in the SaveDataPage.
width
- The width of custom dialog, in pixels.height
- The height of custom dialog, in pixels.
java.io.IOException
public java.lang.String getFormField(java.lang.String name) throws java.io.IOException, java.lang.Exception
When AceoffixCtrl is saving document, you can call this method to get the values of form fields posted from the page with AceoffixCtrl. To be able to capture the value, the form field must have a name attribute.
This form field does not support the form collection with the same name. This form field only supports the HTML INPUT tags currently.
name
- The name of form field in the page.
java.io.IOException
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |