Community articlegetLiteralEx method
Added by IBM contributorIBM on May 2, 2012
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

No abstract provided.



Description

This method retrieves the literal of a node. The literal is returned in the specified character set.
Note: It is not necessary to call this method when you are using XForms. Use the extractXFormsInstance method instead.

Method

   public String getLiteralEx(
      String theCharSet
   ) throws UWIException;


Parameters

Table 1. Method parameters
ExpressionTypeDescription
theCharSetStringThe character set you want to use to view the literal string. Use null for ANSI/Unicode.


Returns

A string containing the literal of the node or throws a generic exception (UWIException) if an error occurs. If the literal is empty or does not exist, the method returns null.

Example

The following example uses dereferenceEx to locate a specific node. getLiteralEx is then used to get the literal value for that node.
   private static void getGender( ) throws UWIException
   {
   FormNodeP tempNode;   
   String temp;
 
      if ((tempNode = theForm.dereferenceEx(null, "PAGE1.MALERADIO.value", 
         0, FormNodeP.UFL_OPTION_REFERENCE | FormNodeP.UFL_SEARCH, null)) == 
         null)
      {
         throw new UWIException("Could not locate MALERADIO value node.");
      }
 
      temp = tempNode.getLiteralEx(null);
 
      /* additional code removed */
   }


Parent topic:
FormNodeP class