Hello,
I want a p:editor which call a bean method (onAction()) when a user type some text.
Facelet:
<rich:editor id="panel" value="#{sqlInputHandler.sqlStatement}" >
<a4j:ajax event="dirty" render="panel" listener="#{sqlInputHandler.onAction()}"/>
</rich:editor>
Bean:
public void onAction() {
Logger.getAnonymousLogger().info("ACTION");
try {
SQLParserChecker.checkSQLSyntax(sqlStatement);
valid = true;
} catch (JSQLParserException e) {
valid = false;
}
prepareStatement(sqlStatement);
}
So what is wrong?
Hi Andi,
I'm assuming that onAction() is not being called.
Take out the parens after the method name in the listener attribute. For example:
<a4j:ajax event="dirty" render="panel" listener="#{sqlInputHandler.onAction}"/>