日期:2014-05-18  浏览次数:20808 次

JSF中关于buttonLink失效的问题
我用JSF实现了一个查询和列表页面,这个列表中的链接是通过buttonLink实现的,列表出来后点击链接总没有反应,要点很多次才有一次是对的,这到底是为什么啊?是JSF的Bug还是我的实现有问题啊?

请高手们指导!

JSP代码如下:
HTML code

<?xml version="1.0" encoding="GBK"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.ajax4jsf.org/rich"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:c="http://java.sun.com/jstl/core"
    xmlns:a4j="http://richfaces.org/a4j">

<head>
    <meta http-equiv="pragma" content="no-cache"/>
    <meta http-equiv="cache-control" content="no-cache"/>
    <meta http-equiv="expires" content="0"/>    
<link rel="stylesheet"
    href="#{facesContext.externalContext.requestContextPath}/cn/hnisi/gac/resources/css/default.css"
    type="text/css"></link>
</head>
<body>
<ui:decorate template="/cn/hnisi/gac/GACWorkspace.xhtml">

    <!-- 标题以及工具栏 -->
    <ui:define name="BizTitleAndToolBar">
        <table width="100%" cellpadding="0" cellspacing="0" border="0">
            <tr height="1">
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td width="180" height="26"
                    style="padding-left:8px;padding-top:3px;font-weight:bold;font-size:10pt;color:white;background:url(#{facesContext.externalContext.requestContextPath}/cn/hnisi/gac/resources/images/titlebar/activetitle.gif);background-repeat :no-repeat">
                &nbsp;组织机构列表_用户列表</td>
                <td align="right"
                    style="background:url(#{facesContext.externalContext.requestContextPath}/cn/hnisi/gac/resources/images/titlebar/titlebar-back.gif);background-repeat:repeat-x">
                <style type="text/css">
                        <!--
                            .toolbarButton{
                                font-size:10pt;
                                color: #333;
                                border: 0px solid #EEF1F7;
                                padding-top: 3px;
                                height:22px;
                                cursor:hand;
                                background:#White repeat-x top left;
                            }
                            .toolbarButtonOn{
                                font-size:10pt;
                                color: #234C6F;
                                border: 1px solid #9B8748;
                                padding-top: 3px;
                                height:22px;
                                cursor:hand;
                                border-color: #727377;
                                background:  #EEF1F7 repeat-x top left;
                            }

                        -->
                    </style>
                <button name="save" class="toolbarButton"
                    onmouseout="toolbarButtonMouseOut()"
                    onmouseover="toolbarButtonMouseOver()"></button>

                </td>
            </tr>
        </table>
    </ui:define>
    

    <!-- 简要查询条件区 -->
    <ui:define name="QueryConditionPanel">
            <table width="90%" align="cen