Class UpdateBridge

  • All Implemented Interfaces:
    java.io.Serializable

    public abstract class UpdateBridge
    extends java.lang.Object
    implements java.io.Serializable
    A abstract util wrapping Bridge provide easier functionality for a servlet
    Since:
    3.0.0
    Author:
    dennis
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String _desktopId  
      protected javax.servlet.http.HttpServletRequest _request  
      protected javax.servlet.http.HttpServletResponse _response  
      protected javax.servlet.ServletContext _servletContext  
    • Constructor Summary

      Constructors 
      Constructor Description
      UpdateBridge​(javax.servlet.ServletContext servletContext, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, java.lang.String desktopId)  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      static org.zkoss.zk.ui.Desktop findDesktop​(javax.servlet.ServletContext ctx, javax.servlet.http.HttpServletRequest request, java.lang.String desktopId)  
      static org.zkoss.zk.ui.Desktop findDesktopIfAny​(javax.servlet.ServletContext ctx, javax.servlet.http.HttpServletRequest request, java.lang.String desktopId)
      find desktop in a servlet context for a request.
      boolean hasDesktop()  
      java.lang.String process()
      Process the bridge, find the desktop and call process(Desktop), and return the zk ajax update script
      protected abstract void process​(org.zkoss.zk.ui.Desktop desktop)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • _servletContext

        protected final javax.servlet.ServletContext _servletContext
      • _request

        protected final javax.servlet.http.HttpServletRequest _request
      • _response

        protected final javax.servlet.http.HttpServletResponse _response
      • _desktopId

        protected final java.lang.String _desktopId
    • Constructor Detail

      • UpdateBridge

        public UpdateBridge​(javax.servlet.ServletContext servletContext,
                            javax.servlet.http.HttpServletRequest req,
                            javax.servlet.http.HttpServletResponse resp,
                            java.lang.String desktopId)
    • Method Detail

      • hasDesktop

        public boolean hasDesktop()
      • process

        public java.lang.String process()
        Process the bridge, find the desktop and call process(Desktop), and return the zk ajax update script
      • findDesktopIfAny

        public static org.zkoss.zk.ui.Desktop findDesktopIfAny​(javax.servlet.ServletContext ctx,
                                                               javax.servlet.http.HttpServletRequest request,
                                                               java.lang.String desktopId)
        find desktop in a servlet context for a request.
        Parameters:
        ctx -
        request -
        desktopId -
        Returns:
      • findDesktop

        public static org.zkoss.zk.ui.Desktop findDesktop​(javax.servlet.ServletContext ctx,
                                                          javax.servlet.http.HttpServletRequest request,
                                                          java.lang.String desktopId)
      • process

        protected abstract void process​(org.zkoss.zk.ui.Desktop desktop)
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception