use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.
the class RealmResourceOfferingViewBean method createTableModel.
protected void createTableModel() {
tblModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/tblRealmResourceOffering.xml"));
tblModel.setTitleLabel("label.items");
tblModel.setActionValue(TBL_BUTTON_ADD, "table.realm.resource.offerings.button.new");
tblModel.setActionValue(TBL_BUTTON_DELETE, "table.realm.resource.offerings.button.delete");
tblModel.setActionValue(TBL_COL_SERVICE_TYPE, "table.realm.resource.offerings.column.service.name");
tblModel.setActionValue(TBL_COL_ABSTRACT, "table.realm.resource.offerings.column.abstract");
}
use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.
the class SCPolicyViewBean method populateResourceComparatorTable.
private void populateResourceComparatorTable(Set resourceComp) {
tablePopulated = true;
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(TBL_RESOURCE);
tblModel.clearAll();
boolean firstEntry = true;
int counter = 0;
for (Iterator iter = resourceComp.iterator(); iter.hasNext(); ) {
String c = (String) iter.next();
PolicyResourceComparator comp = new PolicyResourceComparator(c);
if (!firstEntry) {
tblModel.appendRow();
} else {
firstEntry = false;
}
tblModel.setValue(TBL_RESOURCE_COMPARATOR_DATA_NAME, comp.getServiceType());
tblModel.setValue(TBL_RESOURCE_COMPARATOR_HREF_ACTION, Integer.toString(counter));
tblModel.setValue(TBL_RESOURCE_COMPARATOR_LABEL_ACTION, "policy.service.table.resource.comparator.action.edit.label");
counter++;
}
setPageSessionAttribute(SCPolicyModel.ATTRIBUTE_NAME_RESOURCE_COMPARATOR, (OrderedSet) resourceComp);
}
use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.
the class SCPolicyViewBean method handleTblResourceComparatorButtonDeleteRequest.
/**
* Handles remove resource comparator request.
*
* @param event Request Invocation Event.
*/
public void handleTblResourceComparatorButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
submitCycle = true;
CCActionTable table = (CCActionTable) getChild(TBL_RESOURCE);
table.restoreStateData();
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(TBL_RESOURCE);
Integer[] selected = tblModel.getSelectedRows();
if ((selected != null) && (selected.length > 0)) {
OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(SCPolicyModel.ATTRIBUTE_NAME_RESOURCE_COMPARATOR);
tblValues.removeAll(selected);
setPageSessionAttribute(SCPolicyModel.ATTRIBUTE_NAME_RESOURCE_COMPARATOR, tblValues);
populateResourceComparatorTable(tblValues);
}
try {
Map values = getAllValues();
setPageSessionAttribute(PROPERTY_ATTRIBUTE, (HashMap) values);
setPageSessionAttribute(SCPolicyViewBean.PAGE_MODIFIED, "1");
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
forwardTo();
}
use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.
the class SCConfigAuthViewBean method createTableModels.
protected void createTableModels() {
SCConfigModel model = (SCConfigModel) getModel();
tblModelAuth = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/tblSCConfigAuth.xml"));
List svcNames = model.getServiceNames(SEC_AUTH);
populateTableModel(tblModelAuth, svcNames, SEC_AUTH);
}
use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.
the class MAPClientManagerViewBean method createTableModel.
private void createTableModel() {
tblModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/tblMAPClientDetection.xml"));
tblModel.setTitleLabel("label.items");
tblModel.setMaxRows(getModel().getPageSize());
tblModel.setActionValue(TBL_COL_NAME, "table.clientDetection.client.column.name");
tblModel.setActionValue(TBL_COL_ACTION, "table.clientDetection.action.column.name");
tblModel.setActionValue(TBL_BUTTON_ADD, "clientDetection.newDevice.button");
}
Aggregations