Community articleremoveEnclosure 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 will either remove an enclosure from a specific datagroup or delete the enclosure from the form. Call this method on the FormNodeP that contains the enclosure that you want to remove.


   public void removeEnclosure(
      String theDataGroup
   ) throws UWIException;


Table 1. Method parameters
theDataGroupStringThe datagroup that contains the enclosed item. If null, the item will be removed from all datagroups. If an item no longer belongs to any datagroups, it is deleted from the form.


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


The following example uses dereferenceEx to locate a specific data node. removeEnclosure is then used to remove the node from the form.
   private static void deleteLogo(FormNodeP theForm) throws Exception
   FormNodeP tempNode;
      if ((tempNode = theForm.dereferenceEx(null, "PAGE1.LOGODATA", 0,
         FormNodeP.UFL_ITEM_REFERENCE, null)) == null)
         throw new UWIException("Could not locate LOGODATA node.");

Parent topic:
FormNodeP class