Reputation: 987
I have few components- combo boxes, edit boxes and error messages.
What I'm trying to do is to make combo box read only if the error message (that is attached to the edit box) contains something.
I'm trying to use this in the "read-only" computed field:
getComponent("message3").value == ""
Apparently i'm doing something wrong and it throws error when I load the xpage. Any advice how to achieve the functionality I need?
Upvotes: 1
Views: 39
Reputation: 21709
You can use the following to check for error messages:
facesContext.getMessages().hasNext()
Upvotes: 1