Example usage for javax.servlet.jsp JspException JspException

List of usage examples for javax.servlet.jsp JspException JspException

Introduction

In this page you can find the example usage for javax.servlet.jsp JspException JspException.

Prototype

public JspException(Throwable cause) 

Source Link

Document

Constructs a new JspException with the specified cause.

Usage

From source file:org.dspace.app.webui.jsptag.SelectGroupTag.java

public int doStartTag() throws JspException {
    try {/*  w ww . j ava 2 s.co  m*/
        JspWriter out = pageContext.getOut();
        HttpServletRequest req = (HttpServletRequest) pageContext.getRequest();

        out.print(
                "<table><tr><td colspan=\"2\" align=\"center\"><select multiple=\"multiple\" name=\"group_ids\" size=\"");
        out.print(multiple ? "10" : "1");
        out.println("\">");

        //ensure that if no group is selected that a blank option is displayed - xhtml compliance 
        if (groups == null || groups.length == 0) {
            out.print("<option value=\"\">&nbsp;</option>");
        }

        if (groups != null) {
            for (int i = 0; i < groups.length; i++) {
                out.print("<option value=\"" + groups[i].getID() + "\">");
                out.print(groups[i].getName() + " (" + groups[i].getID() + ")");
                out.println("</option>");
            }
        }

        out.print("</select></td>");

        if (multiple) {
            out.print("</tr><tr><td width=\"50%\" align=\"center\">");
        } else {
            out.print("<td>");
        }

        String p = (multiple
                ? LocaleSupport.getLocalizedMessage(pageContext,
                        "org.dspace.app.webui.jsptag.SelectGroupTag.selectGroups")
                : LocaleSupport.getLocalizedMessage(pageContext,
                        "org.dspace.app.webui.jsptag.SelectGroupTag.selectGroup"));
        out.print("<input type=\"button\" value=\"" + p + "\" onclick=\"javascript:popup_window('"
                + req.getContextPath() + "/tools/group-select-list?multiple=" + multiple
                + "', 'group_popup');\" />");

        if (multiple) {
            out.print("</td><td width=\"50%\" align=\"center\">");
            out.print("<input type=\"button\" value=\""
                    + LocaleSupport.getLocalizedMessage(pageContext,
                            "org.dspace.app.webui.jsptag.SelectGroupTag.removeSelected")
                    + "\" onclick=\"javascript:removeSelected(window.document.epersongroup.group_ids);\"/>");
        }

        out.println("</td></tr></table>");
    } catch (IOException ie) {
        throw new JspException(ie);
    }

    return SKIP_BODY;
}

From source file:org.ecside.tag.ColumnsTag.java

    public int doEndTag() throws JspException {
        try {/*from   w w w  . j  a  v a 2  s  . c o m*/
            TableModel model = TagUtils.getModel(this);

            if (!TagUtils.isIteratingBody(this)) {
                if (StringUtils.isNotBlank(titles)){
                   String[] titlesA=(" "+titles+" ").split(",");
                    model.getTable().setAttribute(ECSideConstants.TABLE_TITLES_KEY,titlesA);
                }
                
                if (StringUtils.isNotBlank(widths)){
                   String[] cellWidthsA=(" "+widths+" ").split(",");
                    model.getTable().setAttribute(ECSideConstants.TABLE_WIDTHS_KEY,cellWidthsA);
                }
                
                if (StringUtils.isNotBlank(cellValues)){
                   String[] cellValuesA=(" "+cellValues+" ").split(",");
                    model.getTable().setAttribute(ECSideConstants.TABLE_CELL_VALUES_KEY,cellValuesA);
                }
                
//                if (StringUtils.isNotBlank(cellNames)){
//                   String[] cellNamesA=(" "+cellNames+" ").split(",");
//                    model.getTable().setAttribute(ECSideConstants.TABLE_CELLNAMES_KEY,cellNamesA);
//                }
                
                if (StringUtils.isNotBlank(editEvents)){
                   String[] cellEventsA=(" "+editEvents+" ").split(",");
                    model.getTable().setAttribute(ECSideConstants.TABLE_EDIT_EVENTS_KEY,cellEventsA);

                }

                if (StringUtils.isNotBlank(editTemplates)){
                   String[] cellTemplatesA=(" "+editTemplates+" ").split(",");
                    model.getTable().setAttribute(ECSideConstants.TABLE_EDIT_TEMPLATES_KEY,cellTemplatesA);

                }
                if (StringUtils.isNotBlank(editables)){
                   String[] cellEditablesA=(" "+editables+" ").split(",");
                    model.getTable().setAttribute(ECSideConstants.TABLE_EDITABLES_KEY,cellEditablesA);

                }
                
                
                
               String autoGenerateColumns = TagUtils.evaluateExpressionAsString("autoGenerateColumns", this.autoGenerateColumns, this, pageContext);
                if (StringUtils.isBlank(autoGenerateColumns)){
                   
                   autoGenerateColumns=TableConstants.DEFAULT_AUTOGENERATECOLUMNS;
                }
               
               model.addColumns(autoGenerateColumns);


            } else {
                model.setColumnValues();
            }

            
        } catch (Exception e) {
           LogHandler.errorLog(logger, e);
            throw new JspException("ColumnsTag.doEndTag() Problem: " + ExceptionUtils.formatStackTrace(e));
        }finally{
           
        }
        return EVAL_PAGE;
    }

