当前位置:首页 > 开发 > Web前端 > 前端 > 正文

richfaces 4 rich:message as icon with tooltip

发表于: 2013-09-27   作者:sunjing   来源:转载   浏览:
摘要: <ui:composition xmlns="http://www.w3.org/1999/xhtml"                xmlns:ui="http://java.sun.com/jsf/facel

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:rich="http://richfaces.org/rich"
                xmlns:c="http://java.sun.com/jsp/jstl/core">

    <c:set var="tooltipId" value="#{for}tooltip"/>

    <rich:message id="#{for}Message" for="#{for}" showDetail="false" showSummary="false" styleClass="message-icon"
                  onmouseover="#{rich:component(tooltipId)}.show(event)"
                  onmouseout="#{rich:component(tooltipId)}.hide()"/>
    <rich:tooltip id="#{tooltipId}" target="#{for}Message">
        <rich:message for="#{for}" styleClass="message-text"/>
    </rich:tooltip>

</ui:composition>

 

.message-icon .rf-msg-err {
    background-image: url("../resources/images/icons/ico_error.gif");
    display: inline-block;
    height: 16px;
    padding: 0px;
    width: 16px;
}

.message-text .rf-msg-err {
    background-image: none;
    padding-left: 2px;
}

richfaces 4 rich:message as icon with tooltip

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号