Class PostUrl

java.lang.Object
overit.geocall.ui.PostUrl
All Implemented Interfaces:
SingleUseComponent

public class PostUrl extends Object implements SingleUseComponent
This class implements the SingleUseComponent interface, and represents an object that can be added to the page to create a form that can post some parameters and specifies where to send the form data when is submitted
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Map
     
    protected String
     
    protected String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    PostUrl(String url, Map postParams)
    Constructs a new PostUrl object
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Every component can add a script to the StringBuilder, script executed when the component is created.
    org.apache.ecs.Element
    Creates a form containing a list of hidden fields that corresponds to the values to pass in the Http POST method; sets the action of the form as the url used to construct the PostUrl object and the method to POST.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • _url

      protected String _url
    • _postParams

      protected Map _postParams
    • _uid

      protected String _uid
  • Constructor Details

    • PostUrl

      public PostUrl(String url, Map postParams)
      Constructs a new PostUrl object
      Parameters:
      url - The string that defines the URL
      postParams - The HashMap that contains the parameters that will be passed in the Http POST method
  • Method Details

    • buildSetupScript

      public void buildSetupScript(StringBuilder sb)
      Every component can add a script to the StringBuilder, script executed when the component is created. The PostUrl object adds the JavaScript string that defines the command of submit of the form created in the generation of the element's html (getHtml(EntitySet, overit.geocall.basic.ui.Window))
      Specified by:
      buildSetupScript in interface SingleUseComponent
      Parameters:
      sb - The StringBuilder on which we want to add the script
    • getHtml

      public org.apache.ecs.Element getHtml(EntitySet es, Window w)
      Creates a form containing a list of hidden fields that corresponds to the values to pass in the Http POST method; sets the action of the form as the url used to construct the PostUrl object and the method to POST.
      Specified by:
      getHtml in interface SingleUseComponent
      Parameters:
      es - The EntitySet
      w - The Window
      Returns:
      THe html of the form element created