All Implemented Interfaces:
TagBase, Serializable, Cloneable

public class Form extends AbstractHtml
Since:
1.0.0
See Also:
  • Constructor Details

    • Form

      public Form(AbstractHtml base, AbstractAttribute... attributes)
      Parameters:
      base - i.e. parent tag of this tag
      attributes - An array of AbstractAttribute
      Since:
      1.0.0
  • Method Details

    • init

      protected void init()
      invokes only once per object
      Since:
      1.0.0
    • getNameBasedJsObject

      public String getNameBasedJsObject(Collection<String> onlyForTagNames)
      prepares and gets the js object for the given tag names under this form tag. This js object may be used to return in onsubmit attribute.
      Parameters:
      onlyForTagNames - TagNameConstants.INPUT, TagNameConstants.TEXTAREA and TagNameConstants.SELECT. Pass object of List, HashSet based on the number of elements in it.
      Returns:
      the js object string for the given tag names. The returned js string will be as {name1.name1.value} where name1 is the value of name attribute of the field.
      Since:
      2.1.8, 2.1.13 changed Collection<Set> onlyForTagNames to Collection<String> onlyForTagNames.
    • getIdBasedJsObject

      public String getIdBasedJsObject(Collection<String> onlyForTagNames)
      prepares and gets the js object for the given tag names under this form tag. This js object may be used to return in onsubmit attribute.
      Parameters:
      onlyForTagNames - TagNameConstants.INPUT, TagNameConstants.TEXTAREA and TagNameConstants.SELECT Pass object of List, HashSet based on the number of elements in it.
      Returns:
      the js object string for the given tag names. The returned js string will be as {name1:document.getElementById('name1').value} where name1 is the value of id attribute of the field.
      Since:
      2.1.13
    • getIdBasedJsObject

      public String getIdBasedJsObject(String functionName, Collection<String> onlyForTagNames)
      prepares and gets the js object for the given tag names under this form tag. This js object may be used to return in onsubmit attribute.
      Parameters:
      functionName - the function name to get the element, eg: document.getElementById
      onlyForTagNames - TagNameConstants.INPUT, TagNameConstants.TEXTAREA and TagNameConstants.SELECT Pass object of List, HashSet based on the number of elements in it.
      Returns:
      the js object string for the given tag names. The returned js string will be as {name1:document.getElementById('name1').value} where name1 is the value of id attribute of the field.
      Since:
      3.0.1
    • getNameBasedJsObject

      public String getNameBasedJsObject()
      prepares and gets the js object for the input tag names (TagNameConstants.INPUT, TagNameConstants.TEXTAREA and TagNameConstants.SELECT) under this form tag.
      NB:- If there are any missing input tag types, please inform webfirmframework to update this method.
      This js object may be used to return in onsubmit attribute.
      Returns:
      the js object string for field names of TagNameConstants.INPUT, TagNameConstants.TEXTAREA and TagNameConstants.SELECT. The returned js string will be as {name1:name1.value} where name1 is the value of name attribute of the field. If the input type is checkbox/radio then checked property will be included instead of value property.
      Since:
      2.1.8
    • getIdBasedJsObject

      public String getIdBasedJsObject()
      prepares and gets the js object for the input tag names (TagNameConstants.INPUT, TagNameConstants.TEXTAREA and TagNameConstants.SELECT) under this form tag.
      NB:- If there are any missing input tag types, please inform webfirmframework to update this method.
      This js object may be used to return in onsubmit attribute.
      Returns:
      the js object string for field names of TagNameConstants.INPUT, TagNameConstants.TEXTAREA and TagNameConstants.SELECT. The returned js string will be as {name1:document.getElementById('name1').value} where name1 is the value of id attribute of the field. If the input type is checkbox/radio then checked property will be included instead of value property.
      Since:
      2.1.13
    • getIdBasedJsObject

      public String getIdBasedJsObject(String functionName)
      prepares and gets the js object for the input tag names (TagNameConstants.INPUT, TagNameConstants.TEXTAREA and TagNameConstants.SELECT) under this form tag.
      NB:- If there are any missing input tag types, please inform webfirmframework to update this method.
      This js object may be used to return in onsubmit attribute.
      Parameters:
      functionName - function name to get element, Eg: document.getElementById
      Returns:
      the js object string for field names of TagNameConstants.INPUT, TagNameConstants.TEXTAREA and TagNameConstants.SELECT. The returned js string will be as {name1:gebi('name1').value} where name1 is the value of id attribute of the field and gebi is the function name to get element. If the input type is checkbox/radio then checked property will be included instead of value property.
      Since:
      3.0.1
    • getIdBasedJsObjectPlus

      public String getIdBasedJsObjectPlus(Collection<String> additionalTagNames)
      prepares and gets the js object for the input tag names (TagNameConstants.INPUT, TagNameConstants.TEXTAREA and TagNameConstants.SELECT) under this form tag.
      NB:- If there are any missing input tag types, please inform webfirmframework to update this method.
      This js object may be used to return in onsubmit attribute.
      Parameters:
      additionalTagNames - Tag names other than TagNameConstants.INPUT, TagNameConstants.TEXTAREA and TagNameConstants.SELECT. Pass object of List, HashSet based on the number of elements in it.
      Returns:
      the js object string for field names of TagNameConstants.INPUT, TagNameConstants.TEXTAREA and TagNameConstants.SELECT. The returned js string will be as {name1:document.getElementById('name1').value} where name1 is the value of id attribute of the field. If the input type is checkbox/radio then checked property will be included instead of value property.
      Since:
      2.1.13
    • getIdBasedJsObjectPlus

      public String getIdBasedJsObjectPlus(String functionName, Collection<String> additionalTagNames)
      prepares and gets the js object for the input tag names (TagNameConstants.INPUT, TagNameConstants.TEXTAREA and TagNameConstants.SELECT) under this form tag.
      NB:- If there are any missing input tag types, please inform webfirmframework to update this method.
      This js object may be used to return in onsubmit attribute.
      Parameters:
      functionName - function name to get element, Eg: document.getElementById
      additionalTagNames - Tag names other than TagNameConstants.INPUT, TagNameConstants.TEXTAREA and TagNameConstants.SELECT. Pass object of List, HashSet based on the number of elements in it.
      Returns:
      the js object string for field names of TagNameConstants.INPUT, TagNameConstants.TEXTAREA and TagNameConstants.SELECT. The returned js string will be as {name1:gebi('name1').value} where name1 is the value of id attribute of the field and gebi is the function name to get the element. If the input type is checkbox/radio then checked property will be included instead of value property.
      Since:
      3.0.1