<%@ taglib uri="http://xmlns.oracle.com/uix/ui" prefix="homeuix" %> <%@ taglib uri="http://xmlns.oracle.com/oem/jsp/tag" prefix="homeoem" %> <%-- To use the page, the component needs to follow a few simple steps: 1. write a home page jsp like that below. This is basically an include of the generic home page, plus building a tree for the top right plugin 2. add a view model for this home page to the controller, the view model should extend oracle.sysman.emSDK.tgt.home.HomePageHandler. The HomePageHandler provides the databindings for the generic home page. The extended home view model should also add databindings for the top right plugin if needed. 3. add code to query target-specific data from the repository by implementing public void prepareTargetData(PageInfo pageInfo, OracleConnection connection) 4. implement data binding methods for any target specific data, e.g. in home.jsp <... textBinding="myAttr" /> in home.java public String getMyAttr() { return m_myAttr; } 5. specify the sub tabs to use in the page by overridding getSubTabs public SubTabs getSubTabs(PageInfo pageInfo) { SubTabs subTabs = new SubTabs(); subTabs.addHomeTab(pageInfo); // required! subTabs.addSubTab(tabName, tabDest); return subTabs; } 6. add any additional metrics to the metric list by overriding getGeneralMetrics public GeneralMetrics getGeneralMetrics(PageInfo pageInfo) { GeneralMetrics metrics = new GeneralMetrics(); metrics.addGerneralMetrics(metricLabel, metricValue, metricDest); return metrics; } 7. add any related links by overriding getRelatedLinks 8. add any related targets by overridding getRelatedTargets sample home page template: ----------------------------------- <%@ taglib uri="http://xmlns.oracle.com/uix/ui" prefix="uix" %> <%@ taglib uri="http://xmlns.oracle.com/oem/jsp/tag" prefix="oem" %> <%@include file="/sdk/homeTemplate.jsp" %> ----------------------------------- Note: this is a macro include so the user doesn't have to ref this tree. --%> <%@ page import='java.util.Map' %> <%@ page import='java.util.List' %> <%@ page import='java.util.Iterator' %> <%@ include file="/em2go/em2goHrGlobal.jspf" %> <%@ include file="/enablePPR.jspf" %> <%@ include file="/em2go/em2goBreadCrumbs.jspf" %> <%-- unfortunately, the only way to do iterate over a list is to either use a JSTL tag, create a custom tag, or use this code. If it will be a while before we start using JSTL, we should put this in a custom iterator --%> <% java.util.List metricsList = (java.util.List)request.getAttribute("generalMetrics"); int itemCount = metricsList.size(); if (metricsList != null) { for (java.util.Iterator i=metricsList.iterator(); i.hasNext(); ) { java.util.Map map = (Map)i.next(); String name = (String)map.get("name"); if("Alias".equals(name)|| "Version".equals(name)|| "Oracle Home".equals(name)|| "TNS Address".equals(name)|| "".equals(name)|| "LISTENER.ORA Location".equals(name)|| "Host".equals(name)|| "Start Time".equals(name) ){ continue; } String value = (String)map.get("value"); String link = (String)map.get("link"); String style = (String)map.get("style"); Boolean buttonVisible = (Boolean)map.get("buttonVisible"); String buttonLabel = (String)map.get("buttonLabel"); String buttonLink = (String)map.get("buttonLink"); if (link == null) { %> <% if("Status".equals(name)){ %> <% }else{ %> <% }//else of if("Status".equals(name)) } else { %> <% } } } %> <% SubTabs subTabs = (SubTabs)request.getAttribute("subTabs"); List subTabList = subTabs.getSubTabs(); if (subTabList != null) { for (Iterator i=subTabList.iterator(); i.hasNext(); ) { Map map = (Map)i.next(); String name = (String)map.get("name"); String link = (String)map.get("link"); %> <% } } %> <% java.lang.Object otherPlugin = request.getAttribute("homeOtherPlugin"); if (otherPlugin != null) { %> <% } %> <%@ include file="/em2go/em2goThinFooter.jspf" %>