WUI : API


org.westofj.wui
Class WInclude

java.lang.Object
  extended byorg.westofj.wui.Widget
      extended byorg.westofj.wui.WInclude

public class WInclude
extends Widget

Includes a resource external to the wui. If the specified URL starts with "resource:" the resource is included from the classpath. Otherwise the resource is included by utilizing a RequestDispatcher to perform an include on the specified URL.

Version:
$Revision: 1.6 $, $Date: 2004/03/22 00:34:01 $
Author:
bill

Constructor Summary
WInclude()
          Constructs an include widget.
WInclude(String url)
          Constructs an include widget that includes the resource identified by the specified URL.
 
Method Summary
static void addProtocolHandler(String protocol, WIncludeProtocolHandler handler)
           
 String getUrl()
          Returns the URL of the resource to be included.
 void render(WRunner runner, WRenderContext context, PrintWriter out)
          Renders the widget to the display.
 void setUrl(String url)
          Sets the URL that refers to the resource to be included.
 
Methods inherited from class org.westofj.wui.Widget
addChangeListener, getRunner, handleNoParams, handleParams, hasChangeListeners, removeChangeListener, stateChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WInclude

public WInclude()
Constructs an include widget.


WInclude

public WInclude(String url)
Constructs an include widget that includes the resource identified by the specified URL.

Parameters:
url - the URL that refers to the resource to be included.
Method Detail

addProtocolHandler

public static void addProtocolHandler(String protocol,
                                      WIncludeProtocolHandler handler)

render

public void render(WRunner runner,
                   WRenderContext context,
                   PrintWriter out)
            throws WRenderException
Description copied from class: Widget
Renders the widget to the display.

Specified by:
render in class Widget
Parameters:
runner - the current runner context.
out - the output for the display.
Throws:
WRenderException

getUrl

public String getUrl()
Returns the URL of the resource to be included.

Returns:
String the URL of the resource to be included.

setUrl

public void setUrl(String url)
Sets the URL that refers to the resource to be included.

Parameters:
url - The URL that refers to the resource to be included.

Copyright (c) 2003 West of J - All rights reserved.