com.gisgraphy.webapp.taglib

## Class CountryTag

- java.lang.Object
- - javax.servlet.jsp.tagext.TagSupport
  - - com.gisgraphy.webapp.taglib.CountryTag

- All Implemented Interfaces:
    Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

      public class CountryTag
      extends javax.servlet.jsp.tagext.TagSupport

  Tag for creating multiple <select> options for displaying a list of country names.

  NOTE - This tag requires a Java2 (JDK 1.2 or later) platform.

  Version:
    $Revision: 1.4.2.1 $ $Date: 2006-06-10 08:00:48 -0600 (Sat, 10 Jun 2006) $
  Author:
    Jens Fischer, Matt Raible
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `CountryTag.LabelValueComparator` Class to compare LabelValues using their labels with locale-sensitive behaviour.

  - ### Field Summary

    - ### Fields inherited from class javax.servlet.jsp.tagext.TagSupport

      `id, pageContext`

    - ### Fields inherited from interface javax.servlet.jsp.tagext.IterationTag

      `EVAL_BODY_AGAIN`

    - ### Fields inherited from interface javax.servlet.jsp.tagext.Tag

      `EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CountryTag()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected List<LabelValue>` | `buildCountryList(Locale locale)` Build a List of LabelValues for all the available countries.
    `int` | `doStartTag()` Process the start of this tag.
    `void` | `release()` Release aquired resources to enable tag reusage.
    `void` | `setDefault(String selected)`
    `void` | `setName(String name)`
    `void` | `setPrompt(String prompt)`
    `void` | `setToScope(String scope)`

    - ### Methods inherited from class javax.servlet.jsp.tagext.TagSupport

      `doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CountryTag

          public CountryTag()

  - ### Method Detail

    - #### setName

          public void setName(String name)

    - #### setPrompt

          public void setPrompt(String prompt)

    - #### setDefault

          public void setDefault(String selected)

    - #### setToScope

          public void setToScope(String scope)

    - #### doStartTag

          public int doStartTag()
                         throws javax.servlet.jsp.JspException

      Process the start of this tag.
      Specified by:
        `doStartTag` in interface `javax.servlet.jsp.tagext.Tag`
      Overrides:
        `doStartTag` in class `javax.servlet.jsp.tagext.TagSupport`
      Returns:
        int status
      Throws:
        `javax.servlet.jsp.JspException` - if a JSP exception has occurred
      See Also:
        `Tag.doStartTag()`

    - #### release

          public void release()

      Release aquired resources to enable tag reusage.
      Specified by:
        `release` in interface `javax.servlet.jsp.tagext.Tag`
      Overrides:
        `release` in class `javax.servlet.jsp.tagext.TagSupport`
      See Also:
        `Tag.release()`

    - #### buildCountryList

          protected List<LabelValue> buildCountryList(Locale locale)

      Build a List of LabelValues for all the available countries. Uses the two letter uppercase ISO name of the country as the value and the localized country name as the label.
      Parameters:
        `locale` - The Locale used to localize the country names.
      Returns:
        List of LabelValues for all available countries.

Copyright © 2015. All rights reserved.