Current Challenge: Accessing JSF Components in a dataTable Component

I have been working with JSF (JavaServer Faces) for last 4 months or so and with each passing day, I have looked for ways to bring out the most functional and efficient UI designs. Ok, what I am working on at the moment does not only cover JSF, but also uses other frameworks like Spring, Hibernate and all the other associated technologies.

At the moment I have a UI which lists a number of objects from a database table using a JSF dataTable component. Retrieving the objects list from the database is not an issue since this is something that is pretty much part of the normal workings of JSF. However, I need to use the dataTable component to persist changes to the database and the logical thing to do here is to embed some input controls in the dataTable component. So, list multiple objects can be selected from the dataTable, the most logical input control is a HtmlSelectManyCheckbox and all these render beautifully on the browser. The problem is retrieving the values of the selected Checkboxes, and transforming these into their original object types and thus allow them to be persisted to the database through hibernate.

The main reason for using the dataTable component in this situation is its ability to automatically handle a list or array of objects; this automation means less code for me to write and perhaps even less application logic to deal with.

Advertisements
  1. #1 by Jay on September 1, 2007 - 2:55 am

    Imma,
    Did you find solution to datatable problem?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: