use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.
the class AuthConfigViewBean method handleRemoveEntryButtonRequest.
/**
* Handles remove auth instance request.
*
* @param event Request invocation event
*/
public void handleRemoveEntryButtonRequest(RequestInvocationEvent event) throws ModelControlException {
CCActionTable table = (CCActionTable) getChild(AUTH_ENTRY_TABLE);
table.restoreStateData();
// get the entries selected in the table and remove from
// the model
Integer[] selected = entryTableModel.getSelectedRows();
acModel = (AuthConfigurationModel) getModel();
acModel.removeAuthEntries(selected);
String xml = acModel.getXMLValue(getRealmName(), getConfigName());
setPageSessionAttribute(ENTRY_LIST, xml);
// set back to false to force the values to be re-read
cacheValues();
tablePopulated = false;
forwardTo();
}
use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.
the class SessionPropertyConditionEditViewBean method handleButton2Request.
public void handleButton2Request(RequestInvocationEvent event) throws ModelControlException {
Map orig = (Map) getPageSessionAttribute(PG_SESSION_ORIG);
Map map = new HashMap();
map.putAll(orig);
setPageSessionAttribute(SessionPropertyConditionHelper.PG_SESSION_PROPERTY_VALUES, (HashMap) map);
CCActionTable tbl = (CCActionTable) getChild(SessionPropertyConditionHelper.ATTR_VALUES);
tbl.resetStateData();
helper.populateTable(map, propertySheetModel);
forwardTo();
}
use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.
the class SessionPropertyConditionEditViewBean method setPropertiesValues.
protected void setPropertiesValues(Map values) {
Object cached = getPageSessionAttribute(SessionPropertyConditionHelper.PG_SESSION_PROPERTY_VALUES);
if (cached == null) {
Map map = new HashMap();
map.putAll(values);
setPageSessionAttribute(SessionPropertyConditionHelper.PG_SESSION_PROPERTY_VALUES, (HashMap) map);
try {
CCActionTable tbl = (CCActionTable) getChild(SessionPropertyConditionHelper.ATTR_VALUES);
tbl.resetStateData();
} catch (ModelControlException e) {
//no-op, cannot reset action table
}
helper.populateTable(map, propertySheetModel);
Map orig = new HashMap();
orig.putAll(values);
setPageSessionAttribute(PG_SESSION_ORIG, (HashMap) orig);
}
}
use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.
the class SMDiscoveryServiceViewBean method handleTblProviderResourceIdMapperButtonDeleteRequest.
/**
* Handles remove provider resource id mapper request.
*
* @param event Request Invocation Event.
*/
public void handleTblProviderResourceIdMapperButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
setSubmitCycle(true);
CCActionTable table = (CCActionTable) getChild(AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER);
table.restoreStateData();
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER);
Integer[] selected = tblModel.getSelectedRows();
if ((selected != null) && (selected.length > 0)) {
OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER);
tblValues.removeAll(selected);
populateProviderResourceIdMapperTable(tblValues);
}
forwardTo();
}
use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.
the class SMDiscoveryBootstrapRefOffViewBeanBase method handleTblSecurityMechIDButtonDeleteRequest.
/**
* Handles remove security mechanism ID request.
*
* @param event Request Invocation Event.
*/
public void handleTblSecurityMechIDButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
try {
SMDiscoEntryData smData = getValues(false);
CCActionTable table = (CCActionTable) getChild(ATTRIBUTE_NAME_SECURITY_MECH_ID);
table.restoreStateData();
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(ATTRIBUTE_NAME_SECURITY_MECH_ID);
Integer[] selected = tblModel.getSelectedRows();
if ((selected != null) && (selected.length > 0)) {
for (int i = selected.length - 1; i >= 0; --i) {
Integer index = selected[i];
smData.descData.remove(index.intValue());
}
setValues(smData, getModel());
populateDescriptionsTable(smData.descData);
}
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
forwardTo();
}
Aggregations