From source file:org.ecside.tag.ColumnTag.java

 public int doEndTag() throws JspException {

   // boolean isExported = ExportFilterUtils.isExported(
   // model.getContext());
   // boolean isPrint="_print_".equals(ExportFilterUtils.getExportFileName(
   // model.getContext()));

   Column column = null;/* ww  w.  j a  v  a2 s  .  co m*/
   try {
      if (!TagUtils.isIteratingBody(this)) {
         column = new Column(model);

         column.setAlias(TagUtils.evaluateExpressionAsString("alias",
               this.alias, this, pageContext));
         column.setProperty(TagUtils.evaluateExpressionAsString(
               "property", this.property, this, pageContext));

         column.setCalc(TagUtils.evaluateExpressionAsString("calc",
               this.calc, this, pageContext));
         column.setCalcTitle(TagUtils.evaluateExpressionAsString(
               "calcTitle", calcTitle, this, pageContext));
         column.setCell(TagUtils.evaluateExpressionAsString("cell",
               this.cell, this, pageContext));
         column.setEscapeAutoFormat(TagUtils
               .evaluateExpressionAsBoolean("escapeAutoFormat",
                     this.escapeAutoFormat, this, pageContext));
         column.setFormat(TagUtils.evaluateExpressionAsString("format",
               this.format, this, pageContext));
         column.setInterceptor(TagUtils.evaluateExpressionAsString(
               "interceptor", this.interceptor, this, pageContext));
         column.setParse(TagUtils.evaluateExpressionAsString("parse",
               this.parse, this, pageContext));
         column.setTitle(TagUtils.evaluateExpressionAsString("title",
               this.title, this, pageContext));

         // TODO:
         TagUtils.initExpression("cellValue", ECSideUtils.convertString(
               getColumnValue(), null), column);

         column.setStyle(TagUtils.evaluateExpressionAsString("style",
               this.style, this, pageContext));
         TagUtils.initExpression("style", column.getStyle(), column);

         column.setViewsAllowed(TagUtils.evaluateExpressionAsString(
               "viewsToAllow", this.viewsAllowed, this, pageContext));
         column.setViewsDenied(TagUtils.evaluateExpressionAsString(
               "viewsToDeny", this.viewsDenied, this, pageContext));

         column.setFilterable(TagUtils.evaluateExpressionAsBoolean(
               "filterable", this.filterable, this, pageContext));
         column.setFilterCell(TagUtils.evaluateExpressionAsString(
               "filterCell", this.filterCell, this, pageContext));
         column.setFilterClass(TagUtils.evaluateExpressionAsString(
               "filterClass", this.filterClass, this, pageContext));
         column
               .setFilterOptions(TagUtils.evaluateExpressionAsObject(
                     "filterOptions", this.filterOptions, this,
                     pageContext));
         column.setFilterStyle(TagUtils.evaluateExpressionAsString(
               "filterStyle", this.filterStyle, this, pageContext));

         column.setHeaderCell(TagUtils.evaluateExpressionAsString(
               "headerCell", this.headerCell, this, pageContext));
         column.setHeaderClass(TagUtils.evaluateExpressionAsString(
               "headerClass", this.headerClass, this, pageContext));
         column.setHeaderStyle(TagUtils.evaluateExpressionAsString(
               "headerStyle", this.headerStyle, this, pageContext));
         column.setHeaderStyleClass(TagUtils.evaluateExpressionAsString(
               "headerStyleClass", this.headerStyleClass, this,
               pageContext));
         column.setSortable(TagUtils.evaluateExpressionAsBoolean(
               "sortable", this.sortable, this, pageContext));
         column.setEditable(TagUtils.evaluateExpressionAsBoolean(
               "editable", this.editable, this, pageContext));

         String widthT = TagUtils.evaluateExpressionAsString("width",
               this.width, this, pageContext);

         if (!model.getTable().isClassic()) {
            int tempWidth = 0;
            if (StringUtils.isBlank(widthT)) {
               widthT = "" + ECSideConstants.DEFAULT_COLUMNWIDTH;
               // widthT="";
               tempWidth = ECSideConstants.DEFAULT_COLUMNWIDTH;
            } else {
               try {
                  if (widthT.indexOf("%") > 0) {
                     tempWidth = ECSideConstants.DEFAULT_COLUMNWIDTH;
                  } else if (widthT.toLowerCase().endsWith("px")) {
                     tempWidth = Integer.parseInt(widthT.substring(
                           0, widthT.length() - 2));
                  } else {
                     tempWidth = Integer.parseInt(widthT);
                  }
               } catch (Exception e) {
                  tempWidth = ECSideConstants.DEFAULT_COLUMNWIDTH;
               }

            }
            model.getTable().addTotalWidth(tempWidth);
         }

         column.setWidth(widthT);
         column.setEllipsis(TagUtils.evaluateExpressionAsBoolean(
               "ellipsis", this.ellipsis, this, pageContext));

         column.setResizeColWidth(TagUtils.evaluateExpressionAsBoolean(
               "resizeColWidth", this.resizeColWidth, this,
               pageContext));
         column.setMinWidth(TagUtils.evaluateExpressionAsInt("minWidth",
               this.minWidth, this, pageContext));

         column.setEditEvent(TagUtils.evaluateExpressionAsString(
               "editEvent", this.editEvent, this, pageContext));
         column.setEditTemplate(TagUtils.evaluateExpressionAsString(
               "editTemplate", this.editTemplate, this, pageContext));
         // column.setCellName(TagUtils.evaluateExpressionAsString("cellName",
         // this.cellName, this, pageContext));

         column.setNowrap(TagUtils.evaluateExpressionAsString("nowrap",
               this.nowrap, this, pageContext));

         column.setGroup(TagUtils.evaluateExpressionAsString("group",
               this.group, this, pageContext));

         if (StringUtils.isBlank(this.headerSpan)) {
            column.setHeaderSpan(-1);
         } else {
            column.setHeaderSpan(TagUtils.evaluateExpressionAsInt(
                  "headerSpan", this.headerSpan, this, pageContext));
         }

         if (StringUtils.isNotBlank(this.calcSpan)) {
            Column fcolumn;
            List columns = TagUtils.getModel(this).getColumnHandler()
                  .getColumns();
            if (columns == null || columns.size() < 1
                  || columns.get(0) == null) {
               fcolumn = column;
            } else {
               fcolumn = (Column) columns.get(0);
            }

            fcolumn.setCalcSpan(TagUtils.evaluateExpressionAsInt(
                  "calcSpan", this.calcSpan, this, pageContext));
         }

         column.setTagAttributes(TagUtils.evaluateExpressionAsString(
               TableConstants.TAG_ATTRIBUTES, this.tagAttributes,
               this, pageContext));

         // column.setAttribute(TDTableConstants.EXTEND_ATTRIBUTES,getExtendAttributesAsString());
         // resetExtendAttribute();

         addColumnAttributes(model, column);
         model.getColumnHandler().addColumn(column);

      } else {

         column = model.getColumnHandler().getColumnByAlias(
               TableModelUtils.getAlias(alias, property));

         if (column != null) { // null if view not allowed
            Object currentBean = TagUtils.getModel(this)
                  .getCurrentRowBean();
            // Object previousBean =
            // TagUtils.getModel(this).getPreviousRowBean();

            Object propertyValue = TableModelUtils
                  .getColumnPropertyValue(currentBean, property);
            Object cellValue;

            // column.setCellValue(TagUtils.evaluateExpressionAsString("cellValue",
            // this.cellValue, this, pageContext));

            column.setCellValue(TagUtils.evaluateExpressionAsString(
                  "cellValue", this.cellValue, this, pageContext));

            cellValue = TagUtils.runExpression("cellValue", column,
                  currentBean);

            // column.setCellValue(propertyValue==null?null:String.valueOf(propertyValue));

            if (cellValue == null) {
               cellValue = getColumnValue(propertyValue);
            }
            if (propertyValue == null) {
               propertyValue = cellValue;
            }

            // Object[]
            // expressionPropertys=column.getExpressionPropertys("cellValue");
            // if (expressionPropertys!=null){
            // GirdExpression
            // expression=column.getExpression("cellValue");
            // for (int i=0;i<expressionPropertys.length;i++){
            // String ep=(String)expressionPropertys[i];
            // expression.setArgument(ep,
            // TableModelUtils.getColumnPropertyValue(currentBean, ep));
            // }
            // cellValue=expression.call();
            // if (propertyValue==null){
            // propertyValue=cellValue;
            // }
            // }else{
            // cellValue=getColumnValue(propertyValue);
            // }

            column.setTipTitle(TagUtils.evaluateExpressionAsString(
                  "tipTitle", this.tipTitle, this, pageContext));

            Object preCellValue = column.getPreCellValue();
            // if (previousBean!=null){
            // prePropertyValue=TableModelUtils.getColumnPropertyValue(previousBean,
            // property);
            //                       
            // if ("hide".equalsIgnoreCase(column.getGroup())){
            // if (propertyValue!=null &&
            // propertyValue.equals(prePropertyValue)){
            // cellValue="";
            // }
            // }
            // }

            boolean hideCell = false;
            boolean isGroup = false;
            if ("true".equalsIgnoreCase(column.getGroup())) {
               isGroup = true;
            }

            if (isGroup) {
               column.setPreCellValue(cellValue);
               if (cellValue != null && cellValue.equals(preCellValue)) {
                  cellValue = "";
                  column.setStyle("display:none;");
                  hideCell = true;
                  // column.setStyle(column.getStyle()+";display:none;");
               }

            }

            column.setValue(cellValue);
            column.setPropertyValue(propertyValue);

            if (!hideCell) {
               column.setOnclick(TagUtils.evaluateExpressionAsString(
                     TableConstants.ON_CLICK, this.onclick, this,
                     pageContext));
               column.setOndblclick(TagUtils
                     .evaluateExpressionAsString(
                           TableConstants.ON_DOUBLE_CLICK,
                           this.ondblclick, this, pageContext));

               column.setOnmouseover(TagUtils
                     .evaluateExpressionAsString(
                           TableConstants.ON_MOUSE_OVER,
                           this.onmouseover, this, pageContext));
               column.setOnmouseout(TagUtils
                     .evaluateExpressionAsString(
                           TableConstants.ON_MOUSE_OUT,
                           this.onmouseout, this, pageContext));

               String styleClassName = TagUtils
                     .evaluateExpressionAsString("styleClass",
                           this.styleClass, this, pageContext);
               if (isGroup) {
                  styleClassName = "groupColumn "
                        + ECSideUtils.convertString(styleClassName,
                              "");
               }

               column.setStyleClass(styleClassName);

               String style = ECSideUtils.convertString(TagUtils
                     .runExpression("style", column, currentBean),
                     null);
               if (style == null) {
                  column.setStyle(TagUtils
                        .evaluateExpressionAsString("style",
                              this.style, this, pageContext));
               } else {
                  column.setStyle(style);
               }

            }
            // column.setCellValue(TagUtils.evaluateExpressionAsString("cellValue",
            // this.cellValue, this, pageContext));
            column.setTagAttributes(TagUtils
                  .evaluateExpressionAsString(
                        TableConstants.TAG_ATTRIBUTES,
                        this.tagAttributes, this, pageContext));
            column.setId(TagUtils.evaluateExpressionAsString(
                  "columnId", columnId, this, pageContext));

            modifyColumnAttributes(model, column);
            model.getColumnHandler().modifyColumnAttributes(column);
            model.getViewHandler().addColumnValueToView(column);
            // model.setPreviousRowBean(currentBean);

         }
         //               

      }

      if (bodyContent != null) {
         bodyContent.clearBody();
      }
      // column.setAttribute(TDTableConstants.EXTEND_ATTRIBUTES,"");
   } catch (Exception e) {
      throw new JspException("ColumnTag.doEndTag() Problem: "
            + ExceptionUtils.formatStackTrace(e));
   } finally {
      doFinally();
   }
   return EVAL_PAGE;
}

