Community articlegetPrevious 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.


This method, along with getNext, is used to traverse horizontally along the form hierarchy. getPrevious returns the previous node in the tree. For instance, if you call getPrevious on the Page1 node in your form, it will return the global page node.


   public FormNodeP getPrevious( ) throws UWIException;


There are no parameters for this method.


The FormNodeP that represents the previous node or null if no such node exists. A generic exception (UWIException) is thrown if an error occurs.


In the following example the root node of a form is represented by a FormNodeP called theForm. The method dereferenceEx is used to retrieve an item from the form called NAMELABEL. Then getPrevious is used to retrieve a second item that is the sibling node before NAMELABEL.
   public class getFunctions
   private static FormNodeP theForm;
   private static FormNodeP tempNode;
   private static FormNodeP prevNode;
   /* Additional Code Removed */
      public static void main(String argv [])
         /* Additional Code Removed */
         if ((tempNode = theForm.dereferenceEx(null, "PAGE1.NAMELABEL", 
            0,FormNodeP.UFL_ITEM_REFERENCE, null)) == null)
            throw new UWIException("Could not locate Name label node.");
         prevNode = tempNode.getPrevious( );
         /* Additional Code Removed */

Parent topic:
FormNodeP class