PortletApplicationDefinitionImpl pa = (PortletApplicationDefinitionImpl)portletApp;
ArrayList customStates = new ArrayList(pa.getCustomWindowStates());
Iterator mappedStatesIter = mappedWindowStates.iterator();
while ( mappedStatesIter.hasNext() )
{
CustomWindowStateImpl mappedState = (CustomWindowStateImpl)mappedStatesIter.next();
if (!mappedState.getMappedState().equals(mappedState.getCustomState()))
{
int index = customStates.indexOf(mappedState);
if ( index > -1 )
{
CustomWindowState customState = (CustomWindowState)customStates.get(index);
mappedState.setDescription(customState.getDescription());
customStates.set(index,mappedState);
}
}
}
pa.setCustomWindowStates(customStates);