From source file:org.ecside.tag.ExtendTag.java

public int doAfterBody() throws JspException {
    try {/*from  ww  w .j  ava  2  s. c o m*/
        TableModel model = TagUtils.getModel(this);
            
        if (StringUtils.isBlank(location)|| location.equalsIgnoreCase("toolbar")){
           model.getTable().setAttribute("ExtendTool", getBodyValue());
        }else if (location.equalsIgnoreCase("top")){
           model.getTable().setAttribute("ExtendTableTop", getBodyValue());
        }else if (location.equalsIgnoreCase("bottom")){
           model.getTable().setAttribute("ExtendTableBottom", getBodyValue());
        }else{
           model.getTable().setAttribute("ExtendTool", getBodyValue());
        }

    } catch (Exception e) {
        throw new JspException("TDExtendTag.doAfterBody() Problem: " + ExceptionUtils.formatStackTrace(e));
    }

    return SKIP_BODY;
}

From source file:org.ecside.tag.MappingTag.java

public int doStartTag() throws JspException {
    try {/*www .j a v  a  2s. c  o m*/
            
       Object propertyValue = getValue();

           
        if (propertyValue != null) {
           propertyValue = ExpressionEvaluatorManager.evaluate("result", propertyValue.toString(), Object.class, this, pageContext);
        }

        if (mappingItem!=null ){
           Object mappingMap=pageContext.findAttribute((String)mappingItem);
               
            Object outValue=null;
            if (mappingMap instanceof Map){
               Map itemsMap=(Map)mappingMap;
               outValue=itemsMap.get(propertyValue);
               if (outValue==null && mappingDefaultKey!=null){
                  outValue=itemsMap.get(mappingDefaultKey);
               }
            }
            if (outValue==null){
               outValue=mappingDefaultValue;
            }
            propertyValue=outValue;
        }
            
        JspWriter w = pageContext.getOut();
        if (propertyValue == null || (propertyValue != null && propertyValue instanceof String && StringUtils.isBlank((String)propertyValue))) {
           w.write("");
        }else{
           w.write((String)propertyValue);
        }
            

            
                
    } catch (Exception e) {
        throw new JspException("MappingTag.doStartTag() Problem: " + ExceptionUtils.formatStackTrace(e));
    }

    return SKIP_BODY;
}

