Installation
Provided that you already have a JSF application, the following steps will allow you to use QuipuKit components in your application:
1. Add quipukit.jar from the
quipukit-1.5.zip archive to the application libraries.
2. Copy the libraries residing in the lib folder of the
quipukit-1.5.zip archive to the application libraries, unless they are already accessible by your application (Please note that CSS parser and JFreeChart libraries should be used from the QuipuKit components distribution).
|
Library |
Distribution file name |
Notes |
|
JDom |
jdom.jar |
Unmodified library, version 1.0. You can skip adding it if it's already available for the application. |
|
CSS Parser |
ss_css2.jar |
Unmodified library, version 0.9.4. You can skip adding it if it's already available for the application. |
|
JCommon |
jcommon.jar |
Unmodified library, version 1.0.12. You can skip adding it if it's already available for the application. |
|
JFreeChart |
jfreechart.jar |
Unmodified library, version 1.0.9. You can skip adding it if it's already available for the application. |
3. Register the QuipuKit filter in your WEB-INF/web.xml file as follows:
<!-- FILTER FOR PROCESSING INTERNAL QUIPUKIT RESOURCES -->
<filter>
<filter-name>ResourceFilter</filter-name>
<filter-class>teamdev.jsf.util.ResourceFilter</filter-class>
</filter>
<!-- MAPPING FOR QUIPUKIT FILTER -->
<filter-mapping>
<filter-name>ResourceFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
4. (Optional) If you want to turn on automatic client-side validation for all pages, add the following lines to the WEB-INF/web.xml file (see
Validation Documentation for more information):
<context-param>
<param-name>teamdev.jsf.validation.clientValidation</param-name>
<param-value>onSubmit</param-value>
</context-param>
5. (For MyFaces 1.2 only) In order for the QuipuKit session expiration feature to work properly in MyFaces 1.2, add the following lines to the WEB-INF/web.xml file:
<context-param>
<param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
<param-value>false</param-value>
</context-param>
Installation in JSR-168 Portlets Environment
To use QuipuKit in Portlets environment, you should first make all necessary steps from the section
Installation.
To ensure that default styles of the QuipuKit components are correctly applied, the following CSS reference should be defined in the <head> tag of the HTML page:
<link rel='stylesheet' type='text/css'
href='/<AppName>/qk_internalResource/teamdev/jsf/renderkit/default.css'/>
where <AppName> is a Portlet context path.
Adding this CSS reference is portal server-specific. For more details, read related server documentation.
{note}JBoss Portal 2.4.1 comes with bundled MyFaces 1.1.1. The QuipuKit library requires MyFaces 1.1.4 in order for Ajax to work properly in JBoss Portal. You can fix this by replacing the myfaces-iml.jar and myfaces-api.jar files in the <PATH_TO_JBOSS_PORTAL_SERVER>\server\default\deploy\jbossweb-tomcat55.sar\jsf-libs folder.
{note}
If you use QuipuKit in JBoss Portal Server, you should specify the following portlet class in the WEB-INF/portelt.xml file:
<portlet-class>teamdev.jsf.portlet.QuipuKitPortlet</portlet-class>
This portlet class should be specified for both JSF implemenetations: MyFaces and Sun reference implementation. Please note that {{teamdev.jsf.portlet.QuipuKitPortlet}} class should be used instead of {{org.apache.myfaces.portlet.MyFacesGenericPortlet}} or {{com.sun.faces.portlet.FacesPortlet}} class, not in addition to it. Please also note that if you use Sun Reference implementation, you still have to place JSF portlet bridge (jsf-portlet.jar) to your portlet.
Using QuipuKit Library
To use the QuipuKit library, you should declare it using “
http://teamdev.com/quipukit” namespace and “q” prefix. To do it, add the following piece of code to the JSP application:
<%@taglib uri="http://teamdev.com/quipukit" prefix="q" %>
Or, add the following parameter to the <html> tag in the Facelets application:
xmlns:q="http://teamdev.com/quipukit"
Setting up a local copy of QuipuKit components demo application
Note that the
demo package is bundled with JSF RI 1.1. QuipuKit demo can run on Tomcat application server without any changes. Running on other servers might require a different set of libraries and appropriate changes in web.xml (this mostly concerns the cases when other JSF implementation is bundled with a particular server).
To run QuipuKit demo on the local machine, make the following s
- Unzip quipukit-1.5-demo.zip.
- Copy quipukit-demo.war to “webapps” folder of your Tomcat server.
- Run your Tomcat server.
- In your browser, open http://ServerName:PortNumber/quipukit-demo/.