This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 90004

Summary: Add Ajax4JSF support
Product: obsolete Reporter: jfurmankiewicz <jfurmankiewicz>
Component: Facelets 1.1.xAssignee: _ potingwu <potingwu>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: Windows XP   
Issue Type: ENHANCEMENT Exception Reporter:

Description jfurmankiewicz 2006-11-24 13:02:27 UTC
Ajax4JSF has been all the rage recently:
https://ajax4jsf.dev.java.net/nonav/ajax/ajax-jsf/

It would be quite trivial to add support for it to Facelets.

Namely,
a) Ajax4JSF JARs need to be added or prompted for in the new web app wizard
b) add the following lines to web.xml

<filter>
          <display-name>Ajax4jsf Filter</display-name>
          <filter-name>ajax4jsf</filter-name>
          <filter-class>org.ajax4jsf.Filter</filter-class>
          </filter>
          <filter-mapping>
          <filter-name>ajax4jsf</filter-name>
          <servlet-name>Faces Servlet</servlet-name>
          <dispatcher>REQUEST</dispatcher>
          <dispatcher>FORWARD</dispatcher>
          <dispatcher>INCLUDE</dispatcher>
</filter-mapping>

c) also add this to web.xml

<context-param>
      <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
      <param-value>com.sun.facelets.FaceletViewHandler</param-value>
</context-param>

d) REMOVE the Facelets application tags in faces-config.xml

  <application>
    <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
  </application>

This would create a Facelets project with full Ajax4JSF support. 

More info here:
https://ajax4jsf.dev.java.net/nonav/documentation/ajax-documentation/developerGuide.html#d0e75
https://ajax4jsf.dev.java.net/nonav/documentation/ajax-documentation/developerGuide.html#d0e2464

P.S. Without the last step, you could also add full Ajax4JSF support like this
to a regular JSF project (i.e. non-Facelets)