|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Root interface for all SciElement
s. This includes SciCheckboxElement, SciPasswordElement, SciRadioElement,
SciSelectElement and SciTreeElement.
Developers wanting to add other elements to an SCI page should implement this interface and
set the xmlns attribute on the root xml node to "http://www.w3.org/1999/xhtml"
Method Summary | |
org.w3c.dom.Node |
getRootNode()
Gets the root Node of this control to add to the SCI page. |
Method Detail |
public org.w3c.dom.Node getRootNode()
Node
of this control to add to the SCI page.
Node
//Simple Example Code to make a link to Google: //nested class implementing ISciElement class LinkElement implements ISciElement { private org.w3c.dom.Document m_doc; public Node getRootNode() { return m_doc.getDocumentElement(); } public LinkElement() { m_doc = new CoreDocumentImpl(); //make an anchor element Element link = m_doc.createElement("a"); //set the correct namespace so the portal will treat it as raw html link.setAttribute("xmlns","http://www.w3.org/1999/xhtml"); //set the href link.setAttribute("href", "http://www.google.com"); //create a text node for the link text Node textNode = m_doc.createTextNode("google"); link.appendChild(textNode); m_doc.appendChild(link); } } // use this in getPageContent: public String getContent(int pageNumber, NamedValueMap pageInfo) throws ServiceException { SciPage page = new SciPage(); ISciElement linkElement = new LinkElement(); page.add(linkElement); return page.toString(); }
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright ©2010 Oracle® Corporation. All Rights Reserved.