use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.
the class SCSAML2SOAPBindingViewBean method createRequestHandlerListTableModel.
private void createRequestHandlerListTableModel() {
CCActionTableModel tblModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream("com/sun/identity/console/tblSAML2SOAPBindingRequestHandlerList.xml"));
tblModel.setTitleLabel("label.items");
tblModel.setActionValue(TBL_REQUEST_HANDLER_LIST_COL_KEY, "soapBinding.service.table.requestHandlerList.key");
tblModel.setActionValue(TBL_REQUEST_HANDLER_LIST_COL_CLASS, "soapBinding.service.table.requestHandlerList.class");
tblModel.setActionValue(TBL_REQUEST_HANDLER_LIST_COL_ACTION, "soapBinding.service.table.requestHandlerList.action");
tblModel.setActionValue(TBL_REQUEST_HANDLER_LIST_ADD_BTN, "soapBinding.service.table.requestHandlerList.add.button");
tblModel.setActionValue(TBL_REQUEST_HANDLER_LIST_DELETE_BTN, "soapBinding.service.table.requestHandlerList.delete.button");
propertySheetModel.setModel(SCSAML2SOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST, tblModel);
}
use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.
the class SCSAML2SOAPBindingViewBean method populateRequestHandlerListTable.
private void populateRequestHandlerListTable(Set handlers) {
tablePopulated = true;
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(SCSAML2SOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
tblModel.clearAll();
boolean firstEntry = true;
int counter = 0;
for (Iterator iter = handlers.iterator(); iter.hasNext(); ) {
String c = (String) iter.next();
SAML2SOAPBindingRequestHandler entry = new SAML2SOAPBindingRequestHandler(c);
if (entry.isValid()) {
if (!firstEntry) {
tblModel.appendRow();
} else {
firstEntry = false;
}
tblModel.setValue(TBL_REQUEST_HANDLER_LIST_DATA_KEY, entry.strKey);
tblModel.setValue(TBL_REQUEST_HANDLER_LIST_DATA_CLASS, entry.strClass);
tblModel.setValue(TBL_REQUEST_HANDLER_LIST_HREF_EDIT_ACTION, Integer.toString(counter));
tblModel.setValue(TBL_REQUEST_HANDLER_LIST_LABEL_EDIT_ACTION, "soapBinding.service.table.requestHandlerList.action.edit.label");
tblModel.setValue(TBL_REQUEST_HANDLER_LIST_HREF_DUP_ACTION, Integer.toString(counter));
tblModel.setValue(TBL_REQUEST_HANDLER_LIST_LABEL_DUP_ACTION, "soapBinding.service.table.requestHandlerList.action.dup.label");
}
counter++;
}
setPageSessionAttribute(SCSAML2SOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST, (OrderedSet) handlers);
}
use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.
the class SCSOAPBindingViewBean method populateRequestHandlerListTable.
private void populateRequestHandlerListTable(Set handlers) {
tablePopulated = true;
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(SCSOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
tblModel.clearAll();
boolean firstEntry = true;
int counter = 0;
for (Iterator iter = handlers.iterator(); iter.hasNext(); ) {
String c = (String) iter.next();
SOAPBindingRequestHandler entry = new SOAPBindingRequestHandler(c);
if (entry.isValid()) {
if (!firstEntry) {
tblModel.appendRow();
} else {
firstEntry = false;
}
tblModel.setValue(TBL_REQUEST_HANDLER_LIST_DATA_KEY, entry.strKey);
tblModel.setValue(TBL_REQUEST_HANDLER_LIST_DATA_CLASS, entry.strClass);
tblModel.setValue(TBL_REQUEST_HANDLER_LIST_HREF_EDIT_ACTION, Integer.toString(counter));
tblModel.setValue(TBL_REQUEST_HANDLER_LIST_LABEL_EDIT_ACTION, "soapBinding.service.table.requestHandlerList.action.edit.label");
tblModel.setValue(TBL_REQUEST_HANDLER_LIST_HREF_DUP_ACTION, Integer.toString(counter));
tblModel.setValue(TBL_REQUEST_HANDLER_LIST_LABEL_DUP_ACTION, "soapBinding.service.table.requestHandlerList.action.dup.label");
}
counter++;
}
setPageSessionAttribute(SCSOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST, (OrderedSet) handlers);
}
use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.
the class SCServiceProfileViewBean method populateTableModel.
private void populateTableModel(List<SMSubConfig> subconfig) {
CCActionTable tbl = (CCActionTable) getChild(AMPropertySheetModel.TBL_SUB_CONFIG);
CCActionTableModel tblModel = (CCActionTableModel) tbl.getModel();
tblModel.clearAll();
if (subconfig != null) {
SerializedField szCache = (SerializedField) getChild(SZ_CACHE);
List<SMSubConfig> cache = new ArrayList<>(subconfig.size());
if (!subconfig.isEmpty()) {
tblModel.clearAll();
boolean firstEntry = true;
for (SMSubConfig conf : subconfig) {
if (conf.isHidden()) {
continue;
}
if (firstEntry) {
firstEntry = false;
} else {
tblModel.appendRow();
}
tblModel.setValue(AMPropertySheetModel.TBL_SUB_CONFIG_DATA_NAME, conf.getLocalizedName() == null ? conf.getName() : conf.getLocalizedName());
tblModel.setValue(AMPropertySheetModel.TBL_SUB_CONFIG_HREF_NAME, conf.getName());
tblModel.setValue(AMPropertySheetModel.TBL_SUB_CONFIG_DATA_TYPE, conf.getType());
cache.add(conf);
}
}
szCache.setValue(cache);
}
}
use of com.sun.web.ui.model.CCActionTableModel in project OpenAM by OpenRock.
the class SCSAML2SOAPBindingViewBean method handleTblRequestHandlerListButtonDeleteRequest.
/**
* Handles remove request handlers request.
*
* @param event Request Invocation Event.
*/
public void handleTblRequestHandlerListButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
setSubmitCycle(true);
CCActionTable table = (CCActionTable) getChild(SCSAML2SOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
table.restoreStateData();
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(SCSAML2SOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
Integer[] selected = tblModel.getSelectedRows();
if ((selected != null) && (selected.length > 0)) {
OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(SCSAML2SOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
tblValues.removeAll(selected);
setPageSessionAttribute(SCSAML2SOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST, tblValues);
populateRequestHandlerListTable(tblValues);
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "message.profile.modified");
setPageSessionAttribute(PAGE_MODIFIED, "1");
}
forwardTo();
}
Aggregations