【问题标题】:Style attribute ignored on PrimeFaces SelectOneMenu componentPrimeFaces SelectOneMenu 组件上的样式属性被忽略
【发布时间】:2012-08-09 10:44:28
【问题描述】:

我使用的是 PrimeFaces 3.2,如果我向标签添加样式属性,

<p:selectOneMenu style="width: 100%;">

它被忽略并且渲染的元素样式包含一个(我猜基于列表的最长选项)计算的宽度样式属性。

即使使用 PrimeFaces 的 CSS 皮肤(.ui-selectonemenu.ui-selectonemenu-label)也不起作用 - 它会被元素样式覆盖。

这里描述的方法也不适用:Apply CSS to <f:selectItem> nested in <h:selectOneMenu>

也许这与这个错误有关:http://code.google.com/p/primefaces/issues/detail?id=4196&q=style&colspec=ID%20Stars%20Type%20Status%20Priority%20TargetVersion%20Reporter%20Owner%20Summary

有没有人遇到过同样的问题或者有一些解决方法?

最好的问候, 赫尔赫

【问题讨论】:

    标签: css jsf primefaces


    【解决方案1】:

    我在 PrimeFaces 3.2 上重现了这个问题,但在 PrimeFaces 3.3.1 上没有重现,那么我的猜测是他们修复了它。

    很可能与this issue有关,虽然Cagatay说不适用于3.2,但我刚才还是转载了。

    我的建议是更新您的 PrimeFaces 版本。

    【讨论】:

      猜你喜欢
      • 2017-02-02
      • 2021-04-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-21
      • 2014-01-01
      • 2013-01-18
      • 1970-01-01
      相关资源
      最近更新 更多