|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jett.tag.BaseTag
net.sf.jett.tag.FormulaTag
public class FormulaTag
A FormulaTag represents a dynamically generated Excel
Formula. The text attribute contains formula text that may
contain Expressions that are dynamically evaluated. JETT does not verify
that the dynamically generated expression is a valid Excel Formula. A
FormulaTag must be bodiless.
BaseTag.StringStringEither "text" or "bean" must be specified, but not both.
| Field Summary | |
|---|---|
static java.lang.String |
ATTR_BEAN
Attribute that specifies the bean name that contains the Expression string to be evaluated by JETT that results in formula creation in the cell. |
static java.lang.String |
ATTR_IF_ERROR
Attribute that specifies the Expression string to be evaluated by JETT to be used as alternative text in case an Excel error results. |
static java.lang.String |
ATTR_TEXT
Attribute that specifies the Expression string to be evaluated by JETT that results in formula creation in the cell. |
| Fields inherited from class net.sf.jett.tag.BaseTag |
|---|
ATTR_ON_PROCESSED, SPEC_SEP |
| Constructor Summary | |
|---|---|
FormulaTag()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getName()
Returns this Tag's name. |
protected java.util.List<java.lang.String> |
getOptionalAttributes()
Returns a List of optional attribute names. |
protected java.util.List<java.lang.String> |
getRequiredAttributes()
Returns a List of required attribute names. |
boolean |
process()
Evaluate the "text" attribute, and place the resultant text in an Excel Formula. |
void |
validateAttributes()
Validates the attributes for this Tag. |
| Methods inherited from class net.sf.jett.tag.BaseTag |
|---|
checkAttributes, clearBlock, deleteBlock, getAttributes, getContext, getWorkbookContext, isBodiless, processTag, removeBlock, setAttributes, setBodiless, setContext, setWorkbookContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ATTR_BEAN
bean="beanName" => "${beanName}" => "formula".
Then the value is used as the formula expression, i.e. formula =>
"${wins} + ${losses}" => "A2 + B2", which is used as the formula
text. Either "bean" or "text" must be specified, but not both.
public static final java.lang.String ATTR_TEXT
text="${wins} + ${losses}" => "A2 + B2", which is used as
the formula text. Either "bean" or "text" must be specified, but not
both.
public static final java.lang.String ATTR_IF_ERROR
| Constructor Detail |
|---|
public FormulaTag()
| Method Detail |
|---|
public java.lang.String getName()
Tag's name.
Tag's name.protected java.util.List<java.lang.String> getRequiredAttributes()
List of required attribute names.
getRequiredAttributes in class BaseTagList of required attribute names.protected java.util.List<java.lang.String> getOptionalAttributes()
List of optional attribute names.
getOptionalAttributes in class BaseTagList of optional attribute names.
public void validateAttributes()
throws TagParseException
Tag. This tag must be
bodiless.
validateAttributes in class BaseTagTagParseException - If the attribute values are illegal or
unacceptable.public boolean process()
Evaluate the "text" attribute, and place the resultant text in an Excel Formula. If the "ifError" attribute is supplied, then wrap the formula in an "IF(ISERROR(formula), ifError, formula)" formula.
process in class BaseTagCell in the Block
associated with this Tag was processed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||