续分页 jsf组件dataTable
2008-08-05 15:56
507 查看
注册:
<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>
register
</title>
</head>
<body bgcolor="#ffffff">
<f:view>
<h:form>
<h:outputText value="#{regBean.message}">
</h:outputText>
<h:panelGrid columns="3">
<h:outputLabel>
<h:outputText value="用户名:"/>
</h:outputLabel>
<h:inputText id="username" value="#{regBean.username}" required="true">
</h:inputText>
<h:message for="username"/>
<h:outputLabel>
<h:outputText value="密 码:"/>
</h:outputLabel>
<h:inputText id="password" value="#{regBean.userpassword}" required="true">
</h:inputText>
<h:message for="password"/>
<h:outputLabel>
<h:outputText value="密码确认:"/>
</h:outputLabel>
<h:inputText id="password2" value="#{regBean.password2}" required="true">
</h:inputText>
<h:message for="password2"/>
<h:commandButton value="注册" action="#{regBean.doRegister}"/>
<h:commandButton value="重置" type="reset"/>
</h:panelGrid>
</h:form>
</f:view>
</body>
</html>
登陆:
<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>
login
</title>
</head>
<body bgcolor="#ffffff">
<f:view>
<h:form>
<h:outputText value="#{LoginBean.message}"/>
<h:panelGrid columns="3">
<h:outputLabel value="用户名:"/>
<h:inputText id="username" value="#{LoginBean.loginname}" required="true"/>
<h:message for="username"/>
<h:outputLabel value="密 码:"/>
<h:inputText id="pwd" value="#{LoginBean.userpassword}" required="true"/>
<h:message for="pwd"/>
<h:commandButton value="登录" action="#{LoginBean.doLogin}">
</h:commandButton>
<h:commandButton value="重置" type="reset">
</h:commandButton>
<h:outputLink value="register.faces">
<f:verbatim> 用户注册 </f:verbatim>
</h:outputLink>
</h:panelGrid>
</h:form>
</f:view>
</body>
</html>
退出:
<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>
logout
</title>
</head>
<body bgcolor="#ffffff">
<f:view>
<h:form>
<h:commandButton value="退出登录" action="#{LoginBean.doLogout}">
</h:commandButton>
<h:outputLink value="">
</h:outputLink>
</h:form>
</f:view>
</body>
</html>
删除:
<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>
removeuser
</title>
</head>
<body bgcolor="#ffffff">
<f:view>
<h:form>
<h:inputHidden value="#{removeuserBean.userid}">
</h:inputHidden>
<h:panelGrid columns="2">
<h:outputLabel value="确认要删除#{removeuserBean.username}的用户吗?">
</h:outputLabel>
<h:commandButton value="删除" action="#{removeuserBean.doRemoveuser}">
</h:commandButton>
</h:panelGrid>
</h:form>
</f:view>
</body>
</html>
修改:
<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>
userdetail
</title>
</head>
<body bgcolor="#ffffff">
<f:view>
<h:form>
<h:panelGrid columns="3">
<h:inputHidden value="#{updateuserBean.userid}">
</h:inputHidden>
<h:outputLabel value="用户名称:">
</h:outputLabel>
<h:inputText id="username" value="#{updateuserBean.username}">
</h:inputText>
<h:message for="username">
</h:message>
<h:outputLabel value="用户密码:">
</h:outputLabel>
<h:inputText id="userpwd" value="#{updateuserBean.userpassword}">
</h:inputText>
<h:message for="userpwd">
</h:message>
<h:commandButton value="修改" action="#{updateuserBean.doChangeuser}">
</h:commandButton>
</h:panelGrid>
</h:form>
</f:view>
</body>
</html>
<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>
register
</title>
</head>
<body bgcolor="#ffffff">
<f:view>
<h:form>
<h:outputText value="#{regBean.message}">
</h:outputText>
<h:panelGrid columns="3">
<h:outputLabel>
<h:outputText value="用户名:"/>
</h:outputLabel>
<h:inputText id="username" value="#{regBean.username}" required="true">
</h:inputText>
<h:message for="username"/>
<h:outputLabel>
<h:outputText value="密 码:"/>
</h:outputLabel>
<h:inputText id="password" value="#{regBean.userpassword}" required="true">
</h:inputText>
<h:message for="password"/>
<h:outputLabel>
<h:outputText value="密码确认:"/>
</h:outputLabel>
<h:inputText id="password2" value="#{regBean.password2}" required="true">
</h:inputText>
<h:message for="password2"/>
<h:commandButton value="注册" action="#{regBean.doRegister}"/>
<h:commandButton value="重置" type="reset"/>
</h:panelGrid>
</h:form>
</f:view>
</body>
</html>
登陆:
<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>
login
</title>
</head>
<body bgcolor="#ffffff">
<f:view>
<h:form>
<h:outputText value="#{LoginBean.message}"/>
<h:panelGrid columns="3">
<h:outputLabel value="用户名:"/>
<h:inputText id="username" value="#{LoginBean.loginname}" required="true"/>
<h:message for="username"/>
<h:outputLabel value="密 码:"/>
<h:inputText id="pwd" value="#{LoginBean.userpassword}" required="true"/>
<h:message for="pwd"/>
<h:commandButton value="登录" action="#{LoginBean.doLogin}">
</h:commandButton>
<h:commandButton value="重置" type="reset">
</h:commandButton>
<h:outputLink value="register.faces">
<f:verbatim> 用户注册 </f:verbatim>
</h:outputLink>
</h:panelGrid>
</h:form>
</f:view>
</body>
</html>
退出:
<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>
logout
</title>
</head>
<body bgcolor="#ffffff">
<f:view>
<h:form>
<h:commandButton value="退出登录" action="#{LoginBean.doLogout}">
</h:commandButton>
<h:outputLink value="">
</h:outputLink>
</h:form>
</f:view>
</body>
</html>
删除:
<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>
removeuser
</title>
</head>
<body bgcolor="#ffffff">
<f:view>
<h:form>
<h:inputHidden value="#{removeuserBean.userid}">
</h:inputHidden>
<h:panelGrid columns="2">
<h:outputLabel value="确认要删除#{removeuserBean.username}的用户吗?">
</h:outputLabel>
<h:commandButton value="删除" action="#{removeuserBean.doRemoveuser}">
</h:commandButton>
</h:panelGrid>
</h:form>
</f:view>
</body>
</html>
修改:
<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>
userdetail
</title>
</head>
<body bgcolor="#ffffff">
<f:view>
<h:form>
<h:panelGrid columns="3">
<h:inputHidden value="#{updateuserBean.userid}">
</h:inputHidden>
<h:outputLabel value="用户名称:">
</h:outputLabel>
<h:inputText id="username" value="#{updateuserBean.username}">
</h:inputText>
<h:message for="username">
</h:message>
<h:outputLabel value="用户密码:">
</h:outputLabel>
<h:inputText id="userpwd" value="#{updateuserBean.userpassword}">
</h:inputText>
<h:message for="userpwd">
</h:message>
<h:commandButton value="修改" action="#{updateuserBean.doChangeuser}">
</h:commandButton>
</h:panelGrid>
</h:form>
</f:view>
</body>
</html>
相关文章推荐
- 分页 jsf组件dataTable
- JSF中使用dataScroller和dataTable实现分页及其相关问题
- 自定义JSF通用分页组件
- JSF richfaces的dataTable组件中filter在IE和Firefox下不兼容的问题
- 分页组件dataTable的用法 4000
- JSF1.2中使用rich:datatable组件,在rich:column中显示日期和时间时时区信息不正确
- JSF Datatable 大数据集分页
- 利用表格分页显示数据的js组件datatable的使用
- JSF primefaces dataTable paginator 表格分页 问题
- 利用表格分页显示数据的js组件bootstrap datatable的使用
- JSF中为dataTable组件指定自定义行样式
- RichFaces JSF自定义分页组件(简洁版)
- 自定义JSF通用分页组件
- 自定义JSF通用分页组件
- 自定义分页组件DATAGRID-DataTable
- datatable插件实现分页功能
- JSF标准组件使用说明
- JQuery 常用积累(二)Pagination 分页组件
- datatable 服务器端分页
- 基于myFaces的JSF技术使用中的一些经验(二)[godroad原创]--dataTable的使用