com.beasys.commerce.webflow
Class WebflowJSPHelper
java.lang.Object
|
+--com.beasys.commerce.webflow.WebflowJSPHelper
- public class WebflowJSPHelper
- extends java.lang.Object
WebflowJSPHelper
provides utility methods needed by
JSP's.
Handles multiple web-apps now.
Field Summary |
static java.text.NumberFormat |
numberFormat
A numberFormat object. |
static java.lang.String |
WLCS_APPLICATION_URL
A constant that defines the default the WLCS_APPLICATION_URL context
parameter from the web.xml file. |
Method Summary |
static java.lang.String |
createGIFURL(javax.servlet.http.HttpServletRequest request,
com.beasys.commerce.webflow.HttpServletResponse response,
java.lang.String url)
Returns a URL for GIF's and other resources. |
static java.lang.String |
createWebflowURL(com.beasys.commerce.webflow.PageContext pageContext,
java.lang.String origin,
java.lang.String event,
boolean isFullyQualified)
Returns a URL for Webflow. |
static java.lang.String |
createWebflowURL(com.beasys.commerce.webflow.PageContext pageContext,
java.lang.String origin,
java.lang.String event,
java.lang.String url,
boolean isFullyQualified)
Returns a URL for Webflow. |
static java.lang.String |
encodeURL(com.beasys.commerce.webflow.HttpServletResponse response,
java.lang.String url)
Encodes a given URL string using response.encodeURL(). |
static java.lang.String |
priceFormat(double price)
Formats Price to Display in the JSP |
static java.lang.String |
quantityFormat(double quantity)
Formats quantity to display in the JSP. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WLCS_APPLICATION_URL
public static final java.lang.String WLCS_APPLICATION_URL
- A constant that defines the default the WLCS_APPLICATION_URL context
parameter from the web.xml file.
numberFormat
public static java.text.NumberFormat numberFormat
- A numberFormat object.
WebflowJSPHelper
public WebflowJSPHelper()
encodeURL
public static java.lang.String encodeURL(com.beasys.commerce.webflow.HttpServletResponse response,
java.lang.String url)
- Encodes a given URL string using response.encodeURL().
- Parameters:
request
- HttpServletResponse object.
createWebflowURL
public static java.lang.String createWebflowURL(com.beasys.commerce.webflow.PageContext pageContext,
java.lang.String origin,
java.lang.String event,
boolean isFullyQualified)
throws com.beasys.commerce.webflow.JspException
- Returns a URL for Webflow.
- Parameters:
pageContext
- The PageContext object.origin
- Origin of the webflow event.event
- Webflow event.isFullyQualified
- If this is true then the given origin
and event will be included as parameters in the generated URL.
A value of false is suitable for requests, with hidden origin
and event parameters.
createWebflowURL
public static java.lang.String createWebflowURL(com.beasys.commerce.webflow.PageContext pageContext,
java.lang.String origin,
java.lang.String event,
java.lang.String url,
boolean isFullyQualified)
throws com.beasys.commerce.webflow.JspException
- Returns a URL for Webflow.
- Parameters:
pageContext
- The PageContext object.origin
- Origin of the webflow event.event
- Webflow event.url
- If null, defaults to WLCS_APPLICATION_URL. Else,
should be relative to
WLCS_APPLICATION_URL. WLCS_APPLICATION_URL is a context
parameter defined in WEB-INF/web.xml.isFullyQualified
- If this is true then the given origin
and event will be included as parameters in the generated URL.
A value of false is suitable for requests, with hidden origin
and event parameters.
createGIFURL
public static java.lang.String createGIFURL(javax.servlet.http.HttpServletRequest request,
com.beasys.commerce.webflow.HttpServletResponse response,
java.lang.String url)
- Returns a URL for GIF's and other resources. The URL
will be relative to the property commerce.gif.url.base
if it is set in weblogiccommerce.properties.
If not it will be relative to the web application root.
- Parameters:
request
- The HttpServletRequest object.response
- The HttpServletResponse object.url
- Relative URL to GIF.- Returns:
- URL to use.
priceFormat
public static java.lang.String priceFormat(double price)
- Formats Price to Display in the JSP
- Parameters:
price
- double.
quantityFormat
public static java.lang.String quantityFormat(double quantity)
- Formats quantity to display in the JSP.
- Parameters:
quantity
- number to format
Copyright © 2001 BEA Systems, Inc. All Rights Reserved