Community articlecheckValidFormats 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 checks the format of either all items on the form or all items on a single page. It returns a list of items that have non valid formats.


   public FormNodeP checkValidFormats( )throws UWIException; 


There are no parameters for this method.


An array of nodes that represent items with non valid formats.


The following method takes the root node of the form as input, calls checkValidFormats, then displays a message for each non valid node that it finds.
   public void checkFormats(FormNodeP theForm) throws UWIException
   FormNodeP [] invalidItems;
   String theReference;
      invalidItems = theForm.checkValidFormats();
      if (invalidItems == null || invalidItems.length == 0)
         System.out.println("All items in the form have valid formats.");
         for (int i=0; i<invalidItems.length; i++)
            theReference = invalidItems [i].getReferenceEx(null, null, null, false);
            System.out.println("The item "+theReference+" has an invalid format."); 

Parent topic:
FormNodeP class