{{tag>Programmers_Reference Methods IDocumentDataSource_Interface getExpressionValue Index}} ==== getExpressionValue (String) ==== public Object getExpressionValue (String expression) throws Exception This method calculates the value of an expression inside a tag. The expression may be a reference to the object's attribute (attribute path) or a more complicated arithmetic expression. If the expression contains the formatting expression, the result is converted to the specified format; otherwise it is converted to the format specified in the attribute (if a single attribute is used). The [[pr_methods:fillwithdata|fillWithData]] method can use the ''Object.toString ()'' method to convert the result to String and put it in the output document instead of the tag. ===Parameters=== |''expression''|the text of the expression. This is the text that is contained inside a tag (not including the tag symbols)| ===Returns=== The value of the expression - possible types of the Java object are presented in the table of the correspondence between attribute and Java types in the [[docs:3500:appendix_a|Appendix A]]. ''Null'' can be returned if the value is undefined. ===Throws=== An exception if the value cannot be calculated for whatever reason.