Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/sql/SQLSupport.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/sql/SQLSupport.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/sql/SQLSupport.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/sql/SQLSupport.java Tue Apr 12 17:09:46 2005 @@ -70,7 +70,7 @@ } public static SQLSupport getInstance(DatabaseMetaData databaseMetaData) - throws SQLException { + throws SQLException { SQLSupportConfig config = SQLSupportConfigFactory.getInstance(databaseMetaData); return getInstance(config); } @@ -129,7 +129,7 @@ } public static final FilterOperation mapFilterAbbreviationToOperation(String abbrev) { - for (int i = 0; i < FILTER_OPERATIONS.length; i++) { + for(int i = 0; i < FILTER_OPERATIONS.length; i++) { FilterOperation fOp = FILTER_OPERATIONS[i]; if(fOp.getAbbreviation().equals(abbrev)) return fOp; @@ -138,7 +138,7 @@ } public static final FilterOperation mapFilterHintToOperation(FilterOperationHint hint) { - for (int i = 0; i < FILTER_OPERATIONS.length; i++) { + for(int i = 0; i < FILTER_OPERATIONS.length; i++) { FilterOperation op = FILTER_OPERATIONS[i]; if(op.getOperationHint().equals(hint)) return op; @@ -149,7 +149,8 @@ private SQLSupportConfig _config = null; /* non-public constructor */ - private SQLSupport() {} + private SQLSupport() { + } public void configure(SQLSupportConfig config) { _config = config; @@ -195,7 +196,7 @@ private void internalCreateOrderByFragment(InternalStringBuilder sql, List/*<Sort>*/ sorts) { for(int i = 0; i < sorts.size(); i++) { - Sort sort = (Sort) sorts.get(i); + Sort sort = (Sort)sorts.get(i); if(i > 0) sql.append(", "); sql.append(sort.getSortExpression()); @@ -207,7 +208,7 @@ private void internalCreateWhereFragment(InternalStringBuilder sql, List/*<Filter>*/ filters) { for(int i = 0; i < filters.size(); i++) { - Filter filter = (Filter) filters.get(i); + Filter filter = (Filter)filters.get(i); if(filter == null) continue; @@ -224,7 +225,7 @@ } if(fOp == null) { - String message = Bundle.getErrorString("DataGridFilter_NoFilterOperation", new Object[] {filter.getFilterExpression()}); + String message = Bundle.getErrorString("DataGridFilter_NoFilterOperation", new Object[]{filter.getFilterExpression()}); LOGGER.error(message); throw new IllegalFilterException(message); } @@ -233,13 +234,13 @@ if(i > 0) sql.append(" AND "); - if (filter.getValue() == null) { - if (fOpHint == FilterOperationHint.EQUAL) { + if(filter.getValue() == null) { + if(fOpHint == FilterOperationHint.EQUAL) { sql.append("("); sql.append(fExpr); sql.append(" IS NULL)"); } - else if (fOpHint == FilterOperationHint.NOT_EQUAL) { + else if(fOpHint == FilterOperationHint.NOT_EQUAL) { sql.append("("); sql.append(fExpr); sql.append(" IS NOT NULL)"); @@ -297,7 +298,8 @@ Object[] arr; if(filter.getValue().getClass().isArray()) arr = (Object[])filter.getValue(); - else arr = new Object[]{filter.getValue()}; + else + arr = new Object[]{filter.getValue()}; if(arr.length == 0) break; @@ -316,7 +318,7 @@ break; } default: - throw new IllegalFilterException(Bundle.getErrorString("DataGridFilter_UnknownFilterOperation", new Object[] {fOp})); + throw new IllegalFilterException(Bundle.getErrorString("DataGridFilter_UnknownFilterOperation", new Object[]{fOp})); } } } @@ -336,24 +338,33 @@ private String convertSQLString(Object o) { if(o == null) return EMPTY; - else return (o.toString()).replaceAll("'", "''"); + else + return (o.toString()).replaceAll("'", "''"); } private void addParameter(InternalStringBuilder sql, Object value, FilterTypeHint typeHint) { if(typeHint == FilterTypeHint.STRING) sql.append(_config.getQuoteChar()).append(value).append(_config.getQuoteChar()); - else sql.append(value); + else + sql.append(value); } private String lookupOperator(FilterOperationHint op) { switch(op.getValue()) { - case FilterOperationHint.INT_EQUAL: return "="; - case FilterOperationHint.INT_NOT_EQUAL: return "!="; - case FilterOperationHint.INT_GREATER_THAN: return ">"; - case FilterOperationHint.INT_LESS_THAN: return "<"; - case FilterOperationHint.INT_GREATER_THAN_OR_EQUAL: return ">="; - case FilterOperationHint.INT_LESS_THAN_OR_EQUAL : return "<="; - default: assert false : "lookupOperation received an invalid FilterOperation: " + op; + case FilterOperationHint.INT_EQUAL: + return "="; + case FilterOperationHint.INT_NOT_EQUAL: + return "!="; + case FilterOperationHint.INT_GREATER_THAN: + return ">"; + case FilterOperationHint.INT_LESS_THAN: + return "<"; + case FilterOperationHint.INT_GREATER_THAN_OR_EQUAL: + return ">="; + case FilterOperationHint.INT_LESS_THAN_OR_EQUAL: + return "<="; + default: + assert false : "lookupOperation received an invalid FilterOperation: " + op; } return null;
Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/sql/SQLSupportConfigFactory.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/sql/SQLSupportConfigFactory.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/sql/SQLSupportConfigFactory.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/sql/SQLSupportConfigFactory.java Tue Apr 12 17:09:46 2005 @@ -30,7 +30,7 @@ } public static final SQLSupportConfig getInstance(DatabaseMetaData databaseMetaData) - throws SQLException { + throws SQLException { SQLSupportConfig config = new DatabaseMetaDataSQLSupportConfig(databaseMetaData); return config; } Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/util/ExtensionUtil.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/util/ExtensionUtil.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/util/ExtensionUtil.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/util/ExtensionUtil.java Tue Apr 12 17:09:46 2005 @@ -28,14 +28,16 @@ private static final Logger LOGGER = Logger.getInstance(ExtensionUtil.class); - private ExtensionUtil() {} + private ExtensionUtil() { + } /** * Utility method that helps instantiate a class used to extend the data grid. * * @param className the name of a class to instantiate * @return an instance of the given class - * @throws org.apache.beehive.netui.databinding.datagrid.api.exceptions.DataGridExtensionException when an error occurs creating an instance of the class + * @throws org.apache.beehive.netui.databinding.datagrid.api.exceptions.DataGridExtensionException + * when an error occurs creating an instance of the class */ public static final Object instantiateClass(String className, Class assignableFrom) { if(className == null) @@ -47,10 +49,10 @@ } catch(Exception e) { assert e instanceof IllegalAccessException || - e instanceof InstantiationException || - e instanceof ClassNotFoundException : "Caught exception of unexpected type: " + e.getClass().getName(); + e instanceof InstantiationException || + e instanceof ClassNotFoundException : "Caught exception of unexpected type: " + e.getClass().getName(); - String msg = Bundle.getErrorString("DataGridUtil_CantInstantiateClass", new Object[] {e}); + String msg = Bundle.getErrorString("DataGridUtil_CantInstantiateClass", new Object[]{e}); LOGGER.error(msg, e); throw new DataGridExtensionException(msg, e); } @@ -63,7 +65,8 @@ * * @param clazz the name of a class to instantiate * @return an instance of the given class - * @throws org.apache.beehive.netui.databinding.datagrid.api.exceptions.DataGridExtensionException when an error occurs creating an instance of the class + * @throws org.apache.beehive.netui.databinding.datagrid.api.exceptions.DataGridExtensionException + * when an error occurs creating an instance of the class */ public static final Object instantiateClass(Class clazz, Class assignableFrom) { if(clazz == null) @@ -74,16 +77,17 @@ if(assignableFrom == null || assignableFrom.isAssignableFrom(clazz)) return obj; - else throw new DataGridExtensionException(Bundle.getErrorString("DataGridUtil_InvalidParentClass", new Object[] {clazz.getName(), assignableFrom})); + else + throw new DataGridExtensionException(Bundle.getErrorString("DataGridUtil_InvalidParentClass", new Object[]{clazz.getName(), assignableFrom})); } catch(Exception e) { assert - e instanceof DataGridExtensionException || - e instanceof IllegalAccessException || - e instanceof InstantiationException || - e instanceof ClassNotFoundException : "Caught exception of unexpected type " + e.getClass().getName(); + e instanceof DataGridExtensionException || + e instanceof IllegalAccessException || + e instanceof InstantiationException || + e instanceof ClassNotFoundException : "Caught exception of unexpected type " + e.getClass().getName(); - String msg = Bundle.getErrorString("DataGridUtil_CantInstantiateClass", new Object[] {e}); + String msg = Bundle.getErrorString("DataGridUtil_CantInstantiateClass", new Object[]{e}); LOGGER.error(msg, e); throw new DataGridExtensionException(msg, e); } Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/util/JspFunctions.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/util/JspFunctions.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/util/JspFunctions.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/util/JspFunctions.java Tue Apr 12 17:09:46 2005 @@ -43,16 +43,15 @@ DEFAULT_FILTER_LIST.add(DEFAULT_FILTER); } - private JspFunctions() {} + private JspFunctions() { + } /** - * * @param sortModel * @param sortExpression * @return - * @netui:jspfunction - * name="isSortedAscending" - * signature="boolean isSortedAscending(org.apache.beehive.netui.databinding.datagrid.api.sort.SortModel,java.lang.String)" + * @netui:jspfunction name="isSortedAscending" + * signature="boolean isSortedAscending(org.apache.beehive.netui.databinding.datagrid.api.sort.SortModel,java.lang.String)" */ public static boolean isSortedAscending(SortModel sortModel, String sortExpression) { if(sortModel == null || sortExpression == null) @@ -65,13 +64,11 @@ } /** - * * @param sortModel * @param sortExpression * @return - * @netui:jspfunction - * name="isSortedDescending" - * signature="boolean isSortedDescending(org.apache.beehive.netui.databinding.datagrid.api.sort.SortModel,java.lang.String)" + * @netui:jspfunction name="isSortedDescending" + * signature="boolean isSortedDescending(org.apache.beehive.netui.databinding.datagrid.api.sort.SortModel,java.lang.String)" */ public static boolean isSortedDescending(SortModel sortModel, String sortExpression) { if(sortModel == null || sortExpression == null) @@ -84,13 +81,11 @@ } /** - * * @param urlBuilder * @param sortExpression * @return - * @netui:jspfunction - * name="buildQueryParamsMapForSortExpression" - * signature="java.util.Map buildQueryParamsMapForSortExpression(org.apache.beehive.netui.databinding.datagrid.api.DataGridURLBuilder,java.lang.String)" + * @netui:jspfunction name="buildQueryParamsMapForSortExpression" + * signature="java.util.Map buildQueryParamsMapForSortExpression(org.apache.beehive.netui.databinding.datagrid.api.DataGridURLBuilder,java.lang.String)" */ public static Map buildQueryParamsMapForSortExpression(DataGridURLBuilder urlBuilder, String sortExpression) { if(urlBuilder == null || sortExpression == null) @@ -108,10 +103,10 @@ * @param jspContext * @param attrName * @netui:jspfunction name="ensureFilters" - * signature="void ensureFilters(javax.servlet.jsp.JspContext,java.lang.String)" + * signature="void ensureFilters(javax.servlet.jsp.JspContext,java.lang.String)" */ public static void ensureFilters(JspContext jspContext, String attrName) { - List/*<Filter>*/ filters = (List/*<Filter>*/)jspContext.getAttribute("filters"); + List/*<Filter>*/ filters = (List /*<Filter>*/)jspContext.getAttribute("filters"); List/*<Filter>*/ pcFilters = new ArrayList/*<Filter>*/(); if(filters == null || filters.size() == 0) Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/util/JspUtil.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/util/JspUtil.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/util/JspUtil.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/util/JspUtil.java Tue Apr 12 17:09:46 2005 @@ -45,12 +45,13 @@ public static final PageContext getPageContext(JspContext jspContext) { if(!(jspContext instanceof PageContext)) - throw new IllegalStateException(Bundle.getErrorString("DataGridUtil_IllegalJspContext", new Object[] {(jspContext != null ? jspContext.getClass().getName() : "null")})); - else return (PageContext)jspContext; + throw new IllegalStateException(Bundle.getErrorString("DataGridUtil_IllegalJspContext", new Object[]{(jspContext != null ? jspContext.getClass().getName() : "null")})); + else + return (PageContext)jspContext; } public static final String createURL(String href, String action, String location, String scope, Map params, JspContext jspContext) - throws URISyntaxException { + throws URISyntaxException { PageContext pageContext = getPageContext(jspContext); /* add the jpfScopeID parameter, if the scope attribute is present. */ @@ -66,7 +67,8 @@ uri = PageFlowTagUtils.rewriteActionURL(pageContext, action, params, location); else if(href != null) uri = PageFlowTagUtils.rewriteHrefURL(pageContext, href, params, location); - else return ((HttpServletRequest)pageContext.getRequest()).getPathTranslated(); + else + return ((HttpServletRequest)pageContext.getRequest()).getPathTranslated(); assert uri != null; @@ -77,9 +79,10 @@ /* todo: need to combine this with the getLocale(...) call in AbstractClassicTag */ public static final Locale getLocale(JspContext jspContext) { PageContext pageContext = getPageContext(jspContext); - Locale userLocale = (Locale) pageContext.getAttribute(Globals.LOCALE_KEY, PageContext.SESSION_SCOPE); - if (userLocale == null) + Locale userLocale = (Locale)pageContext.getAttribute(Globals.LOCALE_KEY, PageContext.SESSION_SCOPE); + if(userLocale == null) return pageContext.getRequest().getLocale(); - else return userLocale; + else + return userLocale; } } Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/util/PagedDataSet.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/util/PagedDataSet.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/util/PagedDataSet.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/databinding/datagrid/runtime/util/PagedDataSet.java Tue Apr 12 17:09:46 2005 @@ -27,7 +27,7 @@ * */ public final class PagedDataSet - implements Iterator { + implements Iterator { private static final Logger LOGGER = Logger.getInstance(PagedDataSet.class); @@ -76,9 +76,10 @@ _currentIndex++; } _advancedToPage = true; - } else if(_endWindow > -1 && (_currentIndex >= _endWindow)) { - LOGGER.debug("current index: " + _currentIndex + " _endRenderWindiw: " + - _endWindow + " end data set: " + (_currentIndex >= _endWindow)); + } + else if(_endWindow > -1 && (_currentIndex >= _endWindow)) { + LOGGER.debug("current index: " + _currentIndex + " _endRenderWindiw: " + + _endWindow + " end data set: " + (_currentIndex >= _endWindow)); return false; } Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/bundle/DeclareBundle.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/bundle/DeclareBundle.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/bundle/DeclareBundle.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/bundle/DeclareBundle.java Tue Apr 12 17:09:46 2005 @@ -41,7 +41,7 @@ * properties file name of <code>WebAppMessages</code>. The naming conventions for properties can be found * in [EMAIL PROTECTED] java.util.ResourceBundle#getBundle(String, Locale, ClassLoader)}. These files must be located * in a classpath that is available to the web application; often, this is WEB-INF/classes. - * If the properties file contains a key called <code>helloWorld</code>, + * If the properties file contains a key called <code>helloWorld</code>, * then the expression <code>{bundle.someMessages.helloWorld}</code> * would be look-up the message matching the Locale specified on the tag. Bundle binding expressions can be * used in any expression bindable NetUI tag attribute.</p> @@ -150,8 +150,8 @@ * @netui.tldx:tag renderer="workshop.netui.jspdesigner.tldx.DeclareBundleRenderer" */ public class DeclareBundle - extends AbstractClassicTag - implements TryCatchFinally { + extends AbstractClassicTag + implements TryCatchFinally { private String _name = null; private String _bundlePath = null; @@ -287,7 +287,7 @@ * be reported in the page. */ public int doEndTag() - throws JspException { + throws JspException { if(_name.length() == 0) { String msg = Bundle.getErrorString("Tags_DeclareBundle_invalidName", new Object[]{_name}); @@ -326,7 +326,8 @@ reportErrors(); return EVAL_PAGE; } - else bundleMap = (BundleMap)obj; + else + bundleMap = (BundleMap)obj; bundleMap.registerResourceBundle(_name, _bundlePath, locale); @@ -338,7 +339,7 @@ } public void doCatch(Throwable t) - throws Throwable { + throws Throwable { throw t; } @@ -355,7 +356,7 @@ } private Locale getCurrentLocale() - throws JspException { + throws JspException { if(_language == null && _country == null && _variant == null) return getUserLocale(); Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/cellrepeater/CellRepeater.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/cellrepeater/CellRepeater.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/cellrepeater/CellRepeater.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/cellrepeater/CellRepeater.java Tue Apr 12 17:09:46 2005 @@ -144,8 +144,8 @@ * @netui.tldx:tag renderer="workshop.netui.jspdesigner.tldx.CellRepeaterRenderer" */ public class CellRepeater - extends DataSourceTag - implements IDataAccessProvider, TryCatchFinally { + extends DataSourceTag + implements IDataAccessProvider, TryCatchFinally { private static final Logger LOGGER = Logger.getInstance(CellRepeater.class); private static final int DEFAULT_DIMENSION_VALUE = -1; @@ -366,7 +366,7 @@ * @throws JspException if errors occurred that could not be reported in the page */ public int doStartTag() - throws JspException { + throws JspException { Object source = null; if(getDataSource() != null) source = evaluateDataSource(); @@ -432,7 +432,8 @@ addContent(renderCellTag(_currentColumn + (_currentRow % 2 == 0 ? 0 : 1))); return EVAL_BODY_BUFFERED; - } else { + } + else { // special case -- with no items, render the entire table here for(int i = 0; i < _rows; i++) { addContent(renderRowTag()); @@ -498,7 +499,8 @@ // render empty cell addContent(renderCellTag(computeStyleIndex(_currentRow, _currentColumn))); addContent(" "); - } else { + } + else { addContent(renderCellTag(computeStyleIndex(_currentRow, _currentColumn))); return EVAL_BODY_AGAIN; } @@ -515,10 +517,11 @@ * @throws JspException if an error occurs that can not be reported on the page */ public int doEndTag() - throws JspException { + throws JspException { if(hasErrors()) { reportErrors(); - } else if(_valid) { + } + else if(_valid) { addContent("</table>"); write(getContent()); } @@ -535,7 +538,7 @@ } public void doCatch(Throwable t) - throws Throwable { + throws Throwable { throw t; } @@ -576,7 +579,7 @@ */ public Object getCurrentMetadata() { LocalizedUnsupportedOperationException uoe = - new LocalizedUnsupportedOperationException("The " + getTagName() + "does not export metadata for its iterated items."); + new LocalizedUnsupportedOperationException("The " + getTagName() + "does not export metadata for its iterated items."); uoe.setLocalizedMessage(Bundle.getErrorString("Tags_DataAccessProvider_metadataUnsupported", new Object[]{getTagName()})); throw uoe; } @@ -617,12 +620,12 @@ } private void reportBasicError(String message) - throws JspException { + throws JspException { registerTagError(message, null); } private void guessDimensions(List data) - throws JspException { + throws JspException { if(_rows == 0 || _columns == 0) reportBasicError(Bundle.getString("Tags_CellRepeater_missingRowsOrColumns")); @@ -632,13 +635,15 @@ int dataSize = data.size(); if(_rows == DEFAULT_DIMENSION_VALUE && _columns == DEFAULT_DIMENSION_VALUE) { reportBasicError(Bundle.getString("Tags_CellRepeater_invalidRowOrColumn")); - } else if(_rows == DEFAULT_DIMENSION_VALUE) { + } + else if(_rows == DEFAULT_DIMENSION_VALUE) { int remainder = dataSize % _columns; _rows = (dataSize / _columns) + (remainder > 0 ? 1 : 0); if(LOGGER.isDebugEnabled()) LOGGER.debug("guessed row size: " + _rows); - } else if(_columns == DEFAULT_DIMENSION_VALUE) { + } + else if(_columns == DEFAULT_DIMENSION_VALUE) { int remainder = dataSize % _rows; _columns = (dataSize / _rows) + (remainder > 0 ? 1 : 0); @@ -648,7 +653,7 @@ } private void validateAttributes(int rows, int columns) - throws JspException { + throws JspException { if(rows <= 0) { String msg = Bundle.getString("Tags_CellRepeater_invalidRowValue", new Object[]{getTagName(), new Integer(rows)}); registerTagError(msg, null); @@ -703,12 +708,14 @@ private boolean ensureItem(int index, List data) { if(LOGGER.isDebugEnabled()) LOGGER.debug("item: " + 0 + " data: " + (data == null ? "null data" : - (index < data.size() ? "" + index : "index out of bounds for size " + data.size()))); + (index < data.size() ? "" + index : "index out of bounds for size " + data.size()))); if(data != null && index < data.size()) { _currentItem = data.get(index); _currentIndex = index; return true; - } else return false; + } + else + return false; } } Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/cellrepeater/style/CellRepeaterStyleBean.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/cellrepeater/style/CellRepeaterStyleBean.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/cellrepeater/style/CellRepeaterStyleBean.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/cellrepeater/style/CellRepeaterStyleBean.java Tue Apr 12 17:09:46 2005 @@ -29,7 +29,7 @@ * */ public class CellRepeaterStyleBean - extends AbstractStyleBean { + extends AbstractStyleBean { private String _cellClass = null; private String _alternatingCellClass = null; Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractCell.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractCell.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractCell.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractCell.java Tue Apr 12 17:09:46 2005 @@ -37,8 +37,9 @@ * */ public abstract class AbstractCell - extends AbstractSimpleTag { + extends AbstractSimpleTag { + /* todo: switch onto ConstantRendering.NBSP */ private static final String EMPTY_CELL = " "; public void addFormatter(Formatter formatter) { @@ -58,7 +59,7 @@ * @throws IOException */ public void doTag() - throws JspException, IOException { + throws JspException, IOException { DataGridTagModel dataGridModel = DataGridUtil.getDataGridTagModel(getJspContext()); assert dataGridModel != null; @@ -88,7 +89,8 @@ if(content != null && content.length() > 0) getJspContext().getOut().println(content.toString()); - } finally { + } + finally { DataGridUtil.removeCellModel(getJspContext()); } } @@ -105,11 +107,11 @@ } protected void applyAttributes() - throws JspException { + throws JspException { } protected final void addStateAttribute(AbstractHtmlState state, String name, String value) - throws JspException { + throws JspException { // validate the name attribute, in the case of an error simply return. if(name == null || name.length() <= 0) { @@ -127,7 +129,8 @@ if(name.equals(HtmlConstants.CLASS)) { state.styleClass = value; return; - } else if(name.equals(HtmlConstants.STYLE)) { + } + else if(name.equals(HtmlConstants.STYLE)) { state.style = value; return; } Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractHtmlTableCell.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractHtmlTableCell.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractHtmlTableCell.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AbstractHtmlTableCell.java Tue Apr 12 17:09:46 2005 @@ -39,8 +39,8 @@ * */ public abstract class AbstractHtmlTableCell - extends AbstractCell - implements IAttributeConsumer, IBehaviorConsumer { + extends AbstractCell + implements IAttributeConsumer, IBehaviorConsumer { private String _sortExpression = null; private String _filterExpression = null; @@ -48,8 +48,8 @@ private TdTag.State _cellState = new TdTag.State(); /** - * @netui:attribute required="false" rtexprvalue="true" * @param sortExpression + * @netui:attribute required="false" rtexprvalue="true" * @jsptagref.attributedescription [todo] * @jsptagref.databindable true * @jsptagref.attributesyntaxvalue <i>string</i> @@ -59,8 +59,8 @@ } /** - * @netui:attribute required="false" rtexprvalue="true" * @param filterExpression + * @netui:attribute required="false" rtexprvalue="true" * @jsptagref.attributedescription [todo] * @jsptagref.databindable true * @jsptagref.attributesyntaxvalue <i>string</i> @@ -444,19 +444,19 @@ * @param facet The name of a facet to which the attribute will be applied. This is optional. */ public void setAttribute(String name, String value, String facet) - throws JspException { + throws JspException { String s = Bundle.getString("Tags_AttributeFacetNotSupported", new Object[]{facet}); throw new JspException(s); } public void setBehavior(String name, Object value, String facet) - throws JspException { + throws JspException { String s = Bundle.getString("Tags_BehaviorFacetNotSupported", new Object[]{facet}); throw new JspException(s); } protected void renderCell(AbstractRenderAppender appender) - throws IOException, JspException { + throws IOException, JspException { DataGridTagModel dataGridModel = DataGridUtil.getDataGridTagModel(getJspContext()); assert dataGridModel != null; @@ -476,7 +476,8 @@ if(_cellState.styleClass == null) styleClasses.add(dataGridModel.getStyleModel().getDataCellClass()); - else styleClasses.add(_cellState.styleClass); + else + styleClasses.add(_cellState.styleClass); _cellState.styleClass = dataGridModel.getStyleModel().buildStyleClassValue(styleClasses); @@ -495,5 +496,5 @@ } protected abstract void renderDataCellContents(AbstractRenderAppender appender, String output) - throws IOException, JspException; + throws IOException, JspException; } Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AnchorCell.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AnchorCell.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AnchorCell.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/AnchorCell.java Tue Apr 12 17:09:46 2005 @@ -39,8 +39,8 @@ * renderer="workshop.netui.jspdesigner.tldx.AnchorColumnRenderer" */ public class AnchorCell - extends AbstractHtmlTableCell - implements IFormattable, IUrlParams { + extends AbstractHtmlTableCell + implements IFormattable, IUrlParams { private static final AnchorCellDecorator DECORATOR = new AnchorCellDecorator(); private static final String REQUIRED_ATTR = "href, action, linkName"; @@ -241,6 +241,7 @@ /** * Sets <code>charset</code> attribute for the anchor. + * * @param charSet - the window target. * @jsptagref.attributedescription The character set. * @jsptagref.databindable false @@ -249,13 +250,13 @@ * description="The character set." * @netui.tldx:attribute category="misc" */ - public void setCharSet(String charSet) - { + public void setCharSet(String charSet) { _anchorCellModel.getAnchorState().registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.CHARSET, charSet); } /** * Sets <code>type</code> attribute for the anchor. + * * @param type - the window target. * @jsptagref.attributedescription The type. * @jsptagref.databindable false @@ -264,13 +265,13 @@ * description="The type." * @netui.tldx:attribute category="misc" */ - public void setType(String type) - { + public void setType(String type) { _anchorCellModel.getAnchorState().registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.TYPE, type); } /** * Sets <code>hreflang</code> attribute for the anchor. + * * @param hreflang - the window target. * @jsptagref.attributedescription The HREF lang. * @jsptagref.databindable false @@ -279,13 +280,13 @@ * description="The HREF lang." * @netui.tldx:attribute category="misc" */ - public void setHrefLang(String hreflang) - { + public void setHrefLang(String hreflang) { _anchorCellModel.getAnchorState().registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.HREFLANG, hreflang); } /** * Sets <code>rel</code> attribute for the anchor. + * * @param rel - the window target. * @jsptagref.attributedescription The rel attribute for the anchor. * @jsptagref.databindable false @@ -294,13 +295,13 @@ * description="The rel." * @netui.tldx:attribute category="misc" */ - public void setRel(String rel) - { + public void setRel(String rel) { _anchorCellModel.getAnchorState().registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.REL, rel); } /** * Sets <code>rev</code> attribute for the anchor. + * * @param rev - the window target. * @jsptagref.attributedescription The rev. * @jsptagref.databindable false @@ -309,14 +310,14 @@ * description="The rev." * @netui.tldx:attribute category="misc" */ - public void setRev(String rev) - { + public void setRev(String rev) { _anchorCellModel.getAnchorState().registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.REV, rev); } /** * Sets the window target. + * * @param target - the window target. * @jsptagref.attributedescription The window target. * @jsptagref.databindable false @@ -325,13 +326,13 @@ * description="The window target." * @netui.tldx:attribute category="misc" */ - public void setTarget(String target) - { + public void setTarget(String target) { _anchorCellModel.getAnchorState().registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.TARGET, target); } /** * Sets the href of the Anchor. This attribute will accept the empty String as a legal value. + * * @param href - the hyperlink URI for the Area. * @jsptagref.attributedescription The URL to go to. * @jsptagref.databindable false @@ -348,6 +349,7 @@ /** * Set the target "scope" for the anchor's action. Multiple active page flows may exist concurrently within named * scopes. This attribute selects which named scope to use. If omitted, the default scope is assumed. + * * @param targetScope - the name of the target scope in which the associated action's page flow resides. * @jsptagref.attributedescription The target scope in which the associated action's page flow resides. * @jsptagref.databindable true @@ -369,6 +371,7 @@ /** * Set the name of the action for the Area. + * * @param action - the name of the action to set for the Area. * @jsptagref.attributedescription The action method to invoke. The action method must be in the Controller file * of the Page Flow directory. @@ -379,24 +382,25 @@ * @netui.tldx:attribute reftype="netui-action-url" category="general" */ public void setAction(String action) - throws JspException { + throws JspException { _anchorCellModel.setAction(setRequiredValueAttribute(action, "action")); } public void setAttribute(String name, String value, String facet) - throws JspException { + throws JspException { if(facet == null || facet.equals(ANCHOR_FACET_NAME)) super.addStateAttribute(_anchorState, name, value); - else super.setAttribute(name, value, facet); + else + super.setAttribute(name, value, facet); } public void addParameter(String name, Object value, String facet) - throws JspException { + throws JspException { ParamHelper.addParam(_anchorCellModel.getParams(), name, value); } protected void applyAttributes() - throws JspException { + throws JspException { super.applyAttributes(); int have = 0; @@ -408,7 +412,7 @@ have++; /* todo: allow creation of JavaScript anchors */ - if (have == 0 || have > 1) { + if(have == 0 || have > 1) { String s = Bundle.getString("Tags_Anchor_InvalidAnchorURI", new Object[]{REQUIRED_ATTR}); throw new JspException(s); } Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Caption.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Caption.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Caption.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Caption.java Tue Apr 12 17:09:46 2005 @@ -40,7 +40,7 @@ * @netui.tldx:tag whitespace="indent" renderer="" */ public class Caption - extends AbstractSimpleTag { + extends AbstractSimpleTag { private CaptionTag.State _captionTag = new CaptionTag.State(); @@ -235,7 +235,7 @@ } public void doTag() - throws IOException, JspException { + throws IOException, JspException { JspContext jspContext = getJspContext(); DataGridTagModel dgm = DataGridUtil.getDataGridTagModel(jspContext); Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/ConfigurePager.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/ConfigurePager.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/ConfigurePager.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/ConfigurePager.java Tue Apr 12 17:09:46 2005 @@ -39,7 +39,7 @@ * @netui.tldx:tag renderer="" whitespace="indent" */ public class ConfigurePager - extends AbstractSimpleTag { + extends AbstractSimpleTag { private static final Logger LOGGER = Logger.getInstance(ConfigurePager.class); private static final String PAGER_FORMAT_FIRST_LAST_PREV_NEXT = "firstPrevNextLast"; @@ -114,9 +114,9 @@ * @jsptagref.attributesyntaxvalue <i>string</i> * @netui:attribute required="false" rtexprvalue="true" */ - public void setPagerRendererClass(String pagerRendererClass) { + public void setPagerRendererClass(String pagerRendererClass) { _pagerRendererClass = pagerRendererClass; - } + } /** * @jsptagref.attributedescription Sets the class that renders the pager. @@ -129,7 +129,7 @@ } public void doTag() - throws JspException { + throws JspException { DataGridTagModel dgm = DataGridUtil.getDataGridTagModel(getJspContext()); if(dgm == null) @@ -154,7 +154,7 @@ assert pagerRenderer != null : "Expected a non-null pager renderer of type \"" + _pagerRendererClass + "\""; } catch(DataGridExtensionException e) { - String msg = Bundle.getErrorString("ConfigurePager_CantCreateCustomPagerRenderer", new Object[] {e}); + String msg = Bundle.getErrorString("ConfigurePager_CantCreateCustomPagerRenderer", new Object[]{e}); throw new JspException(msg, e); } } @@ -163,7 +163,8 @@ pagerRenderer = new FirstPreviousNextLastPagerRenderer(); else if(_pagerFormat.equals(PAGER_FORMAT_PREV_NEXT)) pagerRenderer = new PreviousNextPagerRenderer(); - else throw new JspException(Bundle.getErrorString("ConfigurePager_UnsupportedPagerFormat", new Object[] {_pagerFormat})); + else + throw new JspException(Bundle.getErrorString("ConfigurePager_UnsupportedPagerFormat", new Object[]{_pagerFormat})); } if(pagerRenderer != null) Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/DataGrid.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/DataGrid.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/DataGrid.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/DataGrid.java Tue Apr 12 17:09:46 2005 @@ -55,8 +55,8 @@ * @netui.tldx:tag whitespace="indent" renderer="workshop.netui.jspdesigner.tldx.GridRenderer" */ public class DataGrid - extends AbstractSimpleTag - implements IDataAccessProvider, IBehaviorConsumer { + extends AbstractSimpleTag + implements IDataAccessProvider, IBehaviorConsumer { private static final String FACET_RESOURCE = "resource"; @@ -151,17 +151,18 @@ * @throws JspException */ public void setBehavior(String name, Object value, String facet) - throws JspException { + throws JspException { if(facet != null && facet.equals(FACET_RESOURCE)) { _dataGridTagModel.addResourceOverride(name, (value != null ? value.toString() : null)); - } else { + } + else { String s = Bundle.getString("Tags_BehaviorFacetNotSupported", new Object[]{facet}); throw new JspException(s); } } public void doTag() - throws JspException, IOException { + throws JspException, IOException { // ensure the dataSource is a valid expression String dataSource = getDataSource(); @@ -184,7 +185,8 @@ DataGridResourceProvider resourceProvider = null; if(_resourceBundlePath == null) resourceProvider = _dataGridConfig.getDefaultResourceProvider(); - else resourceProvider = _dataGridConfig.getResourceProvider(_resourceBundlePath); + else + resourceProvider = _dataGridConfig.getResourceProvider(_resourceBundlePath); resourceProvider.setLocale(JspUtil.getLocale(jspContext)); _dataGridTagModel = new DataGridTagModel(_name, _dataGridConfig, jspContext); @@ -286,7 +288,8 @@ _dataGridTagModel.changeRenderState(DataGridTagModel.RENDER_STATE_END); write(builder.toString()); - } finally { + } + finally { if(addedDataAccessProvider) { DataAccessProviderStack.removeDataAccessProvider(getJspContext()); DataGridUtil.removeDataGridTagModel(getJspContext()); @@ -311,7 +314,7 @@ public Object getCurrentMetadata() { throw new UnsupportedOperationException(Bundle.getErrorString("Tags_DataAccessProvider_metadataUnsupported", - new Object[] {getTagName()})); + new Object[]{getTagName()})); } public String getDataSource() { Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Footer.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Footer.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Footer.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Footer.java Tue Apr 12 17:09:46 2005 @@ -44,8 +44,8 @@ * @netui.tldx:tag whitespace="indent" renderer=""* */ public class Footer - extends AbstractSimpleTag - implements IHtmlEvents, IHtmlI18n { + extends AbstractSimpleTag + implements IHtmlEvents, IHtmlI18n { private TFootTag.State _tfootTag = new TFootTag.State(); @@ -326,7 +326,7 @@ } public void doTag() - throws IOException, JspException { + throws IOException, JspException { JspContext jspContext = getJspContext(); Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/GetDataGridState.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/GetDataGridState.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/GetDataGridState.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/GetDataGridState.java Tue Apr 12 17:09:46 2005 @@ -31,7 +31,7 @@ * @netui.tldx:tag whitespace="indent" */ public class GetDataGridState - extends AbstractSimpleTag { + extends AbstractSimpleTag { private String _var = null; private String _name = null; @@ -43,7 +43,8 @@ /** * @netui:attribute name="name" -\ */ + * \ + */ public void setGridName(String name) { _name = name; } @@ -57,7 +58,8 @@ /** * @netui:attribute name="name" -\ */ + * \ + */ public void setDataGridConfig(DataGridConfig config) { _config = config; } @@ -69,7 +71,8 @@ DataGridState state = null; if(_config != null) state = factory.getDataGridState(_name, _config); - else state = factory.getDataGridState(_name); + else + state = factory.getDataGridState(_name); jspContext.setAttribute(_var, state); } Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Header.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Header.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Header.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Header.java Tue Apr 12 17:09:46 2005 @@ -45,8 +45,8 @@ * @netui.tldx:tag whitespace="indent" */ public class Header - extends AbstractSimpleTag - implements IHtmlEvents, IHtmlI18n { + extends AbstractSimpleTag + implements IHtmlEvents, IHtmlI18n { private THeadTag.State _theadTag = new THeadTag.State(); @@ -327,7 +327,7 @@ } public void doTag() - throws JspException, IOException { + throws JspException, IOException { JspContext jspContext = getJspContext(); DataGridTagModel dgm = DataGridUtil.getDataGridTagModel(jspContext); Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/HeaderCell.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/HeaderCell.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/HeaderCell.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/HeaderCell.java Tue Apr 12 17:09:46 2005 @@ -49,8 +49,8 @@ * @netui.tldx:tag whitespace="indent" */ public class HeaderCell - extends AbstractCell - implements IFormattable, IBehaviorConsumer, IAttributeConsumer { + extends AbstractCell + implements IFormattable, IBehaviorConsumer, IAttributeConsumer { private static final String TAG_NAME = "HeaderCell"; private static final String ATTRIBUTE_HEADER_NAME = "header"; @@ -253,7 +253,7 @@ * @netui.tldx:attribute propertyclass="workshop.jspdesigner.properties.EventPropertyClass" category="event" */ public void setCellOnMouseUp(String onMouseUp) { - _cellState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONMOUSEUP, onMouseUp); + _cellState.registerAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, HtmlConstants.ONMOUSEUP, onMouseUp); } /** @@ -525,17 +525,18 @@ } public void setBehavior(String name, Object value, String facet) throws JspException { - if (facet != null && facet.equals(BEHAVIOR_RENDERER_NAME)) { + if(facet != null && facet.equals(BEHAVIOR_RENDERER_NAME)) { String className = value != null ? value.toString() : null; /* provides a way to extend the existing decorators */ - CellDecorator cellDecorator = (CellDecorator) ExtensionUtil.instantiateClass(className, CellDecorator.class); - if (name.equals(BEHAVIOR_RENDERER_NAME_EXTENDS)) { + CellDecorator cellDecorator = (CellDecorator)ExtensionUtil.instantiateClass(className, CellDecorator.class); + if(name.equals(BEHAVIOR_RENDERER_NAME_EXTENDS)) { cellDecorator.setNestedDecorator(getCellDecorator()); - } else if (name.equals(BEHAVIOR_RENDERER_NAME_SORT)) { + } + else if(name.equals(BEHAVIOR_RENDERER_NAME_SORT)) { cellDecorator.setNestedDecorator(DECORATOR_HEADER_SORTED); } /* replace the core cell decorator with a new default */ - else if (name.equals(BEHAVIOR_RENDERER_NAME_DEFAULT)) { + else if(name.equals(BEHAVIOR_RENDERER_NAME_DEFAULT)) { /* no-op */ } @@ -552,7 +553,7 @@ } protected void renderCell(AbstractRenderAppender appender) - throws IOException, JspException { + throws IOException, JspException { DataGridTagModel dataGridModel = DataGridUtil.getDataGridTagModel(getJspContext()); assert dataGridModel != null; @@ -576,7 +577,8 @@ if(_cellState.styleClass == null) styleClasses.add(dataGridModel.getStyleModel().getHeaderCellClass()); - else styleClasses.add(_cellState.styleClass); + else + styleClasses.add(_cellState.styleClass); _cellState.styleClass = dataGridModel.getStyleModel().buildStyleClassValue(styleClasses); @@ -586,7 +588,7 @@ } protected void renderHeaderCellContents(AbstractRenderAppender appender) - throws IOException, JspException { + throws IOException, JspException { JspFragment fragment = getJspBody(); StringWriter sw = new StringWriter(); @@ -609,7 +611,7 @@ } protected void applyAttributes() - throws JspException { + throws JspException { super.applyAttributes(); if(_headerCellModel.getFilterHref() != null && _headerCellModel.getFilterAction() != null) Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/ImageAnchorCell.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/ImageAnchorCell.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/ImageAnchorCell.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/ImageAnchorCell.java Tue Apr 12 17:09:46 2005 @@ -37,8 +37,8 @@ * @netui.tldx:tag whitespace="indent" */ public class ImageAnchorCell - extends AbstractHtmlTableCell - implements IFormattable, IUrlParams { + extends AbstractHtmlTableCell + implements IFormattable, IUrlParams { /* todo: support rolloverImage on the <img> tags @@ -251,6 +251,7 @@ /** * Sets <code>charset</code> attribute for the anchor. + * * @param charSet - the window target. * @jsptagref.attributedescription The character set. * @jsptagref.databindable false @@ -259,13 +260,13 @@ * description="The character set." * @netui.tldx:attribute category="misc" */ - public void setCharSet(String charSet) - { + public void setCharSet(String charSet) { _anchorState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.CHARSET, charSet); } /** * Sets <code>type</code> attribute for the anchor. + * * @param type - the window target. * @jsptagref.attributedescription The type. * @jsptagref.databindable false @@ -274,13 +275,13 @@ * description="The type." * @netui.tldx:attribute category="misc" */ - public void setType(String type) - { + public void setType(String type) { _anchorState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.TYPE, type); } /** * Sets <code>hreflang</code> attribute for the anchor. + * * @param hreflang - the window target. * @jsptagref.attributedescription The HREF lang. * @jsptagref.databindable false @@ -289,13 +290,13 @@ * description="The HREF lang." * @netui.tldx:attribute category="misc" */ - public void setHrefLang(String hreflang) - { + public void setHrefLang(String hreflang) { _anchorState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.HREFLANG, hreflang); } /** * Sets <code>rel</code> attribute for the anchor. + * * @param rel - the window target. * @jsptagref.attributedescription The rel attribute for the anchor. * @jsptagref.databindable false @@ -304,13 +305,13 @@ * description="The rel." * @netui.tldx:attribute category="misc" */ - public void setRel(String rel) - { + public void setRel(String rel) { _anchorState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.REL, rel); } /** * Sets <code>rev</code> attribute for the anchor. + * * @param rev - the window target. * @jsptagref.attributedescription The rev. * @jsptagref.databindable false @@ -319,14 +320,14 @@ * description="The rev." * @netui.tldx:attribute category="misc" */ - public void setRev(String rev) - { + public void setRev(String rev) { _anchorState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.REV, rev); } /** * Sets the window target. + * * @param target - the window target. * @jsptagref.attributedescription The window target. * @jsptagref.databindable false @@ -335,13 +336,13 @@ * description="The window target." * @netui.tldx:attribute category="misc" */ - public void setTarget(String target) - { + public void setTarget(String target) { _anchorState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.TARGET, target); } /** * Sets the href of the Anchor. This attribute will accept the empty String as a legal value. + * * @param href - the hyperlink URI for the Area. * @jsptagref.attributedescription The URL to go to. * @jsptagref.databindable false @@ -358,6 +359,7 @@ /** * Set the target "scope" for the anchor's action. Multiple active page flows may exist concurrently within named * scopes. This attribute selects which named scope to use. If omitted, the default scope is assumed. + * * @param targetScope - the name of the target scope in which the associated action's page flow resides. * @jsptagref.attributedescription The target scope in which the associated action's page flow resides. * @jsptagref.databindable true @@ -372,6 +374,7 @@ /** * Set the name of the action for the Area. + * * @param action - the name of the action to set for the Area. * @jsptagref.attributedescription The action method to invoke. The action method must be in the Controller file * of the Page Flow directory. @@ -382,7 +385,7 @@ * @netui.tldx:attribute reftype="netui-action-url" category="general" */ public void setAction(String action) - throws JspException { + throws JspException { _imageAnchorCellModel.setAction(setRequiredValueAttribute(action, "action")); } @@ -394,6 +397,7 @@ /** * Sets the property to specify where to align the image. + * * @param align - the image alignment. * @jsptagref.attributedescription The alignment of the image. * @jsptagref.databindable false @@ -402,13 +406,13 @@ * description="The alignment of the image." * @netui.tldx:attribute */ - public void setAlign(String align) - { + public void setAlign(String align) { _imageState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.ALIGN, align); } /** * Sets the property to specify the alt text of the image. + * * @param alt - the image alignment. * @jsptagref.attributedescription The alternative text of the image * @jsptagref.databindable Read Only @@ -417,25 +421,25 @@ * description="The alternative text of the image." * @netui.tldx:attribute */ - public void setAlt(String alt) - { + public void setAlt(String alt) { _imageState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.ALT, alt); } /** * Sets the property to specify the longdesc. + * * @param longdesc - the longdesc. * @netui:attribute required="false" rtexprvalue="true" * description="Sets the property to specify the longdesc." * @netui.tldx:attribute category="misc" */ - public void setLongdesc(String longdesc) - { + public void setLongdesc(String longdesc) { _imageState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.LONGDESC, longdesc); } /** * Sets the border size around the image. + * * @param border - the border size. * @jsptagref.attributedescription The border size around the image * @jsptagref.databindable false @@ -444,13 +448,13 @@ * description="The border size around the image." * @netui.tldx:attribute */ - public void setBorder(String border) - { + public void setBorder(String border) { _imageState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.BORDER, border); } /** * Sets the image height. + * * @param height - the height. * @jsptagref.attributedescription The image height * @jsptagref.databindable Read Only @@ -459,13 +463,13 @@ * description="The image height." * @netui.tldx:attribute */ - public void setHeight(String height) - { + public void setHeight(String height) { _imageState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.HEIGHT, height); } /** * Sets the the horizontal spacing around the image. + * * @param hspace - the horizontal spacing. * @jsptagref.attributedescription The horizontal spacing around the image. * @jsptagref.databindable Read Only @@ -474,13 +478,13 @@ * description="The horizontal spacing around the image." * @netui.tldx:attribute category="misc" */ - public void setHspace(String hspace) - { + public void setHspace(String hspace) { _imageState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.HSPACE, hspace); } /** * Sets the server-side image map declaration. + * * @param ismap - the image map declaration. * @jsptagref.attributedescription The server-side map declaration. * @jsptagref.databindable false @@ -489,13 +493,13 @@ * description="The server-side map declaration." * @netui.tldx:attribute category="misc" */ - public void setIsmap(String ismap) - { + public void setIsmap(String ismap) { _imageState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.ISMAP, ismap); } /** * Sets the image source URI. + * * @param src - the image source URI. * @jsptagref.attributedescription The image source URI * @jsptagref.databindable Read Only @@ -506,13 +510,13 @@ * reftype="img-url" */ public void setSrc(String src) - throws JspException - { + throws JspException { _imageState.src = src; } /** * Sets the client-side image map declaration. + * * @param usemap - the map declaration. * @jsptagref.attributedescription The client-side image map declaration * @jsptagref.databindable false @@ -521,13 +525,13 @@ * description="The client-side image map declaration" * @netui.tldx:attribute category="misc" */ - public void setUsemap(String usemap) - { + public void setUsemap(String usemap) { _imageState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.USEMAP, usemap); } /** * Sets the vertical spacing around the image. + * * @param vspace - the vertical spacing. * @jsptagref.attributedescription The vertical spacing around the image. * @jsptagref.databindable Read Only @@ -536,8 +540,7 @@ * description="The vertical spacing around the image." * @netui.tldx:attribute */ - public void setVspace(String vspace) - { + public void setVspace(String vspace) { _imageState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.VSPACE, vspace); } @@ -546,13 +549,13 @@ * running in legacy mode, this will override the <code>style</code> attribute if that is * set. If this is not set, and <code>style</code> is set, then it will be applied to * the image. + * * @param imageStyle - the label style * @netui:attribute required="false" rtexprvalue="true" * description="Set the style for the contained image. " * @netui.tldx:attribute category="format" propertyclass="workshop.jspdesigner.properties.JspStyleProperty" */ - public void setImageStyle(String imageStyle) - { + public void setImageStyle(String imageStyle) { _imageState.style = imageStyle; } @@ -561,18 +564,19 @@ * running in legacy mode, this will override the <code>styleClass</code> attribute if that is * set. If this is not set, and <code>styleClass</code> is set, then it will be applied to * the image. + * * @param imageClass - the image class * @netui:attribute required="false" rtexprvalue="true" * description="Set the label style class for each contained image." * @netui.tldx:attribute category="format" */ - public void setImageStyleClass(String imageClass) - { + public void setImageStyleClass(String imageClass) { _imageState.styleClass = imageClass; } /** * Sets the image width. + * * @param width - the image width. * @jsptagref.attributedescription The image width. * @jsptagref.databindable Read Only @@ -581,22 +585,22 @@ * description="The image width." * @netui.tldx:attribute */ - public void setWidth(String width) - { + public void setWidth(String width) { _imageState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.WIDTH, width); } public void setAttribute(String name, String value, String facet) - throws JspException { + throws JspException { if(facet == null || facet.equals(ANCHOR_FACET_NAME)) super.addStateAttribute(_anchorState, name, value); else if(facet.equals(IMAGE_FACET_NAME)) super.addStateAttribute(_imageState, name, value); - else super.setAttribute(name, value, facet); + else + super.setAttribute(name, value, facet); } public void addParameter(String name, Object value, String facet) - throws JspException { + throws JspException { ParamHelper.addParam(_imageAnchorCellModel.getParams(), name, value); } Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/ImageCell.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/ImageCell.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/ImageCell.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/ImageCell.java Tue Apr 12 17:09:46 2005 @@ -33,7 +33,7 @@ * @netui.tldx:tag renderer="workshop.netui.jspdesigner.tldx.ImageColumnRenderer" whitespace="indent" */ public class ImageCell - extends AbstractHtmlTableCell { + extends AbstractHtmlTableCell { private static final ImageCellDecorator DECORATOR = new ImageCellDecorator(); private static final String IMAGE_FACET_NAME = "image"; @@ -244,6 +244,7 @@ /** * Sets the property to specify where to align the image. + * * @param align - the image alignment. * @jsptagref.attributedescription The alignment of the image. * @jsptagref.databindable false @@ -256,6 +257,7 @@ /** * Sets the the horizontal spacing around the image. + * * @param hspace - the horizontal spacing. * @jsptagref.attributedescription The horizontal spacing around the image. * @jsptagref.databindable Read Only @@ -305,6 +307,7 @@ /** * Sets the property to specify the alt text of the image. + * * @param alt - the image alignment. * @jsptagref.attributedescription The alternative text of the image * @jsptagref.databindable Read Only @@ -313,16 +316,16 @@ * description="The alternative text of the image." * @netui.tldx:attribute */ - public void setAlt(String alt) - { + public void setAlt(String alt) { _imageState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.ALT, alt); } - + public void setAttribute(String name, String value, String facet) - throws JspException { + throws JspException { if(facet == null || facet.equals(IMAGE_FACET_NAME)) super.addStateAttribute(_imageState, name, value); - else super.setAttribute(name, value, facet); + else + super.setAttribute(name, value, facet); } protected void renderDataCellContents(AbstractRenderAppender appender, String jspFragmentOutput) { Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/RenderPager.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/RenderPager.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/RenderPager.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/RenderPager.java Tue Apr 12 17:09:46 2005 @@ -31,14 +31,14 @@ * @netui.tldx:tag renderer="" whitespace="indent" */ public class RenderPager - extends AbstractSimpleTag { + extends AbstractSimpleTag { public String getTagName() { return "RenderPager"; } public void doTag() - throws JspException { + throws JspException { DataGridTagModel dgm = DataGridUtil.getDataGridTagModel(getJspContext()); if(dgm == null) Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Rows.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Rows.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Rows.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/Rows.java Tue Apr 12 17:09:46 2005 @@ -47,8 +47,8 @@ * whitespace="indent" requiredparent="dataGrid" */ public class Rows - extends AbstractSimpleTag - implements IHtmlEvents, IHtmlI18n { + extends AbstractSimpleTag + implements IHtmlEvents, IHtmlI18n { private TBodyTag.State _tbodyTag = new TBodyTag.State(); @@ -329,7 +329,7 @@ } public void doTag() - throws IOException, JspException { + throws IOException, JspException { JspContext jspContext = getJspContext(); DataGridTagModel dataGridModel = DataGridUtil.getDataGridTagModel(jspContext); @@ -357,7 +357,8 @@ int index = dataGridModel.getCurrentIndex(); if(index % 2 == 0) trState.styleClass = styleModel.getRowClass(); - else trState.styleClass = styleModel.getAltRowClass(); + else + trState.styleClass = styleModel.getAltRowClass(); tableRenderer.openTableRow(trState, appender); dataGridModel.nextDataItem(); Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/SpanCell.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/SpanCell.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/SpanCell.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/SpanCell.java Tue Apr 12 17:09:46 2005 @@ -34,8 +34,8 @@ * @netui.tldx:tag whitespace="indent" */ public class SpanCell - extends AbstractHtmlTableCell - implements IFormattable { + extends AbstractHtmlTableCell + implements IFormattable { private static final SpanCellDecorator DECORATOR = new SpanCellDecorator(); private static final String SPAN_FACET_NAME = "span"; @@ -241,10 +241,11 @@ } public void setAttribute(String name, String value, String facet) - throws JspException { + throws JspException { if(facet == null || facet.equals(SPAN_FACET_NAME)) super.addStateAttribute(_spanState, name, value); - else super.setAttribute(name, value, facet); + else + super.setAttribute(name, value, facet); } protected void renderDataCellContents(AbstractRenderAppender appender, String jspFragmentOutput) { Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/TemplateCell.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/TemplateCell.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/TemplateCell.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/datagrid/TemplateCell.java Tue Apr 12 17:09:46 2005 @@ -31,7 +31,7 @@ * @netui.tldx:tag whitespace="indent" */ public class TemplateCell - extends AbstractHtmlTableCell { + extends AbstractHtmlTableCell { public String getTagName() { return "TemplateCell"; Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/invoke/AbstractCallMethod.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/invoke/AbstractCallMethod.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/invoke/AbstractCallMethod.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/invoke/AbstractCallMethod.java Tue Apr 12 17:09:46 2005 @@ -58,7 +58,7 @@ * </p> */ public abstract class AbstractCallMethod - extends AbstractClassicTag { + extends AbstractClassicTag { private static final Logger LOGGER = Logger.getInstance(AbstractCallMethod.class); @@ -140,7 +140,7 @@ * @see MethodParameter */ public int doStartTag() - throws JspException { + throws JspException { return EVAL_BODY_BUFFERED; } @@ -168,12 +168,13 @@ * @see java.lang.String */ public int doEndTag() - throws JspException { + throws JspException { // find the object on which to invoke the method Object object = null; try { object = resolveObject(); - } catch(ObjectNotFoundException onf) { + } + catch(ObjectNotFoundException onf) { Throwable cause = (onf.getCause() != null ? onf.getCause() : onf); String msg = Bundle.getErrorString("Tags_AbstractCallMethod_noSuchObject", new Object[]{getObjectName(), _method, cause}); registerTagError(msg, null); @@ -186,7 +187,8 @@ handleReturnValue(null); localRelease(); return EVAL_PAGE; - } else { + } + else { String msg = Bundle.getErrorString("Tags_AbstractCallMethod_objectIsNull", new Object[]{getObjectName(), _method}); registerTagError(msg, null); } @@ -205,15 +207,16 @@ if(_verifyTypes) { String paramString = prettyPrintParameterTypes(_parameters); msg = Bundle.getErrorString("Tags_AbstractCallMethod_noSuchMethodWithTypes", - new Object[]{_method, - (_parameters != null ? new Integer(_parameters.size()) : new Integer(0)), - paramString, - getObjectName()}); - } else + new Object[]{_method, + (_parameters != null ? new Integer(_parameters.size()) : new Integer(0)), + paramString, + getObjectName()}); + } + else msg = Bundle.getErrorString("Tags_AbstractCallMethod_noSuchMethod", - new Object[]{_method, - (_parameters != null ? new Integer(_parameters.size()) : new Integer(0)), - getObjectName()}); + new Object[]{_method, + (_parameters != null ? new Integer(_parameters.size()) : new Integer(0)), + getObjectName()}); registerTagError(msg, null); reportErrors(); @@ -224,7 +227,8 @@ Object[] args = null; try { args = getArguments(m.getParameterTypes()); - } catch(IllegalArgumentException iae) { + } + catch(IllegalArgumentException iae) { registerTagError(iae.getMessage(), null); reportErrors(); localRelease(); @@ -241,7 +245,8 @@ } result = m.invoke(object, args); - } catch(Exception e) { + } + catch(Exception e) { assert e instanceof IllegalAccessException || e instanceof InvocationTargetException || e instanceof IllegalArgumentException; if(LOGGER.isErrorEnabled()) @@ -258,8 +263,8 @@ if(LOGGER.isDebugEnabled()) { LOGGER.debug((result != null ? - "return value is non-null and is of type \"" + result.getClass().getName() + "\"" : - "return value is null.")); + "return value is non-null and is of type \"" + result.getClass().getName() + "\"" : + "return value is null.")); } // each implementation handles this differently @@ -337,15 +342,16 @@ if(result != null) { if(LOGGER.isInfoEnabled() && pageContext.getAttribute(_resultId) != null) LOGGER.info("Overwriting attribute named \"" + _resultId + "\" in the PageContext with a new attribute of type \"" + - result.getClass().getName() + "\" returned from calling the method \"" + _method + "\" on an object named \"" + - getObjectName() + "\"."); + result.getClass().getName() + "\" returned from calling the method \"" + _method + "\" on an object named \"" + + getObjectName() + "\"."); pageContext.setAttribute(_resultId, result); - } else { + } + else { if(LOGGER.isInfoEnabled()) LOGGER.info("Removing attribute named \"" + _resultId + "\" from the PageContext. " + - "The value returned from calling the method \"" + _method + "\" on an object named \"" + - getObjectName() + "\" is null."); + "The value returned from calling the method \"" + _method + "\" on an object named \"" + + getObjectName() + "\" is null."); pageContext.removeAttribute(_resultId); } @@ -407,7 +413,8 @@ } if(match) return methods[i]; - } else + } + else return methods[i]; } } @@ -445,10 +452,10 @@ else args[i] = TypeUtils.convertToObject((String)value, paramTypes[i]); } - // catch Exception here because almost anything can be thrown by TypeUtils.convertToObject(). + // catch Exception here because almost anything can be thrown by TypeUtils.convertToObject(). catch(Exception e) { String msg = Bundle.getErrorString("Tags_AbstractCallMethod_parameterError", - new Object[]{paramTypes[i], new Integer(i), value, e.toString()}); + new Object[]{paramTypes[i], new Integer(i), value, e.toString()}); throw new IllegalArgumentException(msg); } @@ -479,7 +486,8 @@ paramString.append(")"); return paramString.toString(); - } else + } + else return EMPTY_STRING; } Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/invoke/CallMethod.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/invoke/CallMethod.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/invoke/CallMethod.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/invoke/CallMethod.java Tue Apr 12 17:09:46 2005 @@ -84,7 +84,7 @@ * @see javax.servlet.jsp.PageContext */ public class CallMethod - extends AbstractCallMethod { + extends AbstractCallMethod { private static final String DEFAULT_OBJECT_NAME = Bundle.getString("Tags_CallMethod_defaultObjectName"); private static final MethodCache _cache = new MethodCache(); @@ -123,7 +123,7 @@ } protected Object resolveObject() - throws ObjectNotFoundException, JspException { + throws ObjectNotFoundException, JspException { return _object; } @@ -137,7 +137,8 @@ argTypes[i] = ((ParamNode)params.get(i)).typeName; } return _cache.getMethod(target.getClass(), methodName, argTypes); - } else + } + else return _cache.getMethod(target.getClass(), methodName, params.size()); } Modified: incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/invoke/CallPageFlow.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/invoke/CallPageFlow.java?view=diff&r1=161136&r2=161137 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/invoke/CallPageFlow.java (original) +++ incubator/beehive/trunk/netui/src/tags-databinding/org/apache/beehive/netui/tags/databinding/invoke/CallPageFlow.java Tue Apr 12 17:09:46 2005 @@ -92,7 +92,7 @@ * deprecated="true" */ public class CallPageFlow - extends CallMethod { + extends CallMethod { private static final Logger LOGGER = Logger.getInstance(CallPageFlow.class); private static final String DEFAULT_OBJECT_NAME = Bundle.getString("Tags_CallPageFlow_defaultObjectName"); @@ -126,7 +126,7 @@ * @throws ObjectNotFoundException when an exception occurs ensuring that a Page Flow is created. */ protected Object resolveObject() - throws ObjectNotFoundException { + throws ObjectNotFoundException { try { // TODO: because of a javac bug (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5090006), we // can't call PageFlowUtils.getCurrentPageFlow here; thus, the call to getCurrentActionResolver. @@ -136,7 +136,8 @@ LOGGER.debug("Found a pageflow of type: " + (jpf != null ? jpf.getClass().getName() : "null")); return jpf; - } catch(Exception e) { + } + catch(Exception e) { throw new ObjectNotFoundException(Bundle.getErrorString("Tags_CallPageFlow_noPageFlow"), e); } }
