我希望将我的输入属性设置为仅在单击提交按钮后读取。不幸的是,系统无法找到我的方法所在的位置,提示我此错误消息“没有属性‘validate_subscribed’”。我的代码如下
In Manage Bean:
public boolean validate_submitted(){
Number temp = pa_header_row.getSubmitted();
if (temp != null && temp.intValue() == 1)
{
return true;
}
return false;
}
In the field:
<af:inputDate value="#{bindings.InvoiceDate.inputValue}"
label="Invoice Date"
shortDesc="#{bindings.InvoiceDate.hints.tooltip}"
id="id2"
readOnly="#{viewScope.DetailsInvoiceAmountBean.validate_submitted}">
<f:validator binding="#{bindings.InvoiceDate.validator}"/>
<af:convertDateTime pattern="#{bindings.InvoiceDate.format}"/>
</af:inputDate>
有什么建议可以解决吗?非常感谢。
最佳答案
您需要将该方法命名为 getvalidate_subscribed
(在您的 bean 中),以便您的页面能够获取该方法。
请注意,您的方法名称并未真正遵循 Java 命名“标准”。从最佳实践的角度来看,您应该将该方法命名为 getValidateSubscribed
并使用以下 EL #{viewScope.DetailsInvoiceAmountBean.validateSubscribed}
关于java - 从 ADF 中的管理 Bean 设置只读属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26006794/