From source file:org.ecside.tag.TableTag.java

 public int doAfterBody() throws JspException {

   Table table = model.getTable();/*w  w w.  j av a2s. com*/
   table.setAttribute(TableConstants.EXTEND_ATTRIBUTES,
         getExtendAttributesAsString());
   resetExtendAttribute();
   table.afterBody();

   try {

      if (iterator == null) {
         iterator = model.execute().iterator();
      }
      if (iterator != null && iterator.hasNext()) {
         Object bean = iterator.next();
         model.setCurrentRowBean(bean);
         return EVAL_BODY_AGAIN;
      }

   } catch (Exception e) {
      throw new JspException("TableTag.doAfterBody() Problem: "
            + ExceptionUtils.formatStackTrace(e));
   }

   return SKIP_BODY;
}

From source file:org.ecside.tag.TableTag.java

 public void doCatch(Throwable e) throws Throwable {
   throw new JspException("TableTag Problem: "
         + ExceptionUtils.formatStackTrace(e));
}

From source file:org.ecside.tag.TableTag.java

 public int doEndTag() throws JspException {
   model.getTable().setAttribute(TableConstants.EXTEND_ATTRIBUTES,
         getExtendAttributesAsString());
   try {/*w ww. j  ava 2 s.c  o  m*/
      pageContext.getOut().println(model.getViewData());
   } catch (Exception e) {
      // LogHandler.errorLog(logger, msg);
      throw new JspException("TableTag.doEndTag() Problem: "
            + ExceptionUtils.formatStackTrace(e));
   } finally {
      doFinally();
   }

   return EVAL_PAGE;
}

