Occasionally you will want to creat a configuration in a plugin descriptor that contains something similar to the following:
<c:list-property>
<c:map-property>
.... other properties here ....
</c:map-property>
</c:list-property>
Using the onc:config JSF component with the readOnly attribute = false, these list elements are rendered with add, edit, and delete buttons.
These buttons have action mappings to org.rhq.core.gui.configuration.ConfigHelperUIBean, which should be fairly clear. The only trick here is that all of these operations have the same outcome string, which makes taking different navigation routes for each operation (slightly) less straightforward.
There are several request parameters that are supplied by these buttons:
listName - identifier for which list on which to operate. This is the name that is supplied in the plugin descriptor (the name attribute in the list-property element).
listIndex - the array index into the list identified by listName that you want to view/edit/delete. If this is not supplied, then it is assumed that you are adding a new map to the list.
Both of these attributes can be used by your view to pass directly into an onc:config component.
Define JSF navigation rules with a <from-action> of #{ConfigHelperUIBean.addNewMap} and #{ConfigHelperUIBean.accessMap}
Any view-id that is displayed as a result of the above navigation shoud include an onc:config component that uses the listName and listIndex attributes to display the proper map. If the component is displayed with the readOnly attribute = false, then saving the changes should be handled for you.