|
||||||||||
| 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.DataSourceOptionListTag
public class DataSourceOptionListTag
This tag creates an option list that is filled from a Datasource rather than from a application code table. The data source is filterable, and can be any data source that is defined in the user's model object.
The condition filter for the data source can be any valid expression supported by the expression evaluator. After the option list is completed, and a selected tcEntity is set, the data source cursor is then set to the selected item's tcEntity. You can later use this selected value in subsequent expressions.<select name="Part Selection" style="WIDTH:120px" > <tc:dsOptionList dsn='partType' displayField='type' codeField='typeID' selectedFK='orderitem.partId' condition='partType.typeID NE 12' /> </select>Example with QBF field.
<select name='employees.qbf.EmpType' style='WIDTH:120px'>
<tc:dsOptionList dsn='employeeType' codeField='id' displayField='name'
emptyItem='true'
selected='employees.qbf.EmpTypeId'/>
</select>
Example with option groups.
![]() |
![]() |
| 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 | |
|---|---|
DataSourceOptionListTag()
|
|
| Method Summary | |
|---|---|
int |
doEndTag()
Resets the tags internal state. |
int |
doStartTag()
Creates and the option list tags and sends them to the page. |
java.lang.String |
getCodeField()
Gets the sources data source name. |
java.lang.String |
getDisplayField()
Gets the name of the display field. |
java.lang.String |
getDsn()
Gets the sources data source name. |
java.lang.String |
getFilter()
Gets the filter expression string. |
java.lang.String |
getSelected()
Gets the selected item. |
java.lang.String |
getSelectedFK()
Gets the selectedFK attribute. |
java.lang.String |
getSelectedStyleclass()
Gets the CSS style class to be used to selected items in the option list. |
java.lang.String |
getStyleclass()
Gets the CSS style class to be used to items in the option list. |
void |
setCodeField(java.lang.String codeField)
Sets the code Field name attribute option items. |
void |
setCondition(java.lang.String expression)
Sets the condition filter to be applied to source data source. |
void |
setDisplayField(java.lang.String displayField)
Sets the display field name attribute for the option items. |
void |
setDsn(java.lang.String dsn)
Set the name of the source data source used to fill the option list. |
void |
setEmptyItem(boolean emptyItem)
Set to true to add an empty item to the option list. |
void |
setSelected(java.lang.String selected)
Sets the selected attribute. |
void |
setSelectedFK(java.lang.String selectedFK)
Sets the selectedFK attribute. |
void |
setSelectedStyleclass(java.lang.String selectedStyleclass)
Sets the CSS style class to be used to selected items in the option list. |
void |
setStyleclass(java.lang.String styleclass)
Sets the CSS style class to be used to items in the option list. |
void |
setTitleProperty(java.lang.String titleProperty)
|
java.lang.String |
toString()
A string representation of this tag's attributes. |
| Methods inherited from class com.taggercat.tags.AbstractExpEvalTag |
|---|
getModel, resolveProperty, setScope, setValue, 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, wait, wait, wait |
| Constructor Detail |
|---|
public DataSourceOptionListTag()
| Method Detail |
|---|
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
doStartTag in interface javax.servlet.jsp.tagext.TagdoStartTag in class AbstractExpEvalTagjavax.servlet.jsp.JspException
public java.lang.String getCodeField()
public java.lang.String getDisplayField()
public java.lang.String getDsn()
public java.lang.String getFilter()
public java.lang.String getSelected()
public java.lang.String getSelectedFK()
public java.lang.String getSelectedStyleclass()
public java.lang.String getStyleclass()
public void setEmptyItem(boolean emptyItem)
emptyItem - The new codeField valuepublic void setCodeField(java.lang.String codeField)
codeField - The new codeField valuepublic void setCondition(java.lang.String expression)
expression - The filter expressionpublic void setDisplayField(java.lang.String displayField)
displayField - The new displayField valuepublic void setDsn(java.lang.String dsn)
dsn - The name of the source data sourcepublic void setSelected(java.lang.String selected)
selected - The new selected valuepublic void setSelectedFK(java.lang.String selectedFK)
selectedFK - The selectedFK valuepublic void setSelectedStyleclass(java.lang.String selectedStyleclass)
selectedStyleclass - the CSS style class to be used to selected items in the option
list.public void setStyleclass(java.lang.String styleclass)
styleclass - the CSS style class to be used to items in the option listpublic java.lang.String toString()
toString in class java.lang.Objectpublic void setTitleProperty(java.lang.String titleProperty)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||