Class ActionContextJavaScriptResolution

java.lang.Object
sk.iway.iwcm.system.stripes.ActionContextJavaScriptResolution
All Implemented Interfaces:
net.sourceforge.stripes.action.Resolution

public class ActionContextJavaScriptResolution extends Object implements net.sourceforge.stripes.action.Resolution
ActionContextJavaScriptResolution.java

Resolution that will convert a Java object web to a web of JavaScript objects and arrays, and stream the JavaScript back to the client. The output of this resolution can be evaluated in JavaScript using the eval() function, and will return a reference to the top level JavaScript object. For more information see JavaScriptBuilder

Resolution builds up result from the object of current ActionBean context returning simple containing involved validation errors if they occur.

source: http://blog.novoj.net/2008/01/25/running-ajax-with-jquery-in-stripes-framework/
  • Constructor Summary

    Constructors
    Constructor
    Description
    ActionContextJavaScriptResolution(net.sourceforge.stripes.action.ActionBean actionBean)
    Constructs a new JavaScriptResolution that will convert the supplied object to JavaScript.
  • Method Summary

    Modifier and Type
    Method
    Description
    composeErrorsHtml(net.sourceforge.stripes.validation.ValidationErrors errors, javax.servlet.ServletRequest request)
    Compose HTML snippet with messages based on standard properties enveloping used by Stripes <html:messages/> tag.
    void
    execute(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
    Converts the object passed in to JavaScript and streams it back to the client.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ActionContextJavaScriptResolution

      public ActionContextJavaScriptResolution(net.sourceforge.stripes.action.ActionBean actionBean)
      Constructs a new JavaScriptResolution that will convert the supplied object to JavaScript.
      Parameters:
      actionBean -
  • Method Details

    • execute

      public void execute(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
      Converts the object passed in to JavaScript and streams it back to the client.
      Specified by:
      execute in interface net.sourceforge.stripes.action.Resolution
      Throws:
      Exception
    • composeErrorsHtml

      public String composeErrorsHtml(net.sourceforge.stripes.validation.ValidationErrors errors, javax.servlet.ServletRequest request)
      Compose HTML snippet with messages based on standard properties enveloping used by Stripes <html:messages/> tag.
      Parameters:
      errors -
      request -
      Returns: