er.extensions
Class ERXWOForm
java.lang.Object
com.webobjects.appserver.WOElement
com.webobjects.appserver.WODynamicElement
com.webobjects.appserver._private.WODynamicGroup
com.webobjects.appserver._private.WOHTMLDynamicElement
com.webobjects.appserver._private.WOForm
er.extensions.ERXWOForm
- public class ERXWOForm
- extends WOForm
Transparent replacement for WOForm. You don't really need to do anything to use it, because it
will get used instead of WOForm elements automagically. In addition, it has a few new features:
- it adds the FORM's name to the ERXWOContext's mutableUserInfo as as "formName" key,
which makes writing JavaScript elements a bit easier.
- it warns you when you have one FORM embedded inside another and ommits the tags for the nested FORM.
- it pushes the
enctype
into the userInfo, so that ERXWOFileUpload
can check if it is set correctly. ERXFileUpload will throw an exception if the enctype is not set.
- it has a "fragmentIdentifier" binding, which, when set spews out some javascript that appends
"#" + the value of the binding to the action. The obvious case comes when you have a form at the bottom of the page
and want to jump to the error messages if there are any. That javascript is used is an implementation
detail, though and shouldn't be relied on.
This subclass is installed when the frameworks loads.
- Author:
- ak
Methods inherited from class com.webobjects.appserver._private.WOHTMLDynamicElement |
_appendAttributesFromAssociationsToResponse, _appendCloseTagToResponse, _appendOpenTagToResponse, _frameworkNameInComponent, appendConstantAttributesToResponse, appendNonURLAttributesToResponse, appendURLAttributesToResponse, computeActionStringInContext, computeQueryDictionaryInContext, constantAttributesRepresentation, elementName, escapeHTML, nonUrlAttributeAssociations, urlAttributeAssociations |
ERXWOForm
public ERXWOForm(String name,
NSDictionary associations,
WOElement template)
appendAttributesToResponse
public void appendAttributesToResponse(WOResponse response,
WOContext context)
appendToResponse
public void appendToResponse(WOResponse response,
WOContext context)
formName
public static String formName(WOContext context,
String defaultName)
- Retrieves the current FORM's name in the supplied context. If none is set
(either the FORM is not a ERXWOForm or the context is not ERXMutableUserInfo) the supplied default
value is used.
- Parameters:
context
- current contextdefaultName
- default name to use
- Returns:
- form name in context or default value
Copyright © 2002 – 2004 Project Wonder.