Reputation: 137
i wish to set my input attribute to read only once the submit button have been clicked. Unfortunately, system can't located where my method was by prompt me this error message 'does not have the property 'validate_submitted''. My code as below
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>
Any suggestion to resolve it? Thank you very much.
Upvotes: 0
Views: 2068
Reputation: 2192
You need to name the method getvalidate_submitted
(in your bean) so that your page is able to pick up the method.
Note that your method name isn't really following the Java naming 'standards'. From the best practice point of view you should name the method getValidateSubmitted
and use the following EL #{viewScope.DetailsInvoiceAmountBean.validateSubmitted}
Upvotes: 1