Package net.sourceforge.stripes.action

Examples of net.sourceforge.stripes.action.StreamingResolution


    /** A very simple add event that returns the result in the response stream. */
    @HandlesEvent("addAndStream")
    public Resolution addAndStream() {
        this.result = lhs + rhs;
        return new StreamingResolution("text/plain", new StringReader(String.valueOf(this.result)));
    }
View Full Code Here


      this.getContext().setAttributeToSession("reason",
          exception.getLocalizedMessage());
      this.getContext().setAttributeToSession("stackTrace",
          exception.getStackTrace());
    }
    return new StreamingResolution("text/html", new StringReader(message));
  }
View Full Code Here

        message.append("<div class=\"error\">");
        message.append(error.getMessage(getContext().getLocale()));
        message.append("</div>");
      }
    }
    return new StreamingResolution("text/html", new StringReader(message
        .toString()));
  }
View Full Code Here

    StringBuilder listOfTimeVals = new StringBuilder("<ul>");
    for (String time : timeArray) {
      listOfTimeVals.append("<li>" + time + "</li>");
    }
    listOfTimeVals.append("</ul>");
    return new StreamingResolution("text/html", new StringReader(
        listOfTimeVals.toString()));
  }
View Full Code Here

      details
          .append(EsimsUtils
              .createWarnMessage(this.getContext()
                  .getContextPath(),
                  "No details were found for the given Form #, please recheck"));
      return new StreamingResolution("text/html", new StringReader(
          details.toString()));
    } else {
      StudentDetails studentDetails = EsimsUtils
          .createStudentDetailsFromApplicationForm(applicationForms
              .get(0));
      details
          .append("Please cross-verify the following details before admitting,<br><strong>");

      details.append(studentDetails.getFirstName().toUpperCase());
      details.append(EsimsConstants._SPACE);
      details.append(studentDetails.getLastName().toUpperCase());
      details.append("<br>");
      details.append("Born on ");
      details.append(studentDetails.getDateOfBirth());
      details.append("<br>");
      details.append("Son/Daughter of ");
      details.append(studentDetails.getFatherFirstName().toUpperCase());
      details.append(EsimsConstants._SPACE);
      details.append(studentDetails.getFatherLastName().toUpperCase());
      details.append("</strong>");
      return new StreamingResolution("text/html", new StringReader(
          EsimsUtils.createImportantMessage(this.getContext()
              .getContextPath(), details.toString())));

    }
View Full Code Here

        .getByFormNumber(this.applicationFormNumber);
    if ((applicationForms == null || applicationForms.size() == 0)) {
      message = EsimsUtils
          .createWarnMessage(this.getContext().getContextPath(),
              "No details were found for the given Form #, please recheck");
      return new StreamingResolution("text/html", new StringReader(
          message.toString()));
    } else {
      StudentDetails studentDetails = EsimsUtils
          .createStudentDetailsFromApplicationForm(applicationForms
              .get(0));
View Full Code Here

        message.append("</div>");
      }
    }
    if (this.getContext().getEventName().equals("admitStudent"))
      return this.getContext().getSourcePageResolution();
    return new StreamingResolution("text/html", new StringReader(message
        .toString()));
  }
View Full Code Here

    StringBuilder listOfTimeVals = new StringBuilder("<ul>");
    for (String time : timeArray) {
      listOfTimeVals.append("<li>" + time + "</li>");
    }
    listOfTimeVals.append("</ul>");
    return new StreamingResolution("text/html", new StringReader(
        listOfTimeVals.toString()));
  }
View Full Code Here

    StringBuilder listOfTimeVals = new StringBuilder("<ul>");
    for (String time : timeArray) {
      listOfTimeVals.append("<li>" + time + "</li>");
    }
    listOfTimeVals.append("</ul>");
    return new StreamingResolution("text/html", new StringReader(
        listOfTimeVals.toString()));
  }
View Full Code Here

      return this.getContext().getSourcePageResolution();
    if ((this.getContext().getEventName().equalsIgnoreCase(
        "searchByAcademicYear") && errors.size() > 0))
      return this.getContext().getSourcePageResolution();
    else
      return new StreamingResolution("text/html", new StringReader(
          message.toString()));
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.stripes.action.StreamingResolution

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.