|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
com.taggercat.tags.AbstractExpEvalTag
com.taggercat.tags.AbstractDataSourceActionTag
public abstract class AbstractDataSourceActionTag
This tag dynamically creates a HTML button or link element. The Button/Link is enabled only if the user has permission to perform the specified action on the named data source.
An expression can be set in the condition attribute for additional checks to determine if the button should be enabled. The button/Link will usually have an onClick event handler. The onClick event handler can be any JavaScript expression. However, it will usually be of the form:
onClick="dsOperation(this.form, '{dsn}','{action}', '/order_detail.jsp', '/error_general.jsp');"
The generated onClick method will be:
onClick="dsOperation(this.form, 'orderitems','insert', '/order_detail.jsp', '/error_general.jsp');"
The button/link will be enabled based on the following validation checks:
Known actions are:
There are four placeholders that you can use in your onClick handler. They are:
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Field Summary |
|---|
| 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 | |
|---|---|
AbstractDataSourceActionTag()
|
|
| Method Summary | |
|---|---|
void |
addBaseAttributes(HTMLTagBuilder htmlTag)
Fills in the base attributes that are common to both buttons and anchor tags. |
void |
addBaseEnabledAttributes(HTMLTagBuilder htmlTag)
Fills in the base attributes that are common to both buttons and anchor tags. |
int |
doEndTag()
Reset the state of the tag. |
int |
doStartTag()
Creates the button / link element, and its onClick event handler. |
java.lang.String |
getAccesskey()
Gets the access key. |
java.lang.String |
getAction()
Gets the action name. |
java.lang.String |
getCondition()
Gets additional enabled condition. |
boolean |
getDisabled()
Gets the disabled state. |
java.lang.String |
getDsn()
Gets the data soruce name. |
java.lang.String |
getErrorPage()
Gets the errorPage name. |
java.lang.String |
getName()
Gets the buttons name. |
java.lang.String |
getOnblur()
Gets the onblur javascript event handler. |
java.lang.String |
getOnclick()
Gets the onclick javascript event handler. |
java.lang.String |
getOndblclick()
Gets the onfocus javascript event handler. |
java.lang.String |
getOnfocus()
Gets the onfocus javascript event handler. |
java.lang.String |
getOnkeydown()
Gets the onkeydown javascript event handler. |
java.lang.String |
getOnkeypress()
Gets the onkeypress javascript event handler. |
java.lang.String |
getOnkeyup()
Gets the onkeyup javascript event handler. |
java.lang.String |
getOnmousedown()
Gets the onmousedown javascript event handler. |
java.lang.String |
getOnmousemove()
Gets the onmousemove javascript event handler. |
java.lang.String |
getOnmouseout()
Gets the onmouseout javascript event handler. |
java.lang.String |
getOnmouseover()
Gets the onmouseover javascript event handler. |
java.lang.String |
getOnmouseup()
Gets the onmouseup javascript event handler. |
java.lang.String |
getResponsePage()
Gets the name of the response page. |
java.util.Map<java.lang.String,java.lang.Object> |
getStandardPlaceholdersMap()
Returns a map of the standard action element placeholders |
java.lang.String |
getStyle()
Gets the CSS Style. |
java.lang.String |
getStyleclass()
Gets the CSS style class. |
java.lang.String |
getStyleid()
Gets the CSS Style ID. |
java.lang.String |
getTabindex()
Gets the tab index. |
java.lang.String |
getTitle()
Gets the title attribute. |
java.lang.String |
getValue()
Gets the value attribute. |
boolean |
isShowDisabled()
Controls if the element should be shown when the action is disabled, or not shown at all. |
static java.lang.Boolean |
isXHTMLTag()
|
void |
setAccesskey(java.lang.String accesskey)
Sets the accesskey attribute. |
void |
setAction(java.lang.String action)
Sets the action name. |
void |
setCondition(java.lang.String condition)
Sets the condition attribute. |
void |
setDisabled(boolean disabled)
Sets the disabled attribute. |
void |
setDsn(java.lang.String dsn)
Set the name of the data source this field is a member of. |
void |
setErrorPage(java.lang.String errorPage)
Sets the error page. |
void |
setName(java.lang.String name)
Sets the name attribute. |
void |
setOnblur(java.lang.String onblur)
Sets the onblur attribute. |
void |
setOnclick(java.lang.String onclick)
Sets the onclick attribute. |
void |
setOndblclick(java.lang.String ondblclick)
Sets the ondblclick attribute. |
void |
setOnfocus(java.lang.String onfocus)
Sets the onfocus attribute. |
void |
setOnkeydown(java.lang.String onkeydown)
Sets the onkeydown attribute. |
void |
setOnkeypress(java.lang.String onkeypress)
Sets the onkeypress attribute. |
void |
setOnkeyup(java.lang.String onkeyup)
Sets the onkeyup attribute. |
void |
setOnmousedown(java.lang.String onmousedown)
Sets the onmousedown attribute. |
void |
setOnmousemove(java.lang.String onmousemove)
Sets the onmousemove attribute. |
void |
setOnmouseout(java.lang.String onmouseout)
Sets the onmouseout attribute. |
void |
setOnmouseover(java.lang.String onmouseover)
Sets the onmouseover attribute. |
void |
setOnmouseup(java.lang.String onmouseup)
Sets the onmouseup attribute. |
void |
setResponsePage(java.lang.String responsePage)
Sets the response page. |
void |
setShowDisabled(boolean showDisabled)
Sets the show disabled attribute. |
void |
setStyle(java.lang.String style)
Sets the CSS style attribute. |
void |
setStyleclass(java.lang.String styleclass)
Sets the CSS style class attribute. |
void |
setStyleid(java.lang.String styleid)
Sets the CSS styleid attribute. |
void |
setTabindex(java.lang.String tabindex)
Sets the tabindex attribute. |
void |
setTitle(java.lang.String title)
Sets the title attribute. |
void |
setValue(java.lang.String value)
Sets the value attribute. |
| Methods inherited from class com.taggercat.tags.AbstractExpEvalTag |
|---|
getModel, resolveProperty, setScope, setVar |
| 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 |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractDataSourceActionTag()
| Method Detail |
|---|
public void addBaseAttributes(HTMLTagBuilder htmlTag)
htmlTag - the html tag to add topublic void addBaseEnabledAttributes(HTMLTagBuilder htmlTag)
htmlTag - the html tag to the enabled attributes to
public int doEndTag()
throws javax.servlet.jsp.JspException
doEndTag in interface javax.servlet.jsp.tagext.TagdoEndTag in class AbstractExpEvalTagjavax.servlet.jsp.JspException
public int doStartTag()
throws javax.servlet.jsp.JspException
onClick="dsOperation(this.form, '{0}','{1}', '/order_detail.jsp', '/error_general.jsp');"
The generated onClick method will be:
onClick="dsOperation(this.form, 'orderitems','insert', '/order_detail.jsp', '/error_general.jsp');"
The button will be enabled based on the following validation checks:
Known actions are:
There are four placeholders that you can use in your onClick handler. They are:
doStartTag in interface javax.servlet.jsp.tagext.TagdoStartTag in class AbstractExpEvalTagjavax.servlet.jsp.JspException
public java.util.Map<java.lang.String,java.lang.Object> getStandardPlaceholdersMap()
public java.lang.String getAccesskey()
public java.lang.String getAction()
public java.lang.String getCondition()
public boolean getDisabled()
public java.lang.String getDsn()
public java.lang.String getErrorPage()
public java.lang.String getName()
public java.lang.String getOnblur()
public java.lang.String getOnclick()
public java.lang.String getOndblclick()
public java.lang.String getOnfocus()
public java.lang.String getOnkeydown()
public java.lang.String getOnkeypress()
public java.lang.String getOnkeyup()
public java.lang.String getOnmousedown()
public java.lang.String getOnmousemove()
public java.lang.String getOnmouseout()
public java.lang.String getOnmouseover()
public java.lang.String getOnmouseup()
public java.lang.String getResponsePage()
public java.lang.String getStyle()
public java.lang.String getStyleclass()
public java.lang.String getStyleid()
public java.lang.String getTabindex()
public java.lang.String getTitle()
public java.lang.String getValue()
public boolean isShowDisabled()
public void setAccesskey(java.lang.String accesskey)
accesskey - the new accesskey valuepublic void setAction(java.lang.String action)
action - The action namepublic void setCondition(java.lang.String condition)
condition - the new condition valuepublic void setDisabled(boolean disabled)
disabled - the new disabled valuepublic void setDsn(java.lang.String dsn)
dsn - the data source namepublic void setErrorPage(java.lang.String errorPage)
errorPage - the resulting errorPage pagepublic void setName(java.lang.String name)
name - the new name valuepublic void setOnblur(java.lang.String onblur)
onblur - the new onblur valuepublic void setOnclick(java.lang.String onclick)
onclick - the new onclick valuepublic void setOndblclick(java.lang.String ondblclick)
ondblclick - the new ondblclick valuepublic void setOnfocus(java.lang.String onfocus)
onfocus - the new onfocus valuepublic void setOnkeydown(java.lang.String onkeydown)
onkeydown - the new onkeydown valuepublic void setOnkeypress(java.lang.String onkeypress)
onkeypress - the new onkeypress valuepublic void setOnkeyup(java.lang.String onkeyup)
onkeyup - the new onkeyup valuepublic void setOnmousedown(java.lang.String onmousedown)
onmousedown - the new onmousedown valuepublic void setOnmousemove(java.lang.String onmousemove)
onmousemove - the new onmousemove valuepublic void setOnmouseout(java.lang.String onmouseout)
onmouseout - the new onmouseout valuepublic void setOnmouseover(java.lang.String onmouseover)
onmouseover - the new onmouseover valuepublic void setOnmouseup(java.lang.String onmouseup)
onmouseup - the new onmouseup valuepublic void setResponsePage(java.lang.String responsePage)
responsePage - the resulting response page, usually the current pagepublic void setShowDisabled(boolean showDisabled)
showDisabled - the new disabled valuepublic void setStyle(java.lang.String style)
style - the new style valuepublic void setStyleclass(java.lang.String styleclass)
styleclass - the new styleclass valuepublic void setStyleid(java.lang.String styleid)
styleid - the new styleid valuepublic void setTabindex(java.lang.String tabindex)
tabindex - the new tabindex valuepublic void setTitle(java.lang.String title)
title - the new title valuepublic void setValue(java.lang.String value)
setValue in class AbstractExpEvalTagvalue - the new valuepublic static java.lang.Boolean isXHTMLTag()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||