webwork.view.velocity
Class URLBean

java.lang.Object
  extended bywebwork.view.velocity.URLBean

public class URLBean
extends java.lang.Object

A utility class that is used to URL-encode links in Velocity templates.

Author:
Dave Bryson (daveb@miceda-data.com)

Constructor Summary
URLBean()
           
 
Method Summary
 URLBean addParameter(java.lang.String name, java.lang.Object value)
          Add a parameter to the URL.
 java.lang.String getPage()
           
 java.lang.String getURL()
          Generates the URL.
 URLBean setPage(java.lang.String page)
          Set the page.
 void setRequest(javax.servlet.http.HttpServletRequest req)
          Set the HttpRequest
 void setResponse(javax.servlet.http.HttpServletResponse resp)
          Set the HttpServletResponse
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

URLBean

public URLBean()
Method Detail

getPage

public java.lang.String getPage()
Returns:
String the page name

setPage

public URLBean setPage(java.lang.String page)
Set the page.

Parameters:
page - the page name
Returns:
URLBean this

addParameter

public URLBean addParameter(java.lang.String name,
                            java.lang.Object value)
Add a parameter to the URL. Cut and paste from the UrlTag in WebWork

Parameters:
name - the parameter name
value - the parameter value
Returns:
URLBean this

setRequest

public void setRequest(javax.servlet.http.HttpServletRequest req)
Set the HttpRequest

Parameters:
req - the request

setResponse

public void setResponse(javax.servlet.http.HttpServletResponse resp)
Set the HttpServletResponse

Parameters:
resp - the response

getURL

public java.lang.String getURL()
Generates the URL. This is called automatically in the Velocity template. In otherwords, you do not need to explicitly call toString() This is pretty much a cut and paste of code from the URLTag in Webwork

Returns:
String the generated URI

toString

public java.lang.String toString()


Copyright © 2001-2003 WebWork All Rights Reserved.