org.zkoss.zk.ui.http
Class WpdExtendlet

java.lang.Object
  extended by org.zkoss.zk.ui.http.WpdExtendlet
All Implemented Interfaces:
Extendlet
Direct Known Subclasses:
FileWpdExtendlet

public class WpdExtendlet
extends java.lang.Object

The extendlet to handle WPD (Widget Package Descriptor).

Note: it assumes all JavaScript files are encoded in UTF-8.

Bootstrapping

In additions to loading, WPD allows to bootstrap a JavaScript codes by specifying a parameter called main. For example, the following link

<script type="text/javascript" src="/zkdemo/zkau/web/js/zk.wpd?main=foo.Go&what=12&more=xy" charset="UTF-8">
</script>
will cause the following to be executed
zk.load('foo', function() {foo.Go.main({what: '123', more: 'xy'})});
In other words, it loads the package called foo, and then invoke the main method of the foo.Go class.

Since:
5.0.0
Author:
tomyeh

Field Summary
 
Fields inherited from interface org.zkoss.web.util.resource.Extendlet
ALLOW_DIRECT_INCLUDE
 
Constructor Summary
WpdExtendlet()
           
 
Method Summary
 boolean getFeature(int feature)
          Returns if the specified feature is supported.
 void init(ExtendletConfig config)
          Initializes the resouorce processor.
 boolean isDebugJS()
          Returns whether to generate JS files that is easy to debug.
 void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String path)
          Process the specified request.
 void setDebugJS(boolean debugJS)
          Sets whether to generate JS files that is easy to debug.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WpdExtendlet

public WpdExtendlet()
Method Detail

init

public void init(ExtendletConfig config)
Description copied from interface: Extendlet
Initializes the resouorce processor.


service

public void service(javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response,
                    java.lang.String path)
             throws javax.servlet.ServletException,
                    java.io.IOException
Description copied from interface: Extendlet
Process the specified request.

path - the path mapped to this resource processor.
Throws:
javax.servlet.ServletException
java.io.IOException

setDebugJS

public void setDebugJS(boolean debugJS)
Sets whether to generate JS files that is easy to debug.


isDebugJS

public boolean isDebugJS()
Returns whether to generate JS files that is easy to debug.


getFeature

public boolean getFeature(int feature)
Description copied from interface: Extendlet
Returns if the specified feature is supported.

Specified by:
getFeature in interface Extendlet


Copyright © 2005-2009 Potix Corporation. All Rights Reserved. SourceForge.net Logo