Monday, 9 November 2009

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]").

No comments:

Post a Comment