Donnerstag, Juni 03, 2004


UIX and Struts

UIX in conjunction with the Struts extention (not ADF-DataBinding) can not automaticly populate form fields of a UIX-Table (editable UIX-Table or selectionKey of the table component) to ActionForms with Array-Argumens like setFirstName(String[]). The problem lies in the naming schema of cascaded components. To identify each column with an unique name, UIX concat the name of each column element with the table name and the column sign ':'. So, an editable column get the name like myTable:firstName. With this extention Struts can't find the right setter method in the ActionFormBean. This limitation needs to overwrite the form struts population mechanism to solve the problem.
To do that you must overwrite the processPopulate methode of the

protected void processPopulate(HttpServletRequest request,
HttpServletResponse response,
ActionForm form,
ActionMapping mapping)
throws ServletException {

super.processPopulate(request, response, form, mapping);

String contentType = request.getContentType();

if ((contentType != null && contentType.startsWith("multipart")) || (form == null)) {

UixStrutsFormPopulateUtil.populate(form, request);


Additional you must register your new RequestProcessor within the struts-config.xml like this:

When you use table selection moded, UIX add the keyword "Selected" and the row index to the tableName (myTable:Selected:1, myTable:Selected:2 usw.). This behavior must also be handled in your own population methode to get an array of selected rows.

Comments: Kommentar veröffentlichen

<< Home

This page is powered by Blogger. Isn't yours?