From source file:org.ecside.tag.TableTag.java

 public int doStartTag() throws JspException {
   try {/*  ww  w. java  2  s .c om*/
      // initialize the attributes
      iterator = null;
      pageContext.setAttribute(TableConstants.ROWCOUNT, "0");
      // fire up the model with the context, preferences and messages
      model = new TableModelImpl(new JspPageContext(pageContext),
            TagUtils.evaluateExpressionAsString("locale", this.locale,
                  this, pageContext));

      // boolean isExported =
      // ExportFilterUtils.isExported(model.getContext());
      // boolean isPrint =
      // "_print_".equals(ExportFilterUtils.getExportFileName(model.getContext()));

      table = new Table(model);
      table.setView(TagUtils.evaluateExpressionAsString("view",
            this.view, this, pageContext));

      table.setGenerateScript(TagUtils.evaluateExpressionAsBoolean(
            "generateScript", this.generateScript, this, pageContext));
      table.setUseAjax(TagUtils.evaluateExpressionAsBoolean("useAjax",
            this.useAjax, this, pageContext));
      table.setDoPreload(TagUtils.evaluateExpressionAsBoolean(
            "doPreload", this.doPreload, this, pageContext));
      table.setClassic(TagUtils.evaluateExpressionAsBoolean("classic",
            this.classic, this, pageContext));

      table.setAction(TagUtils.evaluateExpressionAsString("action",
            action, this, pageContext));
      table.setEnctype(TagUtils.evaluateExpressionAsString("enctype",
            enctype, this, pageContext));

      table.setInsertAction(TagUtils.evaluateExpressionAsString(
            "insertAction", insertAction, this, pageContext));
      table.setUpdateAction(TagUtils.evaluateExpressionAsString(
            "updateAction", updateAction, this, pageContext));
      table.setDeleteAction(TagUtils.evaluateExpressionAsString(
            "deleteAction", deleteAction, this, pageContext));
      table.setShadowRowAction(TagUtils.evaluateExpressionAsString(
            "shadowRowAction", shadowRowAction, this, pageContext));

      table.setBatchUpdate(TagUtils.evaluateExpressionAsBoolean(
            "batchUpdate", this.batchUpdate, this, pageContext));
      table.setAutoIncludeParameters(TagUtils
            .evaluateExpressionAsBoolean("autoIncludeParameters",
                  this.autoIncludeParameters, this, pageContext));
      table.setBorder(TagUtils.evaluateExpressionAsString("border",
            this.border, this, pageContext));
      table.setBufferView(TagUtils.evaluateExpressionAsBoolean(
            "bufferView", this.bufferView, this, pageContext));
      table.setCellpadding(TagUtils.evaluateExpressionAsString(
            "cellpadding", this.cellpadding, this, pageContext));
      table.setCellspacing(TagUtils.evaluateExpressionAsString(
            "cellspacing", this.cellspacing, this, pageContext));
      table.setFilterable(TagUtils.evaluateExpressionAsBoolean(
            "filterable", this.filterable, this, pageContext));
      table.setFilterRowsCallback(TagUtils.evaluateExpressionAsString(
            "filterRowsCallback", this.filterRowsCallback, this,
            pageContext));
      table.setForm(TagUtils.evaluateExpressionAsString("form",
            this.form, this, pageContext));
      table.setInterceptor(TagUtils.evaluateExpressionAsString(
            "interceptor", this.interceptor, this, pageContext));
      table.setItems(TagUtils.evaluateExpressionAsObject("items",
            this.items, this, pageContext));
      table.setLocale(TagUtils.evaluateExpressionAsString("locale",
            this.locale, this, pageContext));
      table.setMethod(TagUtils.evaluateExpressionAsString("method",
            this.method, this, pageContext));
      table.setOnInvokeAction(TagUtils.evaluateExpressionAsString(
            "onInvokeAction", this.onInvokeAction, this, pageContext));
      table.setRetrieveRowsCallback(TagUtils.evaluateExpressionAsString(
            "retrieveRowsCallback", this.retrieveRowsCallback, this,
            pageContext));
      table.setRowsDisplayed(TagUtils.evaluateExpressionAsInt(
            "rowsDisplayed", this.rowsDisplayed, this, pageContext));
      table.setScope(TagUtils.evaluateExpressionAsString("scope", scope,
            this, pageContext));
      table.setShowTitle(TagUtils.evaluateExpressionAsBoolean(
            "showTitle", this.showTitle, this, pageContext));
      table.setShowTooltips(TagUtils.evaluateExpressionAsBoolean(
            "showTooltips", this.showTooltips, this, pageContext));
      table.setSortRowsCallback(TagUtils.evaluateExpressionAsString(
            "sortRowsCallback", this.sortRowsCallback, this,
            pageContext));
      table.setSortable(TagUtils.evaluateExpressionAsBoolean("sortable",
            this.sortable, this, pageContext));
      table.setState(TagUtils.evaluateExpressionAsString("state",
            this.state, this, pageContext));
      table.setStateAttr(TagUtils.evaluateExpressionAsString("stateAttr",
            this.stateAttr, this, pageContext));
      table.setStyle(TagUtils.evaluateExpressionAsString("style", style,
            this, pageContext));
      table.setStyleClass(TagUtils.evaluateExpressionAsString(
            "styleClass", this.styleClass, this, pageContext));
      table.setTableId(TagUtils.evaluateExpressionAsString("tableId",
            getTableId(), this, pageContext));
      table.setTheme(TagUtils.evaluateExpressionAsString("theme",
            this.theme, this, pageContext));
      table.setTitle(TagUtils.evaluateExpressionAsString("title",
            this.title, this, pageContext));
      table.setVar(TagUtils.evaluateExpressionAsString("var", this.var,
            this, pageContext));

      table.setWidth(TagUtils.evaluateExpressionAsString("width",
            this.width, this, pageContext));

      table.setExcludeTool(TagUtils.evaluateExpressionAsString(
            "excludeTool", this.excludeTool, this, pageContext));

      table.setOddRowBgColor(TagUtils.evaluateExpressionAsString(
            "oddRowBgColor", this.oddRowBgColor, this, pageContext));
      table.setEvenRowBgColor(TagUtils.evaluateExpressionAsString(
            "evenRowBgColor", this.evenRowBgColor, this, pageContext));

      table.setHeight(TagUtils.evaluateExpressionAsString("height",
            this.height, this, pageContext));
      if (StringUtils.isBlank(table.getHeight())) {
         table.setHeight(TagUtils.evaluateExpressionAsString(
               "listHeight", this.listHeight, this, pageContext));
      }
      table.setMinHeight(TagUtils.evaluateExpressionAsString("minHeight",
            this.minHeight, this, pageContext));

      table.setListWidth(TagUtils.evaluateExpressionAsString("listWidth",
            this.listWidth, this, pageContext));

      table.setScrollList(TagUtils.evaluateExpressionAsBoolean(
            "scrollList", this.scrollList, this, pageContext));

      table.setResizeColWidth(TagUtils.evaluateExpressionAsBoolean(
            "resizeColWidth", this.resizeColWidth, this, pageContext));
      table.setMinColWidth(TagUtils.evaluateExpressionAsInt(
            "minColWidth", this.minColWidth, this, pageContext));

      table.setNearPageNum(TagUtils.evaluateExpressionAsString(
            "nearPageNum", this.nearPageNum, this, pageContext));
      table
            .setMaxRowsExported(TagUtils.evaluateExpressionAsString(
                  "maxRowsExported", this.maxRowsExported, this,
                  pageContext));

      table.setToolbarContent(TagUtils.evaluateExpressionAsString(
            "toolbarContent", this.toolbarContent, this, pageContext));
      table
            .setToolbarLocation(TagUtils.evaluateExpressionAsString(
                  "toolbarLocation", this.toolbarLocation, this,
                  pageContext));
      table.setAlwaysShowExtend(TagUtils.evaluateExpressionAsString(
            "alwaysShowExtend", this.alwaysShowExtend, this,
            pageContext));

      table.setTagAttributes(TagUtils.evaluateExpressionAsString(
            TableConstants.TAG_ATTRIBUTES, this.tagAttributes, this,
            pageContext));

      table.setIncludeParameters(TagUtils.evaluateExpressionAsString(
            "includeParameters", this.includeParameters, this,
            pageContext));
      table.setExcludeParameters(TagUtils.evaluateExpressionAsString(
            "excludeParameters", this.excludeParameters, this,
            pageContext));

      table.setShowHeader(TagUtils.evaluateExpressionAsBoolean(
            "showHeader", this.showHeader, this, pageContext));
      table.setPageSizeList(TagUtils.evaluateExpressionAsString(
            "pageSizeList", this.pageSizeList, this, pageContext));

      table.setMinWidth(TagUtils.evaluateExpressionAsString("minWidth",
            this.minWidth, this, pageContext));

      table.setEditable(TagUtils.evaluateExpressionAsBoolean("editable",
            this.editable, this, pageContext));
      if (StringUtils.isBlank(table.getAction())) {
         table.setAction(((HttpServletRequest) pageContext.getRequest())
               .getRequestURL().toString());
      }

      table.setAttribute(TableConstants.XLS_FILE, TagUtils
            .evaluateExpressionAsString(TableConstants.XLS_FILE,
                  this.xlsFileName, this, pageContext));

      table.setAttribute(TableConstants.CSV_FILE, TagUtils
            .evaluateExpressionAsString(TableConstants.CSV_FILE,
                  this.csvFileName, this, pageContext));

      table.setAttribute(TableConstants.PDF_FILE, TagUtils
            .evaluateExpressionAsString(TableConstants.PDF_FILE,
                  this.pdfFileName, this, pageContext));

      table.setAttribute(TableConstants.SHOW_PRINT, TagUtils
            .evaluateExpressionAsString(TableConstants.SHOW_PRINT,
                  this.showPrint, this, pageContext));

      exportsMaker(model, table);

      // }

      addTableAttributes(model, table);

      model.addTable(table);

      Object tempQueryResult = pageContext.findAttribute(String
            .valueOf(table.getItems()));
      if (tempQueryResult instanceof QueryResult) {
         queryResult = (QueryResult) tempQueryResult;
      } else {
         queryResult = null;
         tempQueryResult = null;
      }
      table.beforeBody();
   } catch (Exception e) {
      throw new JspException("TableTag.doStartTag() Problem: "
            + ExceptionUtils.formatStackTrace(e));
   }

   return EVAL_BODY_INCLUDE;
}

