Wednesday, 11 November 2009

javax.naming.NameNotFoundException: name_of_your_resource

Don't forget to include jdbc for your jdbc resources.

Monday, 9 November 2009

Dependency injection in javax.faces.validator.Validator

Using no additional frameworks (Seam for example) it's impossible to @EJB in Validator. Let me know if I am wrong.

My workaround is based on a question, why bother? Just provide a validation method on a managed bean.

jQuery and JSF

JSF appends parent ID to child ID.

<h:form id="form">
  <h:inputtext id="input" />
</h:form>

input is then rendered with id form:input.

That's actually nice, but jQuery doesn't understand $("#form:input") - doesn't like the colon and throws an exception.

Workaround looks like this - $("[id=form:input]").