4 Replies Latest reply on Jul 12, 2007 12:48 PM by pat breen

    event not working - no js generated

    pat breen Newbie

      Hello folks,

      I am about to give up on Ajax4jsf. I just cannot get the simple example of the <a4j:support> tag to work.

      I think it might be a versioning problem. I am using WebSphere Studio Client Developer ver. 7 and the ajax4jsf-1.1.1.jar implementation. This example is so easy I really don't need you to see the code but here it is anyway.

      I have completed the three steps required.
      1. Added jar file to project
      2. updated the web.xml with the filter tag
      3. added the taglib directive as show right below here

      <%@taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>

      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">


      <hx:scriptCollector id="scriptCollector1">
      <h:form id="form1" styleClass="form">
      <h:panelGrid id="grid1" styleClass="panelGrid" >

      <h:inputText id="text1" styleClass="inputText" value="#{tester.tf1Value}">
      <a4j:support event="onblur"
      <h:inputText id="text3" styleClass="inputText"></h:inputText>
      <h:outputText id="text2" styleClass="outputText" value="#{tester.text2}" ></h:outputText>



      Here is the event method I placed in the bean. On the onblur event, the text should show up in my second text field but instead I get a javascript error on the first line of my jsp saying A4J is not defined. There is nothing but a doctype tag on the first line.

      public void testIt(ActionEvent e){

      System.out.println("yeah! It worked");
      setText2("blah blah blah");