Search in sources :

Example 36 with JspWriter

use of javax.servlet.jsp.JspWriter in project head by mifos.

the class TableTag method getMultipleData.

private void getMultipleData(List list, Locale locale, Integer currentValue) throws TableTagTypeParserException, TableTagParseException, TableTagException, JspException, IOException, PageExpiredException {
    StringBuilder result = new StringBuilder();
    JspWriter out = pageContext.getOut();
    createStartTable(result, true, false);
    out.write(result.toString());
    int number = ((currentValue - 1) * pageSize);
    for (Object object : list) {
        Table table = helperMultipleData(object, locale);
        if (table != null) {
            displayDataMultiple(object, table, ++number, locale);
        } else {
            throw new JspException(MessageLookup.getLocalizedMessage(TableTagConstants.TABLENOTFOUND_ERROR));
        }
    }
    result = new StringBuilder();
    createEndTable(result, false);
    String action = (String) SessionUtils.getAttribute("action", pageContext.getSession());
    out.write(result.toString());
    String currentFlowkey = (String) ((HttpServletRequest) pageContext.getRequest()).getAttribute(Constants.CURRENTFLOWKEY);
    String perspective = (String) ((HttpServletRequest) pageContext.getRequest()).getAttribute(RequestConstants.PERSPECTIVE);
    out.write(PageScroll.getPages(currentValue, pageSize, size, action, currentFlowkey, locale, perspective));
    out.write("</table></td></tr>");
    out.write("</table>");
}
Also used : JspException(javax.servlet.jsp.JspException) JspWriter(javax.servlet.jsp.JspWriter)

Example 37 with JspWriter

use of javax.servlet.jsp.JspWriter in project head by mifos.

the class TableTag method getSingleData.

private void getSingleData(List list, Locale locale, Integer currentValue) throws TableTagParseException, TableTagException, JspException, IOException, PageExpiredException {
    String xmlFilePath = getSingleFile();
    Table table = helperCache(xmlFilePath, name);
    if (table != null) {
        StringBuilder result = new StringBuilder();
        JspWriter out = pageContext.getOut();
        boolean headingRequired = table.getPageRequirements().getHeadingRequired().equalsIgnoreCase("true");
        boolean topBlueLineRequired = table.getPageRequirements().getTopbluelineRequired().equalsIgnoreCase("true");
        createStartTable(result, headingRequired, topBlueLineRequired);
        out.write(result.toString());
        displayData(list, table, locale, currentValue);
    } else {
        throw new JspException(MessageLookup.getLocalizedMessage(TableTagConstants.TABLENOTFOUND_ERROR));
    }
}
Also used : JspException(javax.servlet.jsp.JspException) JspWriter(javax.servlet.jsp.JspWriter)

Example 38 with JspWriter

use of javax.servlet.jsp.JspWriter in project SpringStepByStep by JavaProgrammerLB.

the class StatusStyleTag method doTag.

@Override
public void doTag() throws JspException, IOException {
    JspWriter out = getJspContext().getOut();
    String statusStyle = TodoListUtils.getStatusStyle(status);
    out.print(statusStyle);
}
Also used : JspWriter(javax.servlet.jsp.JspWriter)

Example 39 with JspWriter

use of javax.servlet.jsp.JspWriter in project SpringStepByStep by JavaProgrammerLB.

the class PriorityIconTag method doTag.

@Override
public void doTag() throws JspException, IOException {
    JspWriter out = getJspContext().getOut();
    String priorityIcon = TodoListUtils.getPriorityIcon(Priority.valueOf(priority));
    out.print(priorityIcon);
}
Also used : JspWriter(javax.servlet.jsp.JspWriter)

Example 40 with JspWriter

use of javax.servlet.jsp.JspWriter in project wildfly by wildfly.

the class ExternalTag method doTag.

@Override
public void doTag() throws JspException, IOException {
    JspWriter out = getJspContext().getOut();
    out.println("External Tag!");
}
Also used : JspWriter(javax.servlet.jsp.JspWriter)

Aggregations

JspWriter (javax.servlet.jsp.JspWriter)49 IOException (java.io.IOException)21 JspException (javax.servlet.jsp.JspException)21 HttpServletRequest (javax.servlet.http.HttpServletRequest)9 Properties (java.util.Properties)6 HtmlCode (org.compiere.util.HtmlCode)6 org.apache.ecs.xhtml.select (org.apache.ecs.xhtml.select)5 ArrayList (java.util.ArrayList)3 Iterator (java.util.Iterator)3 List (java.util.List)3 HttpSession (javax.servlet.http.HttpSession)3 JspContext (javax.servlet.jsp.JspContext)3 PageContext (javax.servlet.jsp.PageContext)3 org.apache.ecs.xhtml.option (org.apache.ecs.xhtml.option)3 Element (org.dom4j.Element)3 StringWriter (java.io.StringWriter)2 Collection (java.util.Collection)2 JspTagException (javax.servlet.jsp.JspTagException)2 JspFragment (javax.servlet.jsp.tagext.JspFragment)2 StudyBean (org.akaza.openclinica.bean.managestudy.StudyBean)2