header.jsp

来自「hibernate项目开发宝典该书籍的 源码」· JSP 代码 · 共 55 行

JSP
55
字号
<%@ page contentType="text/html" language="java" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

<f:subview id="header">
    <h:form id="headerForm">
    <h:outputText value="#{applicationBean.dummyVariable}" rendered="true"/>
	<h:outputText value="#{userBean.dummyVariable}" rendered="true"/>
    <table width="80%" height="50" align="center" border="0">
		<tr>
			<td align="right">
				<h:commandLink styleClass="highLightLink" 
					action="#{categoryListBean.listAction}" 
					rendered="#{userBean.loggedIn=='true'}">
					<h:outputText value="#{msgs.category_list}"/>
				</h:commandLink>
				<h:outputText value=" | " styleClass="highLightText" 
					rendered="#{userBean.loggedIn=='true'}"/>
				<h:commandLink  styleClass="highLightLink" action="categoryCreate" 
					rendered="#{userBean.loggedIn=='true'}">
					<h:outputText value="#{msgs.new_category}"/>
				</h:commandLink>
				<h:outputText value=" | " styleClass="highLightText" 
					rendered="#{userBean.loggedIn=='true'}"/>
				<h:commandLink  styleClass="highLightLink" action="productCreate" 
					rendered="#{userBean.loggedIn=='true'}">
					<h:outputText value="#{msgs.new_product}"/>
				</h:commandLink>
				<h:outputText value=" | " styleClass="highLightText" 
					rendered="#{userBean.loggedIn=='true'}"/>
				<h:commandLink  styleClass="highLightLink" action="recordCreate" 
					rendered="#{userBean.loggedIn=='true'}">
					<h:outputText value="#{msgs.new_record}"/>
				</h:commandLink>
				<h:outputText value=" | " styleClass="highLightText" 
					rendered="#{userBean.loggedIn=='true'}"/>
   				<h:commandLink  styleClass="highLightLink" 
   					action="#{userBean.logoutAction}" 
   					rendered="#{userBean.loggedIn=='true'}">
     				<h:outputText value="#{msgs.logout}"/>
     			</h:commandLink>
			</td>
		</tr>
		<tr>
			<td align="right">
     			<h:commandLink  styleClass="highLightLink" 
     				action="login" rendered="#{userBean.loggedIn=='false'}">
					<h:outputText value="#{msgs.login}"/>
				</h:commandLink>
     		</td>
     	</tr>
	</table>
	</h:form>
</f:subview>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?