|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.jsp.tagext.TagSupport org.makumba.analyser.AnalysableElement org.makumba.analyser.AnalysableTag org.makumba.commons.tags.GenericMakumbaTag org.makumba.forms.tags.FormTagBase
public class FormTagBase
mak:form base tag
Provides generic methods for makumba forms and is itself an implementation of the generic mak:form
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.makumba.analyser.AnalysableElement |
---|
AnalysableElement.FilePositionElementComparator |
Field Summary | |
---|---|
static String |
__MAKUMBA__FORM__COUNTER__
|
(package private) String |
afterHandler
|
(package private) String |
annotation
|
(package private) String |
annotationSeparator
|
String |
baseObject
the tag attributes |
(package private) String |
basePointer
|
(package private) BodyContent |
bodyContent
|
protected DataDefinitionProvider |
ddp
|
protected FormDataProvider |
fdp
|
protected String |
field
|
String |
formAction
|
(package private) String |
formMessage
|
(package private) String |
formMethod
|
(package private) String |
formName
|
(package private) String |
handler
|
(package private) HashMap<String,String> |
lazyEvaluatedInputs
Names of the forms in the page, needed for nested forms that depend on each other, e.g. two nested new forms, where one wants to store the result of the new operation of the other. |
protected String |
multipleSubmitErrorMsg
|
protected String |
operation
|
(package private) Boolean |
reloadFormOnError
|
(package private) FormResponder |
responder
derived tag data |
(package private) long |
starttime
|
protected String |
styleId
|
protected String |
triggerEvent
|
protected DataDefinition |
type
|
Fields inherited from class org.makumba.commons.tags.GenericMakumbaTag |
---|
extraFormatting, extraFormattingParams, NEEDED_RESOURCES, params |
Fields inherited from class org.makumba.analyser.AnalysableTag |
---|
ATTRIBUTE_VALUES_TRUE_FALSE, tagData, tagKey, TYPES |
Fields inherited from class org.makumba.analyser.AnalysableElement |
---|
ANALYSIS_STATE |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
id, pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
---|
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
---|
EVAL_BODY_AGAIN |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
---|
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Constructor Summary | |
---|---|
FormTagBase()
|
Method Summary | |
---|---|
protected boolean |
allowEmptyBody()
|
(package private) void |
checkNoParent(String attrName)
Generates an error message if this form has no parent form (and hence can't have the given attribute) |
protected void |
doAnalyzedCleanup()
Called by doEndTag in its finally block. |
int |
doAnalyzedEndTag(PageCache pageCache)
Lets the responder write the pre- and postamble for the form, and writes the bodyContent inside. |
int |
doAnalyzedStartTag(PageCache pageCache)
Sets the responder elements, computes the base pointer if needed |
void |
doEndAnalyze(PageCache pageCache)
End the analysis of the tag, after all tags in the page were visited. |
void |
doInitBody()
|
void |
doStartAnalyze(PageCache pageCache)
FIXME QueryExecutionProvider should tell us the syntax for the primary key name |
FormTagBase |
findParentForm()
Finds the parent form |
(package private) FormTagBase |
findRootForm()
Finds the root form |
DataDefinition |
getDataTypeAtAnalysis(PageCache pageCache)
The basic data type inside the form. null for generic forms |
String |
getDefaultExpr(String fieldName)
The default expression for an input tag, if none is indicated |
String |
getFormIdentifier()
the HTML ID of the form |
Object |
getFormSuffixIdentifier()
the suffix of the form identifier, used to uniquely identify the form on the page |
HashMap<String,MultipleKey> |
getNestedFormNames(PageCache pageCache)
|
(package private) String |
getOperation()
Gets the name of the operation of the tag based on its class name |
ResponderOperation |
getResponderOperation(String operation)
Gives the operation associated with this form tag. |
protected String |
getSubmitJavascriptCall(String event,
boolean ajax)
builds the javascript call necessary to submit a form via partial post-back |
void |
initialiseState()
Resets and initialises the tag's state, to work in a tag pool. |
protected void |
registerPossibleAttributeValues()
Override this in order to register possible attribute values using AnalysableTag.registerAttributeValues(String, String...) . |
void |
setAction(String s)
|
void |
setAfterHandler(String s)
|
void |
setAnnotation(String s)
|
void |
setAnnotationSeparator(String s)
|
void |
setBodyContent(BodyContent bc)
|
void |
setClientSideValidation(String clientSideValidation)
|
void |
setField(String s)
|
void |
setHandler(String s)
|
void |
setMessage(String s)
|
void |
setMethod(String s)
|
void |
setMultipart()
|
void |
setMultipleSubmitErrorMsg(String s)
|
void |
setName(String s)
|
void |
setObject(String s)
|
void |
setOnReset(String s)
|
void |
setOnSubmit(String s)
|
void |
setOperation(String o)
|
void |
setReloadFormOnError(String s)
|
void |
setStyleId(String s)
|
void |
setTagKey(PageCache pageCache)
Sets tagKey to uniquely identify this tag. |
void |
setTarget(String s)
additional html attributes: |
void |
setTriggerEvent(String e)
|
void |
setType(String s)
|
boolean |
shouldComputeBasePointer()
Indicates whether the base pointer should be computed or not |
Methods inherited from class org.makumba.commons.tags.GenericMakumbaTag |
---|
doStartTag, getParams, isAttribute, setAddTitle, setCols, setDefault, setElementSeparator, setEllipsis, setEllipsisLength, setEmpty, setFormat, setHtml, setLabelSeparator, setLineSeparator, setLongLineLength, setMaxlength, setMaxLength, setOnClick, setOnDblClick, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setRows, setSize, setStyle, setStyleClass, setTitle, setType, setUrlEncode, toString |
Methods inherited from class org.makumba.analyser.AnalysableTag |
---|
addTagText, allowsIdenticalKey, canHaveBody, checkAttributeValues, doEndTag, getElementData, getPageContext, getPageTextInfo, getTagKey, getTagText, needPageCache, notEmpty, onlyInt, registerAttributeValues, setTagDataAtAnalysis |
Methods inherited from class org.makumba.analyser.AnalysableElement |
---|
checkTagFound, discardJSPParsingData, getAnalyzedElementData, getCurrentBodyTagData, getElementAfter, getElementBefore, getPageCache, getPageCache, getRunningElementData, getTagByAttribute, getTagById, getThreadElementStack, initializeThread, keepAnalysisState, setAnalyzedElementData, setRunningElementData |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.servlet.jsp.tagext.IterationTag |
---|
doAfterBody |
Methods inherited from interface javax.servlet.jsp.tagext.Tag |
---|
doEndTag, doStartTag, getParent, release, setPageContext, setParent |
Field Detail |
---|
public static final String __MAKUMBA__FORM__COUNTER__
public String baseObject
String handler
String afterHandler
String formMethod
public String formAction
String formName
String formMessage
String annotation
String annotationSeparator
protected String multipleSubmitErrorMsg
protected String field
protected String operation
protected String triggerEvent
protected String styleId
BodyContent bodyContent
FormResponder responder
protected DataDefinition type
String basePointer
Boolean reloadFormOnError
HashMap<String,String> lazyEvaluatedInputs
long starttime
protected FormDataProvider fdp
protected DataDefinitionProvider ddp
Constructor Detail |
---|
public FormTagBase()
Method Detail |
---|
public void setBodyContent(BodyContent bc)
setBodyContent
in interface BodyTag
public void doInitBody()
doInitBody
in interface BodyTag
protected boolean allowEmptyBody()
public void setObject(String s)
public void setStyleId(String s)
setStyleId
in class GenericMakumbaTag
public void setType(String s)
setType
in class GenericMakumbaTag
public void setField(String s)
public void setOperation(String o)
public void setTriggerEvent(String e)
public void setAction(String s)
public void setHandler(String s)
public void setAfterHandler(String s)
public void setMethod(String s)
public void setName(String s)
public void setMessage(String s)
public void setMultipart()
public void setTarget(String s)
public void setOnReset(String s)
public void setOnSubmit(String s)
public void setClientSideValidation(String clientSideValidation)
public void setAnnotation(String s)
public void setAnnotationSeparator(String s)
public void setReloadFormOnError(String s)
public void setMultipleSubmitErrorMsg(String s)
String getOperation()
public boolean shouldComputeBasePointer()
false
if we are at runtime (i.e. the baseObject has been set by JSP), true
if
we are at analysis timepublic void setTagKey(PageCache pageCache)
setTagKey
in class AnalysableTag
pageCache
- the page cache of the current pageAnalysableTag.doAnalyzedStartTag(org.makumba.analyser.PageCache)
,
AnalysableTag.doStartAnalyze(org.makumba.analyser.PageCache)
public void doStartAnalyze(PageCache pageCache)
doStartAnalyze
in class AnalysableTag
pageCache
- The page cache for the current pagepublic void doEndAnalyze(PageCache pageCache)
AnalysableTag
doEndAnalyze
in class AnalysableTag
pageCache
- The page cache for the current pagepublic FormTagBase findParentForm()
FormTagBase findRootForm()
void checkNoParent(String attrName)
attrName
- the name of the attribute that shouldn't be used
ProgrammerError
public void initialiseState()
GenericMakumbaTag
initialiseState
in class GenericMakumbaTag
protected void doAnalyzedCleanup()
AnalysableTag
doAnalyzedCleanup
in class GenericMakumbaTag
protected void registerPossibleAttributeValues()
AnalysableTag
AnalysableTag.registerAttributeValues(String, String...)
. The registered attributes are checked before
AnalysableTag.doStartAnalyze(PageCache)
and throw a ProgrammerError
is thrown if the provided value is not
allowed.
registerPossibleAttributeValues
in class AnalysableTag
public int doAnalyzedStartTag(PageCache pageCache) throws JspException, LogicException
doAnalyzedStartTag
in class AnalysableTag
pageCache
- the page cache of the current page
JspException
LogicException
AnalysableTag.doStartTag()
public int doAnalyzedEndTag(PageCache pageCache) throws JspException
doAnalyzedEndTag
in class AnalysableTag
pageCache
- the page cache of the current page
JspException
AnalysableTag.doEndTag()
protected String getSubmitJavascriptCall(String event, boolean ajax)
public String getDefaultExpr(String fieldName)
public DataDefinition getDataTypeAtAnalysis(PageCache pageCache)
public ResponderOperation getResponderOperation(String operation)
operation
- name of the operation
ResponderOperation
object holding the operation informationpublic HashMap<String,MultipleKey> getNestedFormNames(PageCache pageCache)
public String getFormIdentifier()
public Object getFormSuffixIdentifier()
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |