【问题标题】:how to show a tooltip with rich:message如何显示带有丰富的工具提示:消息
【发布时间】:2012-05-31 16:15:16
【问题描述】:

对不起我的英语不好。
我正在使用 RichFaces 4.2.2.Final。
当验证出错时,我只想显示图标。
我想在鼠标悬停时将错误消息显示为工具提示。
这可能吗?
根据document,这似乎是可能的。

【问题讨论】:

    标签: jsf richfaces tooltip


    【解决方案1】:

    我从未使用过 Richfaces 4.X,但当我想实现工具提示时,我尝试了以下方式...

     <h:outputText title="#{log.message}" value="#{fn:substring(log.message,0,10)}..."  rendered="#{(fn:length(log.message)>=10)}"/>
     <h:outputText title="#{log.message}" value="#{log.message}" rendered="#{!(fn:length(log.message)>10)}" />
    

    希望对你有帮助

    【讨论】:

      【解决方案2】:

      感谢您的回复。
      我决定使用 notifyMessages 而不是工具提示。

      # xthml
      <rich:notifyMessages ajaxRendered="true" stayTime="2000" nonblocking="true" showDetail="true" showSummary="false" />
      <rich:message ajaxRendered="true" for="clientId" showDetail="false" showSummary="true" escape="false" /> 
      
      # backing bean
      FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, "&nbsp;", message);
      FacesContext.getCurrentInstance().addMessage("clientId", msg);
      

      【讨论】:

        猜你喜欢
        • 2011-02-11
        • 2014-03-12
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多