Oracle® WebCenter Interaction Development Kit 10.3.3.0.0

IAdminPage.GetContent Method 

Gets the content for the page in string form.

string GetContent(
   int errorCode,
   NamedValueMap pageInfo
);

Parameters

errorCode
The error code from the previous page if ValidationException is thrown, or null if no exception was thrown.
pageInfo
The NamedValueMap of page contents. If this is from an existing set of pages (IAdminEditor has previously called Finalize()), then the names in the
NamedValueMap
will be uppercased.

Return Value

The content of the page as a String.

Example

Example for selecting a filter for a newsgroup:

   SciPage sciPage = new SciPage();


   //deal with any validation exceptions- i.e. if errorCode != 0
   SciLabelElement errorElement = null;

   //the errorCode was defined when throwing the validation exception- 2 is for illustration only
   if (errorCode == 2)
   {
     //if we got an errorCode, we can assume that filter is not null as we have already filled in this page
     errorElement = new SciLabelElement(
         "No groups match filter " + filter + " select another filter",
         TypeStyle.STYLE_IMPORTANT);
   }

      //add a label element
      SciLabelElement labelElement = new SciLabelElement("Add a filter to restrict the list of groups, e.g. comp.lang.java.///. Only the first fifty matching groups will be listed.",
       TypeStyle.STYLE_NORMAL);

     // add a text box for the filter
     SciTextElement filterElement = new SciTextElement("Filter",
       "Enter a filter");
     filterElement.SetMandatoryValidation("You must enter a filter");
     filterElement.SetSize(40);

     //if we already have a filter, set the value of the text control
          String filter = pageInfo.Get("Filter");
     if (null != filter)
     {
       filterElement.SetValue(filter);
     }

     if (null != errorElement)
     {
       sciPage.Add(errorElement);
     }

   sciPage.Add(labelElement);
   sciPage.Add(filterElement);

 return sciPage.ToString();

See Also

IAdminPage Interface | Plumtree.Remote.Sci Namespace