use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.
the class WSPersonalProfileServiceViewBean method handleTblDSAttributeMapListButtonDeleteRequest.
/**
* Handles remove LDAP Attribute Mapping request.
*
* @param event Request Invocation Event.
*/
public void handleTblDSAttributeMapListButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
setSubmitCycle(true);
CCActionTable table = (CCActionTable) getChild(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_DS_ATTRIBUTE_MAP_LIST);
table.restoreStateData();
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_DS_ATTRIBUTE_MAP_LIST);
Integer[] selected = tblModel.getSelectedRows();
if ((selected != null) && (selected.length > 0)) {
OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_DS_ATTRIBUTE_MAP_LIST);
tblValues.removeAll(selected);
setPageSessionAttribute(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_DS_ATTRIBUTE_MAP_LIST, tblValues);
populateDSAttributeMapListTable(tblValues);
}
resetButtonState(TBL_DS_ATTRIBUTE_MAP_LIST_DELETE_BTN);
forwardTo();
}
use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.
the class WSAuthNServicesViewBean method handleTblHandlersButtonDeleteRequest.
/**
* Handles remove handler request.
*
* @param event Request Invocation Event.
*/
public void handleTblHandlersButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
setSubmitCycle(true);
CCActionTable table = (CCActionTable) getChild(WSAuthNServicesModelImpl.ATTRIBUTE_NAME_HANDLERS);
table.restoreStateData();
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(WSAuthNServicesModelImpl.ATTRIBUTE_NAME_HANDLERS);
Integer[] selected = tblModel.getSelectedRows();
if ((selected != null) && (selected.length > 0)) {
OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(WSAuthNServicesModelImpl.ATTRIBUTE_NAME_HANDLERS);
tblValues.removeAll(selected);
setPageSessionAttribute(WSAuthNServicesModelImpl.ATTRIBUTE_NAME_HANDLERS, tblValues);
populateHandlersTable(tblValues);
}
forwardTo();
}
use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.
the class ServicesViewBean method handleTblButtonDeleteRequest.
/**
* Deletes ID Repo.
*
* @param event Request Invocation Event.
* @throws ModelControlException if table model cannot be restored.
*/
public void handleTblButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
CCActionTable table = (CCActionTable) getChild(TBL_SEARCH);
table.restoreStateData();
Integer[] selected = tblModel.getSelectedRows();
Set names = new HashSet(selected.length * 2);
for (int i = 0; i < selected.length; i++) {
tblModel.setRowIndex(selected[i].intValue());
names.add((String) tblModel.getValue(TF_DATA_NAME));
}
try {
ServicesModel model = (ServicesModel) getModel();
String curRealm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
model.unassignServices(curRealm, names);
if (selected.length == 1) {
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "services.message.deleted");
} else {
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "services.message.deleted.pural");
}
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
forwardTo();
}
use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.
the class AuthConfigViewBean method handleButton1Request.
/**
* Handles save button request.
*
* @param event Request invocation event
*/
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
CCActionTable table = (CCActionTable) getChild(AUTH_ENTRY_TABLE);
table.restoreStateData();
acModel = (AuthConfigurationModel) getModel();
acModel.setEntries(getTableData());
try {
Map original = acModel.getValues();
AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
Map updated = ps.getAttributeValues(original, true, acModel);
acModel.setValues(updated);
acModel.store(getRealmName(), getConfigName());
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "authentication.save.ok");
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
tablePopulated = false;
}
forwardTo();
}
use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.
the class AuthConfigViewBean method handleReorderEntryButtonRequest.
/**
* Handles reorder authentication chains request.
*
* @param event Request invocation event
*/
public void handleReorderEntryButtonRequest(RequestInvocationEvent event) throws ModelControlException {
CCActionTable table = (CCActionTable) getChild(AUTH_ENTRY_TABLE);
table.restoreStateData();
cacheValues();
setPageSessionAttribute(ENTRY_LIST, AMAuthConfigUtils.authConfigurationEntryToXMLString(getTableData()));
ReorderAuthChainsViewBean vb = (ReorderAuthChainsViewBean) getViewBean(ReorderAuthChainsViewBean.class);
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
}
Aggregations