use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.
the class AMPropertySheetModel method registerChildren.
public void registerChildren(ContainerViewBase view) {
super.registerChildren(view);
for (Iterator i = childMap.keySet().iterator(); i.hasNext(); ) {
String name = (String) i.next();
String tagName = (String) childMap.get(name);
if (tagName != null) {
if (tagName.equals(ORDERED_LIST)) {
view.registerChild(name, CCOrderedList.class);
} else if (tagName.equals(UNORDERED_LIST)) {
view.registerChild(name, CCUnOrderedList.class);
} else if (tagName.equals(MAP_LIST)) {
view.registerChild(name, CCMapList.class);
} else if (tagName.equals(GLOBAL_MAP_LIST)) {
view.registerChild(name, CCGlobalMapList.class);
} else if (tagName.equals(EDITABLE_LIST)) {
view.registerChild(name, CCEditableList.class);
}
}
}
if (hasSubConfigTable) {
CCActionTableModel model = createSubConfigActionTableModel();
model.registerChildren(view);
}
}
use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.
the class RuleOpViewBeanBase method createTableModels.
private void createTableModels() {
tblActionsModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/tblPMRulesActions.xml"));
tblActionsModel.setTitleLabel("label.items");
tblActionsModel.setActionValue(TBL_ACTIONS_COL_NAME, "policy.rules.actions.table.column.name");
tblActionsModel.setActionValue(TBL_ACTIONS_COL_VALUE, "policy.rules.actions.table.column.value");
tblActionsModel.setModel(TBL_ACTIONS_EDITABLE_LIST, new CCEditableListModel());
propertySheetModel.setModel(TBL_ACTIONS, tblActionsModel);
}
use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.
the class SMG11NViewBean method populateSupportedCharsetsTable.
private void populateSupportedCharsetsTable(Set charsets) {
tablePopulated = true;
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(SMG11NModelImpl.ATTRIBUTE_NAME_SUPPORTED_CHARSETS);
tblModel.clearAll();
boolean firstEntry = true;
int counter = 0;
for (Iterator iter = charsets.iterator(); iter.hasNext(); ) {
String c = (String) iter.next();
LocaleSupportedCharsetsEntry entry = new LocaleSupportedCharsetsEntry(c);
if (entry.isValid()) {
if (!firstEntry) {
tblModel.appendRow();
} else {
firstEntry = false;
}
tblModel.setValue(TBL_SUPPORTED_CHARSETS_DATA_LOCALE, entry.strLocale);
tblModel.setValue(TBL_SUPPORTED_CHARSETS_DATA_CHARSETS, entry.strCharsets);
tblModel.setValue(TBL_SUPPORTED_CHARSETS_HREF_ACTION, Integer.toString(counter));
}
counter++;
}
setPageSessionAttribute(SMG11NModelImpl.ATTRIBUTE_NAME_SUPPORTED_CHARSETS, (OrderedSet) charsets);
}
use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.
the class SMG11NViewBean method createSupportedCharsetsTableModel.
private void createSupportedCharsetsTableModel() {
CCActionTableModel tblModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/tblG11NSupportedCharsets.xml"));
tblModel.setTitleLabel("label.items");
tblModel.setActionValue(TBL_SUPPORTED_CHARSETS_COL_LOCALE, "globalization.service.table.SupportedCharsets.locale");
tblModel.setActionValue(TBL_SUPPORTED_CHARSETS_COL_CHARSETS, "globalization.service.table.SupportedCharsets.charsets");
tblModel.setActionValue(TBL_SUPPORTED_CHARSETS_ADD_BTN, "globalization.service.table.SupportedCharsets.add.button");
tblModel.setActionValue(TBL_SUPPORTED_CHARSETS_DELETE_BTN, "globalization.service.table.SupportedCharsets.delete.button");
propertySheetModel.setModel(SMG11NModelImpl.ATTRIBUTE_NAME_SUPPORTED_CHARSETS, tblModel);
}
use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.
the class SMG11NViewBean method handleTblCharsetAliasButtonDeleteRequest.
/**
* Handles remove charset alias request.
*
* @param event Request Invocation Event.
*/
public void handleTblCharsetAliasButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
setSubmitCycle(true);
CCActionTable table = (CCActionTable) getChild(SMG11NModelImpl.ATTRIBUTE_NAME_CHARSET_ALIAS);
table.restoreStateData();
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(SMG11NModelImpl.ATTRIBUTE_NAME_CHARSET_ALIAS);
Integer[] selected = tblModel.getSelectedRows();
if ((selected != null) && (selected.length > 0)) {
OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(SMG11NModelImpl.ATTRIBUTE_NAME_CHARSET_ALIAS);
tblValues.removeAll(selected);
setPageSessionAttribute(SMG11NModelImpl.ATTRIBUTE_NAME_CHARSET_ALIAS, tblValues);
populateCharsetAliasTable(tblValues);
}
forwardTo();
}
Aggregations