Persist PrimeFaces DataTable State Across Requests

May 14, 2012

Persist PrimeFaces DataTable State Across Requests

PrimeFaces is well known for its wide array of useful AJAX components for JSF. <p:dataTable>, in particular, is an extremely useful component. One problem with <p:dataTable>, however, is that it can mostly only be manipulated with AJAX. Its state, including current page, column sorted and filter criteria, is reverted to the default after page refreshes. In addition, there is currently no documented way to programmatically set the state, aside from first row and sort order, for the data table.

Fix Issue with Spring Web Scopes in Tests

January 6, 2012

Fix Issue with Spring Web Scopes in Tests

Today I’m hit with the issue that Spring whines about the exception, “No Scope registered for scope ‘request’,” when I try to run tests with request scoped bean. Fortunately the fix is fairly easy.

Update Dec. 22, 2012: Spring 3.2 has made it possible to use WebApplicationContext as well as web-based scopes available in unit tests. The fix documented here is no longer necessary if you are on Spring 3.2.

Issues and Solutions for Cross-Domain Ajax Calls

March 1, 2011

Issues and Solutions for Cross-Domain Ajax Calls

Recently I have been building a small chat room application, using jQuery for Ajax and RESTEasy for server-side RESTful services. Because Java is used for the server side, and PHP is used to render the JavaScript for the client side, I need to use cross-domain Ajax calls. Like Flash, Ajax imposes security restrictions for such remote invocations. Here, I’m documenting the problems and solutions I have.

My LDAP Installation on RedHat Enterprise Linux 5.6

February 16, 2011

My LDAP Installation on RedHat Enterprise Linux 5.6

Recently I have been trying to install an LDAP server, using OpenLDAP. Official documentation on RedHat isn’t that straightforward. So, after spending some time both reading the official documentation and goolging around, I’m documenting the steps I have done here.

Update Aug. 11, 2011: OpenLdap on RedHat EL 6 uses a different config format/structure. Instructions documented here does not apply.