|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.jsp.tagext.TagSupport net.sf.basedb.clients.web.taglib.Select
public class Select
This tag is used to display a selection list of items. The list can be linked to a selection popup and has options for the current item and recently used items.
Example:
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> <base:select id="protocol" required="false" current="<%=currentProtocol%>" denied="false" recent="<%=recentProtocols%>" onselect="selectProtocolOnClick()" />
Syntax:
<base:select id=... clazz=... style=... required=true|false current=... denied=true|false recent=... selectrecent=true|false defaultitem=... selectdefault=true|false onselect=... onchange=... newitem=true|false visible=true|false disabled=true|false >
Attribute | Default value | Required | Description |
id | - | yes | The ID of the selection list. The value of this attribute
goes directly into the standard name attribute of a <select>
tag.
|
clazz | no |
The value if this attribute goes directly into the standard HTML
class attribute. This allows you to apply different styles
to different selection lists.
|
|
style | - | no |
The value if this attribute goes directly into the standard HTML
style attribute. This allows you to apply different styles
to different selection lists.
|
required | false | no |
If a value must be selected or not. If FALSE is specified
the option - none - will be included.
|
current | null | yes | The current item that is selected. It should be a BasicItem . |
denied | false | no | If null is passed as the current item, this parameter should be TRUE if the reason is that the logged in user is denied read access, FALSE otherwise. |
recent | no | A list of recently used items. The should be of the same type as the current item. | |
selectrecent | true | no | If no current has been specified and it is a new item then, if this parameter is TRUE the first recently used value is selected. If this parameter is FALSE, no item is selected. |
defaultitem | no | Default value set e.g. for a project. | |
selectdefault | true | no | If no current or recent has been specified and it is a new item then, if this parameter is TRUE the default value is selected. If this parameter is FALSE, no item is selected. |
onchange | no | A javascript statement that is executed when the another item in the list is selected. | |
onselect | no |
If specified, a Select button is added and
linked to this javascript call.
|
|
newitem | false | no | If the parent item is a new item or an already saved item. This affects the ID of the current item that is used in the list. For existing values the ID is negative, which means that the link doesn't have to change unless another item is selected. |
visible | true | no | If the selection list should be visible or not. |
disabled | false | no | If the selection list should be enabled or not. |
Field Summary | |
---|---|
private String |
clazz
Optional class attribute |
private BasicItem |
current
The currently selected item. |
private BasicItem |
defaultitem
The project default value |
private boolean |
denied
If the logged in user was denied access to the current item. |
private boolean |
disabled
If the selection list should be enabled or not. |
private boolean |
newItem
If the link is from a new item or an old item. |
private String |
onChange
JavaScript statement. |
private String |
onSelect
JavaScript statement. |
private List<? extends BasicItem> |
recent
List of recently used items. |
private boolean |
required
If a value is required or not. |
private boolean |
selectdefault
If the default item should be selected for new items with no current or recently used items. |
private boolean |
selectRecent
If we can select the most recently used item for new items with nu current item. |
private static long |
serialVersionUID
|
private String |
style
Optional style attribute |
private boolean |
tryGetDirectoryPath
|
private String |
unselectedText
Text to display that for the "unselected" option |
private boolean |
visible
If the select list should be visible or not. |
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 | |
---|---|
Select()
|
Method Summary | |
---|---|
int |
doStartTag()
|
String |
getClazz()
|
BasicItem |
getCurrent()
|
BasicItem |
getDefaultitem()
|
private String |
getName(BasicItem item)
|
String |
getOnchange()
|
String |
getOnselect()
|
List<? extends BasicItem> |
getRecent()
|
boolean |
getSelectdefault()
|
boolean |
getSelectrecent()
|
String |
getStyle()
|
String |
getUnselectedtext()
|
boolean |
isDenied()
|
boolean |
isDisabled()
|
boolean |
isNewitem()
|
boolean |
isRequired()
|
boolean |
isVisible()
|
void |
setClazz(String clazz)
|
void |
setCurrent(BasicItem current)
|
void |
setDefaultitem(BasicItem defaultitem)
|
void |
setDenied(boolean denied)
|
void |
setDisabled(boolean disabled)
|
void |
setNewitem(boolean newItem)
|
void |
setOnchange(String onChange)
|
void |
setOnselect(String onSelect)
|
void |
setRecent(List<? extends BasicItem> recent)
|
void |
setRequired(boolean required)
|
void |
setSelectdefault(boolean selectdefault)
|
void |
setSelectrecent(boolean selectRecent)
|
void |
setStyle(String style)
|
void |
setUnselectedtext(String unselectedText)
|
void |
setVisible(boolean visible)
|
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
doAfterBody, doEndTag, 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, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private String clazz
class
attribute
private String style
style
attribute
private boolean required
private transient BasicItem current
private boolean denied
private transient List<? extends BasicItem> recent
private boolean selectRecent
private transient BasicItem defaultitem
private boolean selectdefault
private String onChange
private String onSelect
private boolean newItem
private boolean visible
private boolean disabled
private String unselectedText
private boolean tryGetDirectoryPath
Constructor Detail |
---|
public Select()
Method Detail |
---|
public void setClazz(String clazz)
public String getClazz()
public void setStyle(String style)
public String getStyle()
public void setRequired(boolean required)
public boolean isRequired()
public void setCurrent(BasicItem current)
public BasicItem getCurrent()
public void setDenied(boolean denied)
public boolean isDenied()
public void setRecent(List<? extends BasicItem> recent)
public List<? extends BasicItem> getRecent()
public void setSelectrecent(boolean selectRecent)
public boolean getSelectrecent()
public void setDefaultitem(BasicItem defaultitem)
public BasicItem getDefaultitem()
public void setSelectdefault(boolean selectdefault)
public boolean getSelectdefault()
public void setOnchange(String onChange)
public String getOnchange()
public void setOnselect(String onSelect)
public String getOnselect()
public void setNewitem(boolean newItem)
public boolean isNewitem()
public void setVisible(boolean visible)
public boolean isVisible()
public void setDisabled(boolean disabled)
public boolean isDisabled()
public void setUnselectedtext(String unselectedText)
public String getUnselectedtext()
public int doStartTag() throws JspException
doStartTag
in interface Tag
doStartTag
in class TagSupport
JspException
private String getName(BasicItem item)
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |