Class UserInput

  • All Implemented Interfaces:
    Serializable

    public class UserInput
    extends LocaleSource
    The UserInput class calls the request.getParameter(LocaleSource.Parameter) method to retrieve the user input. The user input locales are cached for subsequent use in the session. Note that the multipart request object is not supported.

    In typical web applications, user input comes from web clients that submit a form containing a locale and its attributes. The UserInput class is used when the application allows users to specify their language preference. By default, the parameters defined in the LocaleSource.Parameter class are recognized as the user input locale. Default Caching : This locale source is not cached in the session by default

    The UserInput locale source is declared in the gdkapp.xml configuration file via the locale-determine-rule hierarchy:

      <locale-determine-rule>
          <locale-source>
              oracle.i18n.servlet.localesource.UserInput
          </locale-source>
      </locale-determine-rule>
     

    The UserInput locale source rule can then be invoked from an HTML page, if a locale parameter with a value is posted. In the sample code below, selecting a locale and then submitting a button will result in an HTTP Post that the GDK intercepts and results in the change of the user interface language for the response.
      <html>
        ....
        
        <form>
          <select name="locale" size="1">
            <option value="de_CH">Switzerland [de_CH]</option>
            <option value="en_US">United States [en_US]</option>
          </select>
          <input  type="submit" value="Submit" />
        </form>
        
        ....
     </html>
     
     
    Since:
    10.1.0.2
    See Also:
    Serialized Form