Edit D:\app\Administrator\product\11.2.0\dbhome_1\oc4j\j2ee\oc4j_applications\applications\em\em\sdk\groupHomeTemplateEm2go.jspf
<%@ 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" %> <homeuix:buildTree nodeID="homePlugin"> <homeuix:flowLayout> <homeuix:text textBinding="image@viewModel@servletRequest" /> </homeuix:flowLayout> </homeuix:buildTree> <%@include file="/sdk/groupHomeTemplate.jsp" %> ----------------------------------- Note: this is a macro include so the user doesn't have to ref this tree. --%> <%@ include file="/em2go/em2goHrGlobal.jspf" %> <jsp:include page="/sdk/em2go/alertsInclude.jsp" /> <%@ page import='java.util.Map' %> <%@ page import='java.util.List' %> <%@ page import='java.util.Iterator' %> <homeuix:renderingContext id="renderingContext"> <homeoem:setURLEncoder id="renderingContext"/> <homeuix:bundle name="sdkMsg" class="oracle.sysman.emSDK.eml.SDKUIMsg"/> <homeuix:bundle name="mntrResourceBundle" class="oracle.sysman.resources.MntrResourceBundle"/> <homeuix:dataScope currentDataBinding="viewModel@servletRequest" > <homeuix:document> <homeuix:metaContainer> <homeuix:head titleBinding="targetDisplayName" /> </homeuix:metaContainer> <homeuix:body> <%-- <homeuix:form name="groupHomeForm" method="POST" destinationBinding="samePageURL@viewModel@servletRequest"> --%> <homeuix:header textBinding="targetDisplayName" /> <homeuix:tableLayout width="100%" > <homeuix:rowLayout hAlign="left"> <homeuix:cellFormat> <homeuix:rowLayout> <homeuix:styledText styleClass="OraHeaderSubSub" textBinding="targetDisplayName"/> </homeuix:rowLayout> </homeuix:cellFormat> </homeuix:rowLayout> </homeuix:tableLayout> <homeuix:tableLayout width="100%" > <homeuix:rowLayout hAlign="right"> <homeuix:cellFormat> <homeuix:rowLayout> <homeuix:styledText styleClass="OraInlineInfoText" textBinding="PAGE_REFRESHED_TIME@sdkMsg"/> <homeuix:styledText styleClass="OraInlineInfoText" textBinding="lastUpdateTime"/> <homeuix:spacer width="4"/> <homeuix:button rendered="false" textBinding="EDIT_GROUP_DEFINITION@sdkMsg" destinationBinding="editGroupLink" /> </homeuix:rowLayout> </homeuix:cellFormat> </homeuix:rowLayout> </homeuix:tableLayout> <homeuix:contents> <!-- homeuix:ref refID="topTabBar" / --> <homeuix:tableLayout width="100%" cellSpacing="10"> <homeuix:rowLayout vAlign="top"> <homeuix:cellFormat width="50%"> <homeuix:header textBinding="GENERAL@sdkMsg"> <homeuix:styledText styleClass="OraHeaderSubSub" textBinding="GENERAL@sdkMsg"/> <homeuix:borderLayout> <homeuix:tableLayout width="100%" hAlign="left" > <homeuix:rowLayout> <homeuix:cellFormat vAlign="top" hAlign="left" > <homeuix:tableLayout hAlign="left" > <%-- 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"); 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"); String value = (String)map.get("value"); String image = (String)map.get("image"); String link = (String)map.get("link"); if (name.equals("Components")) link = null; Boolean buttonVisible = (Boolean)map.get("buttonVisible"); String buttonLabel = (String)map.get("buttonLabel"); String buttonLink = (String)map.get("buttonLink"); if (link == null) { %> <homeuix:rowLayout> <homeuix:cellFormat hAlign="right"> <homeuix:styledText text="<%=name%>" styleClass="OraPromptText"/> </homeuix:cellFormat> <homeuix:spacer width="8"/> <homeuix:cellFormat hAlign="center"> <homeuix:image source="<%=image%>" /> </homeuix:cellFormat> <homeuix:spacer width="5"/> <homeuix:cellFormat wrappingDisabled="true"> <homeuix:flowLayout> <homeuix:styledText styleClass="OraDataText" text="<%=value%>" /> <homeuix:spacer width="5" /> <homeuix:button rendered="<%=buttonVisible%>" text="<%=buttonLabel%>" destination="<%=buttonLink%>" /> </homeuix:flowLayout> </homeuix:cellFormat> </homeuix:rowLayout> <% } else { %> <homeuix:rowLayout> <homeuix:cellFormat hAlign="right"> <homeuix:styledText text="<%=name%>" styleClass="OraPromptText"/> </homeuix:cellFormat> <homeuix:spacer width="8"/> <homeuix:cellFormat hAlign="center"> <homeuix:image source="<%=image%>" shortDesc="<%=name%>"/> </homeuix:cellFormat> <homeuix:spacer width="5"/> <homeuix:cellFormat wrappingDisabled="true"> <homeuix:link text="<%=value%>" destination="<%=link%>" /> </homeuix:cellFormat> </homeuix:rowLayout> <% } } } %> </homeuix:tableLayout> </homeuix:cellFormat> </homeuix:rowLayout> </homeuix:tableLayout> </homeuix:borderLayout> </homeuix:header> </homeuix:cellFormat> </homeuix:rowLayout> </homeuix:tableLayout> <homeuix:tableLayout width="50%" cellSpacing="10"> <homeuix:rowLayout> <homeuix:cellFormat vAlign="top" width="50%" > <homeuix:header text="Membership"> <homeuix:styledText styleClass="OraHeaderSubSub" text="Membership"/> <homeuix:ref refID="homePlugin" /> </homeuix:header> </homeuix:cellFormat> </homeuix:rowLayout> </homeuix:tableLayout> <homeuix:tableLayout width="100%" cellSpacing="10"> <homeuix:rowLayout vAlign="top"> <homeuix:cellFormat width="100%"> <homeuix:dataScope currentDataBinding="homePageMainTargetAlerts@servletRequest"> <homeuix:styledText styleClass="OraHeaderSubSub" text="Alerts"/> <homeuix:ref refID="AlertsTableEm2go" /> </homeuix:dataScope> </homeuix:cellFormat> </homeuix:rowLayout> </homeuix:tableLayout> </homeuix:contents> </homeuix:header> </homeuix:body> </homeuix:document> </homeuix:dataScope> </homeuix:renderingContext>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de