【问题标题】:Primefaces text in outputLabel pattern of réalreal 的 outputLabel 模式中的 Primefaces 文本
【发布时间】:2016-05-05 13:54:35
【问题描述】:

有什么方法可以使outputLabel的值成为模式,我试过这样:

@Digits(integer=3, fraction=2)

我将此注释放在我的实体中,但没有任何更改

有人想在 ENTITY 或页面中更改此号码?

<p:outputLabel value="#{VarAvancementPrj.avancementprojet}%"/>

// @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
@Column(name = "avancementprojet", precision = 17, scale = 17)
@Digits(integer=3,fraction=2)
private Double avancementprojet;

【问题讨论】:

    标签: jsf primefaces entity bean-validation


    【解决方案1】:

    你应该在你的输出标签中添加转换器

    <f:convertNumber pattern="#0.00" />
    

    【讨论】:

      猜你喜欢
      • 2018-07-15
      • 2015-05-04
      • 1970-01-01
      • 2013-02-06
      • 1970-01-01
      • 1970-01-01
      • 2021-03-28
      • 1970-01-01
      • 2013-05-16
      相关资源
      最近更新 更多