Code: Select all
<h:form id="form">
<p:textEditor id="te" value="#{bean.text}">
<p:ajax event="focus" onstart="showToolbar('form:te');" />
<p:ajax event="blur" onstart="hideToolbar('form:te');" />
</p:textEditor>
</h:form>
The only thing I want, is to improve this code in passing "this" instead of TextEditor id like this
Code: Select all
<h:form id="form">
<p:textEditor id="te" value="#{bean.text}">
<p:ajax event="focus" onstart="showToolbar(this);" />
<p:ajax event="blur" onstart="hideToolbar(this);" />
</p:textEditor>
</h:form>
But it is impossible to know what is the type of this object !
Can I use "this" argument in <p:ajax> tag ?
If yes, what is the object's type passed to function ?