use of com.sun.web.ui.model.CCActionTableModel 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.model.CCActionTableModel in project OpenAM by OpenRock.
the class WSPersonalProfileServiceViewBean method populateSupportedContainersTable.
private void populateSupportedContainersTable(Set containers) {
tablePopulated = true;
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_SUPPPORTED_CONTAINERS);
tblModel.clearAll();
boolean firstEntry = true;
int counter = 0;
for (Iterator iter = containers.iterator(); iter.hasNext(); ) {
if (!firstEntry) {
tblModel.appendRow();
} else {
firstEntry = false;
}
String c = (String) iter.next();
StringTokenizer st = new StringTokenizer(c, "|");
while (st.hasMoreTokens()) {
String tok = st.nextToken();
int idx = tok.indexOf('=');
if (idx != -1) {
String id = tok.substring(0, idx);
String val = tok.substring(idx + 1);
if (id.equals(WSPersonalProfileServiceModelImpl.SUPPORTED_CONTAINER_CONTAINER_PREFIX)) {
tblModel.setValue(TBL_SUPPORTED_CONTAINER_DATA_NAME, val);
tblModel.setValue(TBL_SUPPORTED_CONTAINER_HREF_ACTION, Integer.toString(counter));
}
}
}
counter++;
}
setPageSessionAttribute(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_SUPPPORTED_CONTAINERS, (OrderedSet) containers);
}
use of com.sun.web.ui.model.CCActionTableModel 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.model.CCActionTableModel in project OpenAM by OpenRock.
the class WSAuthNServicesViewBean method createHandlersTableModel.
private void createHandlersTableModel() {
CCActionTableModel tblModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/tblWSAuthentication.xml"));
tblModel.setTitleLabel("label.items");
tblModel.setActionValue(TBL_HANDLERS_COL_KEY, "webservices.authentication.service.table.handlers.key");
tblModel.setActionValue(TBL_HANDLERS_COL_CLASS, "webservices.authentication.service.table.handlers.class");
tblModel.setActionValue(TBL_HANDLERS_ADD_BTN, "webservices.authentication.service.table.handlers.add.button");
tblModel.setActionValue(TBL_HANDLERS_DELETE_BTN, "webservices.authentication.service.table.handlers.delete.button");
propertySheetModel.setModel(WSAuthNServicesModelImpl.ATTRIBUTE_NAME_HANDLERS, tblModel);
}
use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.
the class ServicesViewBean method createTableModel.
private void createTableModel() {
tblModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/tblRMServices.xml"));
tblModel.setTitleLabel("label.items");
tblModel.setActionValue(TBL_BUTTON_ADD, "table.services.button.new");
tblModel.setActionValue(TBL_BUTTON_DELETE, "table.services.button.delete");
tblModel.setActionValue(TBL_COL_NAME, "table.services.name.column.name");
tblModel.setActionValue(TBL_COL_ACTION, "table.services.action.column.name");
}
Aggregations