tags:

views:

12

answers:

0

The main goal is to have a dropdown menu where each of its menuItems represents one column of a <rich:extendedDataTable />.

Above the table I have this:

<rich:dropDownMenu value="Column visibility"
                        submitMode="none" direction="bottom-right">
        <c:forEach var="columnConfigVO" items="#{gridConfigurationManager.getColumnConfigs(listId)}">
               <rich:menuItem value="columnConfigVO.columnId" />
         </c:forEach>
</rich:dropDownMenu>

And then bellow that I have the usual <rich:extendedDataTable /> with its columns. I register the table columns to gridConfigurationManager component by overriding beforeRenderResponse() in ExtendedDataTable class.

The problem is that <c:forEach /> is executing before renderResponse phase, thus gridConfigurationManager.getColumnConfigs(listId) return empty.

The question is, how do I register the columns in gridConfigurationManager component before <c:forEach /> start executing?

Or, anyone know a different approach to accomplish this?

Thanks.