【问题标题】:xhtml text field with long label hidden inside带有长标签的xhtml文本字段隐藏在里面
【发布时间】:2015-09-28 07:50:06
【问题描述】:

所以我有一个搜索框,里面有一个长标签,例如:

“姓名、姓氏、PersonCode 等等……”

而且文本字段太小,无法容纳所有内容。

当我将鼠标移到它上面时,我需要使整个标签可见。

我用于文本字段的代码是:

<p:outputPanel id="keywords_filter" rendered="#{!externalRegistryQueryController.filter.detailedFilter}">
    <p:inputText value="#{externalRegistryQueryController.filter.keywords}" placeholder="#{msg.extreg_keywords_placeholder}"/>
</p:outputPanel>

【问题讨论】:

标签: html jsf primefaces label


【解决方案1】:

使用title 属性:

<p:inputText
        value="#{externalRegistryQueryController.filter.keywords}"
        placeholder="#{msg.extreg_keywords_placeholder}"
        title="#{msg.extreg_keywords_placeholder}"/>

title 属性在 PrimeFaces inputText 元素上定义,并映射到 HTML title 属性,从而为您提供所请求的工具提示行为。

【讨论】:

  • 大声笑.. 现在我很惭愧,当答案如此简单时,我需要在这里发布它.. 它有效,谢谢。 !
猜你喜欢
  • 2016-06-17
  • 1970-01-01
  • 2011-07-25
  • 2020-02-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-08-20
相关资源
最近更新 更多