Hi,
I am having the following problem using HotKey (HtmlHotKey) functionality programmatically.
HtmlAjaxCommandLink captionLink = ...
//variant 1
HtmlHotKey hk = new HtmlHotKey();
parent.getChildren().add(hk);
hk.setKey(hotKey);
hk.setHandler("#{rich:element('" + captionLink.getId() + "')}.click()");
=>gives me
//variant 2
HtmlHotKey hk = new HtmlHotKey();
parent.getChildren().add(hk);
hk.setKey(hotKey);
ValueExpression handlerExpression = FacesContext.getCurrentInstance().getApplication().getExpressionFactory().createValueExpression(FacesContext.getCurrentInstance().getELContext(), "#{rich:element('" + captionLink.getId() + "')}.click()", Object.class);
hk.setValueExpression("handler", handlerExpression);
=>gives me a javax.el.ELException with message: "Function 'rich:element' not found"
My environment is:
RichFaces 3.3.3.Final
JBoss Seam 2.2.0.GA
Will be grateful for any hint or suggestion.
Thanks.