public class PropertyValue extends TagSupport
BasicItem
.
Example:
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> <base:propertyvalue item="<%=user%>" property="name" />
Syntax:
<base:propertyvalue item=... property=... href=... tooltip=... >
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. |
Modifier and Type | Field and 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 property
|
private boolean |
enablePropertyLink
A link to the property item or not.
|
private java.lang.Object |
item
The item.
|
private java.lang.String |
nullText
What to show if the value is null.
|
private java.lang.String |
property
The name of the property.
|
private java.lang.String |
ROOT |
private static long |
serialVersionUID |
private java.lang.String |
tooltip
An optional tooltip.
|
id, pageContext
EVAL_BODY_AGAIN
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
Constructor and Description |
---|
PropertyValue() |
Modifier and Type | Method and Description |
---|---|
int |
doStartTag() |
DbControl |
getDbcontrol() |
boolean |
getEnableDownloadLink() |
boolean |
getEnableEditLink() |
boolean |
getEnablePropertyLink() |
java.lang.Object |
getItem() |
java.lang.String |
getNulltext() |
java.lang.String |
getProperty() |
private Metadata.PropertyPath |
getPropertyPath(java.lang.Object item,
java.lang.String path) |
java.lang.String |
getRoot() |
java.lang.String |
getTooltip() |
void |
setDbcontrol(DbControl dc) |
void |
setEnableDownloadLink(boolean enabled) |
void |
setEnableEditLink(boolean enableEditLink) |
void |
setEnablePropertyLink(boolean enabled) |
void |
setItem(java.lang.Object item) |
void |
setNulltext(java.lang.String nullText) |
void |
setProperty(java.lang.String property) |
void |
setTooltip(java.lang.String tooltip) |
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
private static final long serialVersionUID
private transient java.lang.Object item
private transient DbControl dc
private java.lang.String property
private boolean enablePropertyLink
private boolean enableDownloadLink
private java.lang.String tooltip
private boolean enableEditLink
private java.lang.String nullText
private java.lang.String ROOT
public void setDbcontrol(DbControl dc)
public DbControl getDbcontrol()
public void setItem(java.lang.Object item)
public java.lang.Object getItem()
public void setProperty(java.lang.String property)
public java.lang.String getProperty()
public void setEnablePropertyLink(boolean enabled)
public boolean getEnablePropertyLink()
public void setEnableDownloadLink(boolean enabled)
public boolean getEnableDownloadLink()
public void setTooltip(java.lang.String tooltip)
public java.lang.String getTooltip()
public void setNulltext(java.lang.String nullText)
public java.lang.String getNulltext()
public void setEnableEditLink(boolean enableEditLink)
public boolean getEnableEditLink()
public java.lang.String getRoot()
private Metadata.PropertyPath getPropertyPath(java.lang.Object item, java.lang.String path)
public int doStartTag() throws JspException
doStartTag
in interface Tag
doStartTag
in class TagSupport
JspException