Hi folks,

I'm building an application that basically consists of a single page that displays a few elements, of which most are editable in place. Some JS converts each text element into an input field once its clicked and submits the changed value in the background. The user can also add new items to a list.

So far I'm doing all my JavaScripting via jQuery, which I'm quite familar with. The enviroment in which the application must run is a Websphere Portal Server with JSR 168 portlets.

What I'm currently reasearching: How to bind those in-place-edited value back to Java beans using JSF?

I know that I must use a servlet to control the output in a portlet enviroment, so I'd start with configuring a JSF servlet in addition to the portlets I'm using. There is jQuery's form plugin that allows me to submit a form via AJAX in a format that the same as a native browser form submit, JSF shouldn't have any problems working with that. I can skip the render response phase or write a custom view handler to output JSON or XML as a reply to the AJAX request.

I need your help on how to add new input elements on the client-side and bind them to JSF. Can I generate IDs? Do I have to manipulate the viewstate, if possible at all? Are there frameworks or components available that do just this and would work in a portlet enviroment? Or are there at least projects I can take a look at for reference?

Some more details:
The interface allows the user to edit several documents of which each consists of a structure like this:

Subject (big header)
Details (several fields like date inputs)
  1. Item 1
    1. Subitem 1
    2. Subitem 2
    3. Subitem 3
  2. Item 2
    1. Subitem 1
  3. Item 3
Almost each elements is editable. The user can add items to the list and subitems to each item, and edit those, changing the title or adding comments.
Each change must be saved (session, db) as early as possible (similar to GMail).
I'm already using JSF for the rest of the application and I'd like to avoid starting to write my own binding framework when JSF already does such a great job on that matter.

Thanks for your help!

Regards
Jörn Zaefferer