From source file:org.ecside.tag.TrTag.java

public int doStartTag() throws JspException {
    try {//from  w w  w .  j a v  a 2  s .  c om
       model = TagUtils.getModel(this);
          trBean=new Tr(model);
          trBean.setId(TagUtils.evaluateExpressionAsString("id", id, this, pageContext));
          trBean.setName(TagUtils.evaluateExpressionAsString("name", name, this, pageContext));
           trBean.setOnclick(TagUtils.evaluateExpressionAsString("onclick", onclick, this, pageContext));
           trBean.setOndblclick(TagUtils.evaluateExpressionAsString("ondblclick", ondblclick, this, pageContext));
           trBean.setOnmouseout(TagUtils.evaluateExpressionAsString("onmouseout", onmouseout, this, pageContext));
           trBean.setOnmouseover(TagUtils.evaluateExpressionAsString("onmouseover", onmouseover, this, pageContext));
                
           trBean.setTagAttributes(TagUtils.evaluateExpressionAsString(TableConstants.TAG_ATTRIBUTES, this.tagAttributes, this, pageContext));
            trBean.setStyle(TagUtils.evaluateExpressionAsString("style", style, this, pageContext));
            trBean.setStyleClass(TagUtils.evaluateExpressionAsString("styleClass", styleClass, this, pageContext));

                
    } catch (Exception e) {
        throw new JspException("TrTag.doStartTag() Problem: " + ExceptionUtils.formatStackTrace(e));
    }
        
    return EVAL_BODY_INCLUDE;
}