Sometimes it may require actions which have to get executed without validation or after partial validation. You may find dozen dozens of posts in various forums, blogs regarding skipping JSF validation. But very often we find a satisfactory result. I don’t want to mean we will not find right solution or we do not solve the problem, what I mean we can solve the problem but after lots of tweak, lots of $$ time spending.

Think I have a simple form with some input text components with required attribute true and I am going to refresh this form with new set of values by clicking a command button. How much extra labor I have to pay to solve this? Ok forget this scenario now think I have a form with some input text and dropdown components with required attribute true and I want to populate one dropdown component depends on another and even one dropdown component may not need to validate at all where as another one may need to validate the data based on which it will be populated. Again do you think how much extra labor I have to pay to solve this and even should I do this extra work? Hmm, I Know I have no easy way to work around this problem. Here I will share my thoughts which may help you finding an easy solution to work around the problems that I was discussed above. Read the rest of this entry »

I was working with Crystal Report for Eclipse plug-in (version 1.4.0). After spending some minutes I easily developed a hello world type JSF application with JSP pages as view. But unfortunately the application was not working while I was trying to use Facelet as view handler. I quickly identified that the plug-in is missing Facelet tag library xml file. Then, I googled some minutes but not found any promising result. So I wrote a tag library xml file given below. Hopefully it will help others who are expecting a tag library file for using Crystal Report Page Viewer component with Facelet. Read the rest of this entry »

RichFaces data driven components (rich:dataTable , rich:dataGrid etc.) can be used in more complicated scenarios unlike standard DataTable and DataModel class. To get the new supports one needs to implement his own DataModel that extends one of ExtendedDataModel classes. But it’s not efficient every time implementing the class when needs. So here I write my own solution.

Implementation

I extend org.ajax4jsf.model.SerializableDataModel class as usual. But the tricks lie in overridden walk method. A general fetch list of ExtendedFetchList is used to access data instead of a specific fetch list. ExtendedFetchList interface declares all the necessary methods for dynamic data accessing. See the following codes and usage example. Read the rest of this entry »

Nowadays, even a simple web site requires full text search capability. Search engines like Google are not well suited as a local search engine. Because a local search engine can generate more relevant and practical results than their global competitors. I have used Apache Lucene before. Recently I have found another one named Sphinx (SQL Phrase Index). According to its developers:

Generally, it’s a standalone search engine, meant to provide fast, size-efficient and relevant fulltext search functions to other applications. Sphinx was specially designed to integrate well with SQL databases and scripting languages. Currently built-in data sources support fetching data either via direct connection to MySQL or PostgreSQL, or using XML pipe mechanism (a pipe to indexer in special XML-based format which Sphinx recognizes).

It is open source and also provides API for PHP and Python.