Package net.sf.basedb.clients.web.taglib
Class PropertyValue
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- net.sf.basedb.clients.web.taglib.PropertyValue
-
- All Implemented Interfaces:
Serializable
,IterationTag
,JspTag
,Tag
public class PropertyValue extends TagSupport
This tag is used to display the property of aBasicItem
.Example:
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> <base:propertyvalue item="<%=user%>" property="name" />
Syntax:
<base:propertyvalue item=... property=... href=... tooltip=... >
Tag attributes Attribute Default value Required Description item - yes The BasicItem
object to get the property from.property - yes The name of the property. See [@link Metadata#getPropertyValue(BasicItem,String)} for a description. style - no The value if this attribute goes directly into the standard HTML style
attribute. This allows you to apply different styles to different buttons.href - no If supplied, the text will be linked to the specified URL. tooltip no A short explanation that will show up as a tooltip. - Version:
- 2.0
- Author:
- Nicklas
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private DbControl
dc
A DbControl object.private boolean
enableDownloadLink
Use for files only, if the view/download link should be enabled or not.private boolean
enableEditLink
Possible to open an edit popup or not with the linked propertyprivate boolean
enablePropertyLink
A link to the property item or not.private Object
item
The item.private String
nullText
What to show if the value is null.private String
property
The name of the property.private String
ROOT
private static long
serialVersionUID
private String
tooltip
An optional tooltip.-
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
-
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
Constructors Constructor Description PropertyValue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
doStartTag()
DbControl
getDbcontrol()
boolean
getEnableDownloadLink()
boolean
getEnableEditLink()
boolean
getEnablePropertyLink()
Object
getItem()
String
getNulltext()
String
getProperty()
private Metadata.PropertyPath
getPropertyPath(Object item, String path)
String
getRoot()
String
getTooltip()
void
setDbcontrol(DbControl dc)
void
setEnableDownloadLink(boolean enabled)
void
setEnableEditLink(boolean enableEditLink)
void
setEnablePropertyLink(boolean enabled)
void
setItem(Object item)
void
setNulltext(String nullText)
void
setProperty(String property)
void
setTooltip(String tooltip)
-
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
item
private transient Object item
The item. Should be BasicItem or BasicData.
-
dc
private transient DbControl dc
A DbControl object.
-
property
private String property
The name of the property.
-
enablePropertyLink
private boolean enablePropertyLink
A link to the property item or not.
-
enableDownloadLink
private boolean enableDownloadLink
Use for files only, if the view/download link should be enabled or not.
-
tooltip
private String tooltip
An optional tooltip.
-
enableEditLink
private boolean enableEditLink
Possible to open an edit popup or not with the linked property
-
nullText
private String nullText
What to show if the value is null.
-
ROOT
private String ROOT
-
-
Method Detail
-
setDbcontrol
public void setDbcontrol(DbControl dc)
-
getDbcontrol
public DbControl getDbcontrol()
-
setItem
public void setItem(Object item)
-
getItem
public Object getItem()
-
setProperty
public void setProperty(String property)
-
getProperty
public String getProperty()
-
setEnablePropertyLink
public void setEnablePropertyLink(boolean enabled)
-
getEnablePropertyLink
public boolean getEnablePropertyLink()
-
setEnableDownloadLink
public void setEnableDownloadLink(boolean enabled)
-
getEnableDownloadLink
public boolean getEnableDownloadLink()
-
setTooltip
public void setTooltip(String tooltip)
-
getTooltip
public String getTooltip()
-
setNulltext
public void setNulltext(String nullText)
-
getNulltext
public String getNulltext()
-
setEnableEditLink
public void setEnableEditLink(boolean enableEditLink)
-
getEnableEditLink
public boolean getEnableEditLink()
-
getRoot
public String getRoot()
-
getPropertyPath
private Metadata.PropertyPath getPropertyPath(Object item, String path)
-
doStartTag
public int doStartTag() throws JspException
- Specified by:
doStartTag
in interfaceTag
- Overrides:
doStartTag
in classTagSupport
- Throws:
JspException
-
-