This content has been marked as final.
Show 2 replies
-
1. Re: Ajax4jsf and custom event handlers
sergeysmirnov Apr 12, 2007 1:24 PM (in response to quilleashm)You can use onkeydown or onkeypress
Also, a4j:support 'this' points to the input field object. So, you can manipulate with input field style right from the onsubmit like this:<h:form> <h:panelGrid columns="2"> <h:outputText value="Type the Text:"/> <h:inputText value="#{testBean.text}"> <a4j:support onsubmit="if (this.value!=''){this.style.backgroundColor='white'} else {this.style.backgroundColor='#FFCCCC'}" event="onkeyup" reRender="repeater"/> </h:inputText> <h:outputText value="Text in the AJAX Response:"/> <h:outputText id="repeater" value="#{testBean.text}"/> </h:panelGrid> </h:form>
-
2. Re: Ajax4jsf and custom event handlers
quilleashm Apr 12, 2007 5:57 PM (in response to quilleashm)Thanks for the reply.
Would it be possible to somehow merge the code in the event handlers together when AjaxSupport generates its event string?