use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.
the class WSPersonalProfileServiceViewBean method createSupportedContainerTableModel.
private void createSupportedContainerTableModel() {
CCActionTableModel tblModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/tblWSPersonalProfileSupportedContainers.xml"));
tblModel.setTitleLabel("label.items");
tblModel.setActionValue(TBL_SUPPORTED_CONTAINER_COL_NAME, "webservices.personal.profile.table.supportedContainers.name");
tblModel.setActionValue(TBL_SUPPORTED_CONTAINER_ADD_BTN, "webservices.personal.profile.table.supportedContainers.add.button");
tblModel.setActionValue(TBL_SUPPORTED_CONTAINER_DELETE_BTN, "webservices.personal.profile.table.supportedContainers.delete.button");
propertySheetModel.setModel(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_SUPPPORTED_CONTAINERS, tblModel);
}
use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.
the class WSPersonalProfileServiceViewBean method handleTblSupportedContainerButtonDeleteRequest.
/**
* Handles remove supported container request.
*
* @param event Request Invocation Event.
*/
public void handleTblSupportedContainerButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
setSubmitCycle(true);
CCActionTable table = (CCActionTable) getChild(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_SUPPPORTED_CONTAINERS);
table.restoreStateData();
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_SUPPPORTED_CONTAINERS);
Integer[] selected = tblModel.getSelectedRows();
if ((selected != null) && (selected.length > 0)) {
OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_SUPPPORTED_CONTAINERS);
tblValues.removeAll(selected);
setPageSessionAttribute(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_SUPPPORTED_CONTAINERS, tblValues);
populateSupportedContainersTable(tblValues);
}
resetButtonState(TBL_SUPPORTED_CONTAINER_DELETE_BTN);
forwardTo();
}
use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.
the class WSPersonalProfileServiceViewBean method createDSAttributeMapListTableModel.
private void createDSAttributeMapListTableModel() {
CCActionTableModel tblModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/tblWSPersonalProfileDSAttributeMapList.xml"));
tblModel.setTitleLabel("label.items");
tblModel.setActionValue(TBL_DS_ATTRIBUTE_MAP_LIST_COL_NAME, "webservices.personal.profile.table.dsAttributeMapList.name");
tblModel.setActionValue(TBL_DS_ATTRIBUTE_MAP_LIST_COL_MAP, "webservices.personal.profile.table.dsAttributeMapList.map");
tblModel.setActionValue(TBL_DS_ATTRIBUTE_MAP_LIST_ADD_BTN, "webservices.personal.profile.table.dsAttributeMapList.add.button");
tblModel.setActionValue(TBL_DS_ATTRIBUTE_MAP_LIST_DELETE_BTN, "webservices.personal.profile.table.dsAttributeMapList.delete.button");
propertySheetModel.setModel(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_DS_ATTRIBUTE_MAP_LIST, tblModel);
}
use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.
the class SMDiscoveryServiceViewBean method populateProviderResourceIdMapperTable.
private void populateProviderResourceIdMapperTable(Collection mapper) {
tablePopulated = true;
OrderedSet cache = new OrderedSet();
if (mapper != null) {
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER);
tblModel.clearAll();
boolean firstEntry = true;
int counter = 0;
for (Iterator i = mapper.iterator(); i.hasNext(); ) {
String val = (String) i.next();
if (!firstEntry) {
tblModel.appendRow();
} else {
firstEntry = false;
}
Map map = AMAdminUtils.getValuesFromDelimitedString(val, "|");
String providerId = (String) map.get(AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER_PROVIDER_ID);
String idMapper = (String) map.get(AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER_ID_MAPPER);
if ((providerId != null) && (idMapper != null)) {
tblModel.setValue(TBL_PROVIDER_RESOURCEID_MAPPER_DATA_PROVIDERID, providerId);
tblModel.setValue(TBL_PROVIDER_RESOURCEID_MAPPER_DATA_ID_MAPPER, idMapper);
tblModel.setValue(TBL_PROVIDER_RESOURCEID_MAPPER_HREF_ACTION, Integer.toString(counter));
counter++;
cache.add(val);
}
}
}
setPageSessionAttribute(AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER, cache);
}
use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.
the class SMDiscoveryServiceViewBean method populateBootstrapResOffTable.
private void populateBootstrapResOffTable(Set resoff) {
tablePopulated = true;
if (resoff != null) {
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(AMAdminConstants.DISCOVERY_SERVICE_NAME_BOOTSTRAP_RES_OFF);
tblModel.clearAll();
boolean firstEntry = true;
int counter = 0;
try {
SMDiscoveryServiceData smEntry = SMDiscoveryServiceData.getEntries(resoff);
List resourceList = smEntry.getResourceData();
if ((resourceList != null) && !resourceList.isEmpty()) {
for (Iterator i = resourceList.iterator(); i.hasNext(); ) {
SMDiscoEntryData smDisco = (SMDiscoEntryData) i.next();
if (!firstEntry) {
tblModel.appendRow();
} else {
firstEntry = false;
}
tblModel.setValue(TBL_BOOTSTRAP_RES_OFF_DATA_SERVICE_TYPE, smDisco.serviceType);
tblModel.setValue(TBL_BOOTSTRAP_RES_OFF_DATA_ABSTRACT, smDisco.abstractValue);
tblModel.setValue(TBL_BOOTSTRAP_RES_OFF_HREF_ACTION, Integer.toString(counter));
counter++;
}
disableButton(TBL_BOOTSTRAP_RES_OFF_ADD_BTN, true);
} else {
disableButton(TBL_BOOTSTRAP_RES_OFF_ADD_BTN, false);
}
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
}
setPageSessionAttribute(AMAdminConstants.DISCOVERY_SERVICE_NAME_BOOTSTRAP_RES_OFF, (OrderedSet) resoff);
}
Aggregations