Community articlesetLiteralEx method (Streaming API)
Added by IBM contributorIBM on July 26, 2013
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars


This method sets the literal of a node. You should only set the literal for option or argument nodes.
Note: It is not necessary to call this method when you are using XForms. Use the updateXFormsInstance method instead.


   public void setLiteralEx(
      String theCharSet,
      String theLiteral
      ) throws UWIException;


theCharSetStringThe character set in which theLiteral parameter is written. Use null or Unicode for Unicode.
theLiteralStringThe literal to assign to the node. If null, any existing literal is removed.


Nothing if call is successful or throws a generic exception (UWIException) if an error occurs.


Digital signatures:
Do not set the literal of a node that has already been signed. Doing so will break the digital signature and produce an error.


In the following example, dereferenceEx is used to locate a specific node. setLiteralEx is then used to change the literal of that node.
   private static void changeNameLabel(FormNodeP theForm, String newName)
      throws Exception
   FormNodeP tempNode;
      if ((tempNode = theForm.dereferenceEx(null, "PAGE1.NAMELABEL.value", 
         0, FormNodeP.UFL_OPTION_REFERENCE | FormNodeP.UFL_SEARCH, null)) == 
         throw new UWIException("Could not locate value node for
      tempNode.setLiteralEx(null, newName);

Parent topic:
FormNodeP class