2015-01-07 101 views
0

这是我的第一篇文章,我在Java和JSF是新,这是我的问题,仔细检查..残疾财产

我有这个代码部分:

<rich:select 
    valueChangeListener="#{bean.valueChanged}" 
    disabled="#{not bean.enabledEdition}" 
    enableManualInput="false" 
    value="#{bean.typeSelected}"> 
    <f:selectItems 
     value="#{bean.listStatus}" /> 
     <a4j:ajax event="selectitem" render="selectError" execute="@this" /> 
</rich:select> 

<rich:select id="selectError" 
    disabled="#{not bean.ErrorActive}" 
    <f:selectItems 
     value="#{bean.listKnownErrors}" /> 
</rich:select> 

然后,如果您选择typeSelected =“Error”,请选择第二个选项,然后启用第二个选择您想要选择的实际错误。 我的问题是,我有一个“只读”模式,我需要的是有在disabled属性的双重条件下,这样的:

disabled="#{not bean.enabledEdition}, #{not bean.ErrorActive}" 

,但看起来这是行不通的,它看起来总是活跃,任何建议?

在此先感谢!

回答

0

嗯..这是尴尬的,我只需要如下:

disabled="#{!bean.enabledEdition or !bean.ErrorActive}" 

我希望有人发现了它至少是有益的!