public class ERXAccessibleSubmitButton extends ERXSubmitButton
The default is to use the u (underline) element to identify the hot key in the button text. Use the accesskeyElement binding to specify a different element. The element can be decorated with other attributes, e.g.
accesskeyElement = "span style='text-decoration: underline;'";
You can have this class replace WOSubmitButton via ERXPatcher.setClassForName(ERXAccessibleSubmitButton.class, "WOSubmitButton"); or use it explicitly by name in your WOD. It works best (does the most work for you) if you use it with the value attribute. No self configuring is done if there is any content between the open and close tags.
ERXSubmitButton
Name | Description |
---|---|
accesskey | optional key for hot key, "" to disable hot key |
accesskeyElement | optional element name and decoration to wrap hot key character with in the button text |
value | the button text |
Modifier and Type | Field and Description |
---|---|
protected WOAssociation |
_accesskey |
protected WOAssociation |
_accesskeyElement |
_action, _actionClass, _directActionName, _shouldSubmitForm, STYLE_PREFIX
_disabled, _escapeHTML, _hidden, _name, _value
_associations, _class, _constantAttributeAssociations, _constantAttributesRepresentation, _dyneltName, _finishedInitialization, _generatedId, _id, _prefix, _rendered, _secure, _style, _suffix, _title, DontEscapeHTML, EscapeHTML
_children
_ConstructorParameters
Constructor and Description |
---|
ERXAccessibleSubmitButton(String name,
NSDictionary<String,WOAssociation> associations,
WOElement template) |
Modifier and Type | Method and Description |
---|---|
protected String |
accesskey(WOComponent component) |
protected String |
accesskeyElement(WOComponent component) |
void |
appendAttributesToResponse(WOResponse response,
WOContext context)
Adds the accesskey binding as we took it out of the associations dictionary
|
void |
appendChildrenToResponse(WOResponse response,
WOContext context)
Adds styledValue between the open and close tags
|
void |
appendToResponse(WOResponse response,
WOContext context)
Records the accesskey for this button so other buttons on the page won't use it.
|
protected boolean |
hasUsedHotKey(WOComponent component,
String hotKey) |
protected boolean |
isDisabled(WOComponent component) |
protected void |
recordUsedHotKey(WOComponent component,
String hotKey)
Records that hotKey is being used by a ERXAccessibleSubmitButton on this page.
|
protected String |
styledValue(WOComponent component) |
protected NSMutableArray |
usedHotKeys(WOComponent component) |
_appendCloseTagToResponse, _appendNameAttributeToResponse, _appendOpenTagToResponse, _appendTypeAttributeToResponse, appendIEButtonFixToResponse, elementName, invokeAction, isDisabledInContext, takeValuesFromRequest, toString, type
_appendDisabledAttributeToResponse, _appendValueAttributeToResponse, defaultEscapeHTML, escapeHTMLInContext, hasContent, hiddenInContext, isValueInInputValues, nameInContext, nameInContext, valueStringInContext
__otherQueryDictionaryInContext, __queryDictionaryInContext, _appendAttributesFromAssociationsToResponse, _appendClassAndIdToResponse, _appendTagAttributeAndValueToResponse, _frameworkNameInComponent, appendConstantAttributesToResponse, appendHiddenFieldToResponse, appendNonURLAttributesToResponse, appendURLAttributesToResponse, classInContext, computeActionStringInContext, computeQueryDictionaryInContext, constantAttributeAssociations, constantAttributesRepresentation, elementName, escapeHTML, idInContext, isRenderedInContext, nonUrlAttributeAssociations, prefixInContext, secureInContext, stringValueInContext, styleInContext, suffixInContext, titleInContext, urlAttributeAssociations
addChildElement, childrenElements, EmptyGroup, hasChildrenElements, invokeChildrenAction, takeChildrenValuesFromRequest
protected WOAssociation _accesskey
protected WOAssociation _accesskeyElement
public ERXAccessibleSubmitButton(String name, NSDictionary<String,WOAssociation> associations, WOElement template)
protected String accesskey(WOComponent component)
component
- WOComponent to evaluate the associations inprotected String accesskeyElement(WOComponent component)
component
- WOComponent to evaluate the associations inprotected boolean isDisabled(WOComponent component)
component
- WOComponent to evaluate the associations intrue
if accesskey should not be generatedprotected String styledValue(WOComponent component)
component
- WOComponent to evaluate the associations inpublic void appendToResponse(WOResponse response, WOContext context)
public void appendAttributesToResponse(WOResponse response, WOContext context)
public void appendChildrenToResponse(WOResponse response, WOContext context)
protected boolean hasUsedHotKey(WOComponent component, String hotKey)
component
- WOComponent to evaluate the associations inhotKey
- the character to checktrue
if hotKey has been used by another ERXAccessibleSubmitButton on this pageprotected void recordUsedHotKey(WOComponent component, String hotKey)
component
- WOComponent to evaluate the associations inhotKey
- the character to recordprotected NSMutableArray usedHotKeys(WOComponent component)
component
- WOComponent to evaluate the associations inCopyright © 2002 – 2024 Project Wonder.