How to write a hardcoded string value inside EL expression #{ } in JSF?
问题 I am trying to do the following: rendered="#{billBean.company.equals("something")}" But the problem is I cannot write "something" inside #{} . It causes the below XML parsing error: Element type "h:commandLink" must be followed by either attribute specifications, ">" or "/>". How can I achieve this? 回答1: Use single quote (') to refer to a plain String inside EL: rendered="#{billBean.company.equals('something')}" 来源: https://stackoverflow.com/questions/17772791/how-to-write-a-hardcoded-string