Class WebURLBean

java.lang.Object
com.webmethods.caf.faces.bean.web.WebURLBean
Direct Known Subclasses:
CurrentURLBean

public class WebURLBean extends Object
Bean which can be used to build a generic url, using the bean's properties as request parameters. In addition to the bean's typed properties, parameters can be added to the bean dynamically via its urlParams map (see getUrlParams()). All of the bean's properties, both typed and dynamic, must be of type String.
  • Field Details

  • Constructor Details

    • WebURLBean

      public WebURLBean()
      Creates a new bean with no base url (use setUrlBase(java.lang.String) to set the base url).
    • WebURLBean

      public WebURLBean(String url)
      Creates a new bean with the specified base url.
  • Method Details

    • toString

      public String toString()
      Renders this bean to a url, using the properties of this bean as url parameters.
      Overrides:
      toString in class Object
    • redirect

      public void redirect() throws IOException
      Redirects the current faces request to this url.
      Throws:
      IOException
    • getUrl

      public String getUrl()
      Renders this bean to a url, using the properties of this bean as url parameters.
    • setUrl

      public void setUrl(String url)
      Sets the state of this bean to match the specified url (clearing path and all old request parameters before setting new state).
    • getUrlPath

      public String getUrlPath()
      Path part of url.
    • setUrlPath

      public void setUrlPath(String path)
      Path part of url.
    • getUrlParams

      public Map<String,String> getUrlParams()
      Request parameters of url. This map represents both the typed properties of this bean, as well as any properties added dynamically to this map.
    • setUrlParams

      public void setUrlParams(Map<String,String> params)
      Request parameters of url. This map represents both the typed properties of this bean, as well as any properties added dynamically to this map.
    • setUrlBase

      public void setUrlBase(String url)
      Sets the state of this bean using the specified url (not clearing parameters left unspecified by url).