public interface HTMLCallback
Modifier and Type | Field and Description |
---|---|
static int |
ERROR_ATTIBUTE_VALUE_INVALID
Error code denoting that an invalid attribute value was found in the HTML
|
static int |
ERROR_ATTRIBUTE_NOT_SUPPORTED
Error code denoting that an unsupported attribute (by XHTML-MP 1.0 standards) was found in the HTML
|
static int |
ERROR_CONNECTING
Error code denoting that a connection to the resource provider (i.e.
|
static int |
ERROR_CSS_ATTIBUTE_VALUE_INVALID
Error code denoting that an invalid attribute value was found in the CSS
|
static int |
ERROR_CSS_ATTRIBUTE_NOT_SUPPORTED
Error code denoting that an unsupported CSS attribute (by XHTML-MP 1.0 standards) was found in the HTML or external CSS files
|
static int |
ERROR_CSS_NOT_FOUND
Error code denoting that a CSS file referenced from the HTML or from another external CSS file was not found
|
static int |
ERROR_ENCODING
Error code denoting that the encoding the page needed according to its charset (usually specified in the content-type response header) is unsupported in the device
|
static int |
ERROR_IMAGE_BAD_FORMAT
Error code denoting that an image referenced from the HTML could not be loaded
|
static int |
ERROR_IMAGE_NOT_FOUND
Error code denoting that an image referenced from the HTML was not found
|
static int |
ERROR_NO_BASE_URL
Error code denoting that a relative URL was referenced from a document with no base URL (A document that was loaded via setBody/setHTML and not via setPage)
In this case the return value of parsingError is not considered - parsing continues and the resource at the URL (CSS file/image) is ignored
|
static int |
ERROR_NO_CLOSE_TAG
Error code denoting that a tag was not closed properly in the HTML
|
static int |
ERROR_TAG_NOT_SUPPORTED
Error code denoting that an unsupported tag (by XHTML-MP 1.0 standards) was found in the HTML
|
static int |
ERROR_UNEXPECTED_CHARACTER
Error code denoting that the parser bumped into an unexpected character
|
static int |
ERROR_UNEXPECTED_TAG_CLOSING
Error code denoting that a tag was not closed prematurely
|
static int |
ERROR_UNRECOGNIZED_CHAR_ENTITY
Error code denoting that an invalid character entity was found
A character entity is HTML codes that start with an ampersand and end with semicolon and denote special/reserved chars
Char entities can be added by using HTMLComponent.addCharEntity
|
static int |
FIELD_PASSWORD
A password field
|
static int |
FIELD_TEXT
A text field
|
static int |
LINK_FORBIDDEN
A forbidden link (not to be rendered as a link but as a regular label)
|
static int |
LINK_REGULAR
A regular link
|
static int |
LINK_VISTED
A link that was visited before
|
static int |
STATUS_CANCELLED
The page loading was cancelled before it could be completed
|
static int |
STATUS_COMPLETED
The page and all of its referenced images and CSS files were loaded completely
|
static int |
STATUS_CONNECTED
The stream was received
|
static int |
STATUS_DISPLAYED
The page was displayed on screen - but at this stage some images and CSS files may still be loading in the background
|
static int |
STATUS_ERROR
The page couldn't load completely because of parsing errors
|
static int |
STATUS_NONE
This is returned in the page status if no page has been set to the HTMLComponent
|
static int |
STATUS_PARSED
The page was parsed
|
static int |
STATUS_REDIRECTED
The page was redirected to another URL
|
static int |
STATUS_REQUESTED
The page was requested from the request handler
|
Modifier and Type | Method and Description |
---|---|
String |
fieldSubmitted(HTMLComponent htmlC,
TextArea ta,
String actionURL,
String id,
String value,
int type,
String errorMsg)
Called whenever a field is submitted to a form.
|
String |
getAutoComplete(HTMLComponent htmlC,
String actionURL,
String id)
Called on form creation and enabled implementations of this method to return a value to preset in a form field.
|
int |
getLinkProperties(HTMLComponent htmlC,
String url)
Returns properties about the given link to indicate to HTMLComponent how to render it
Note that this method is always called NOT on the EDT thread.
|
boolean |
linkClicked(HTMLComponent htmlC,
String url)
Called when a link is clicked.
|
void |
pageStatusChanged(HTMLComponent htmlC,
int status,
String url)
Called when the page status has been changed
|
boolean |
parsingError(int errorId,
String tag,
String attribute,
String value,
String description)
Called when encountering an error while parsing the HTML document.
|
void |
titleUpdated(HTMLComponent htmlC,
String title)
Called when the page's title is updated
|
static final int ERROR_TAG_NOT_SUPPORTED
static final int ERROR_ATTRIBUTE_NOT_SUPPORTED
static final int ERROR_ATTIBUTE_VALUE_INVALID
static final int ERROR_NO_CLOSE_TAG
static final int ERROR_UNRECOGNIZED_CHAR_ENTITY
static final int ERROR_UNEXPECTED_TAG_CLOSING
static final int ERROR_UNEXPECTED_CHARACTER
static final int ERROR_IMAGE_NOT_FOUND
static final int ERROR_IMAGE_BAD_FORMAT
static final int ERROR_ENCODING
static final int ERROR_CONNECTING
static final int ERROR_CSS_ATTRIBUTE_NOT_SUPPORTED
static final int ERROR_CSS_ATTIBUTE_VALUE_INVALID
static final int ERROR_CSS_NOT_FOUND
static final int ERROR_NO_BASE_URL
static final int STATUS_NONE
static final int STATUS_ERROR
static final int STATUS_CANCELLED
static final int STATUS_REQUESTED
static final int STATUS_CONNECTED
static final int STATUS_PARSED
static final int STATUS_DISPLAYED
static final int STATUS_COMPLETED
static final int STATUS_REDIRECTED
static final int FIELD_TEXT
static final int FIELD_PASSWORD
static final int LINK_REGULAR
static final int LINK_VISTED
static final int LINK_FORBIDDEN
void titleUpdated(HTMLComponent htmlC, String title)
htmlC
- The HTMLComponent that triggered the eventtitle
- The new titleboolean parsingError(int errorId, String tag, String attribute, String value, String description)
errorId
- The error ID, one of the ERROR_* constantstag
- The tag in which the error occured (Can be null for non-tag related errors)attribute
- The attribute in which the error occured (Can be null for non-attribute related errors)value
- The value in which the error occured (Can be null for non-value related errors)description
- A verbal description of the errorvoid pageStatusChanged(HTMLComponent htmlC, int status, String url)
htmlC
- The HTMLComponent in which the status change occuredstatus
- The new status, one of the STATUS_* constantsurl
- The URL of the pageString fieldSubmitted(HTMLComponent htmlC, TextArea ta, String actionURL, String id, String value, int type, String errorMsg)
htmlC
- The HTMLComponent in which this event occuredta
- The TextArea/TextField of this fieldactionURL
- The action URL of the formid
- The ID of the fieldvalue
- The value enteredtype
- The type of the field, one of the FIELD_* constantserrorMsg
- The error message if any error occured (i.e. input validation error) or null if no error occuredString getAutoComplete(HTMLComponent htmlC, String actionURL, String id)
htmlC
- The HTMLComponent in which this event occuredactionURL
- The action URL of the formid
- The ID of the fieldint getLinkProperties(HTMLComponent htmlC, String url)
htmlC
- The HTMLComponenturl
- The Link URLboolean linkClicked(HTMLComponent htmlC, String url)
htmlC
- The HTMLComponenturl
- The Link URL