use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.
the class IDFFSPViewBean method getAuthenticationContexts.
private IDFFAuthContexts getAuthenticationContexts() throws ModelControlException {
CCActionTable tbl = (CCActionTable) getChild(TBL_AUTHENTICATION_CONTEXTS);
tbl.restoreStateData();
int size = 10;
IDFFAuthContexts authContexts = new IDFFAuthContexts();
for (int i = 0; i < size; i++) {
tblAuthContextsModel.setLocation(i);
String name = (String) tblAuthContextsModel.getValue(TBL_DATA_CONTEXT_REFERENCE);
String supported = (String) tblAuthContextsModel.getValue(TBL_DATA_SUPPORTED);
String level = (String) tblAuthContextsModel.getValue(TBL_DATA_LEVEL);
authContexts.put(name, supported, level);
}
return authContexts;
}
use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.
the class AMPropertySheet method restoreStateData.
/**
* Automates the restoring of store data in some children. This is required
* for some special children such as <code>CCAddRemvoe</code>.
*
* @throws ModelControlException if cannot get model of property sheet.
*/
public void restoreStateData(Collection participatingChildren) throws ModelControlException {
ViewBean parent = getParentViewBean();
String[] names = parent == null ? null : parent.getChildNames();
if ((names != null) && (names.length > 0)) {
for (int i = 0; i < names.length; i++) {
String name = names[i];
if (participatingChildren.contains(name)) {
View child = parent.getChild(name);
if (CCAddRemove.class.isInstance(child)) {
((CCAddRemove) child).restoreStateData();
} else if (CCUnOrderedList.class.isInstance(child)) {
((CCUnOrderedList) child).restoreStateData();
} else if (CCMapList.class.isInstance(child)) {
((CCMapList) child).restoreStateData();
} else if (CCEditableList.class.isInstance(child)) {
((CCEditableList) child).restoreStateData();
} else if (CCOrderedList.class.isInstance(child)) {
((CCOrderedList) child).restoreStateData();
} else if (CCActionTable.class.isInstance(child)) {
((CCActionTable) child).restoreStateData();
}
}
}
}
}
use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.
the class AMViewBeanBase method hideTableSelectionIcons.
/**
* Hides the selection checkboxes in table.
*
* @param tableName Name of table.
*/
public void hideTableSelectionIcons(String tableName) {
CCActionTable table = (CCActionTable) getChild(tableName);
CCActionTableModelInterface model = table.getModel();
model.setSelectionType(CCActionTableModelInterface.NONE);
}
use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.
the class EntitiesViewBean method createChild.
protected View createChild(String name) {
View view = null;
if (name.equals(TBL_SEARCH)) {
populateTableModelEx();
view = new CCActionTable(this, tblModel, name);
} else if (name.equals(PAGETITLE)) {
view = new CCPageTitle(this, ptModel, name);
} else if (tblModel.isChildSupported(name)) {
view = tblModel.createChild(this, name);
} else if (ptModel.isChildSupported(name)) {
view = ptModel.createChild(this, name);
} else {
view = super.createChild(name);
}
return view;
}
use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.
the class PolicyOpViewBeanBase method handleTblReferralsButtonDeleteRequest.
public void handleTblReferralsButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
CCActionTable table = (CCActionTable) getChild(TBL_REFERRALS);
table.restoreStateData();
try {
CachedPolicy cachedPolicy = getCachedPolicy();
Policy policy = cachedPolicy.getPolicy();
Integer[] selected = tblReferralsModel.getSelectedRows();
for (int i = 0; i < selected.length; i++) {
tblReferralsModel.setRowIndex(selected[i].intValue());
String name = (String) tblReferralsModel.getValue(TBL_REFERRALS_DATA_NAME);
policy.removeReferral(name);
}
cachedPolicy.setPolicyModified(true);
populateReferralsTable();
forwardTo();
} catch (AMConsoleException e) {
debug.warning("PolicyOpViewBeanBase.handleTblReferralsButtonDeleteRequest", e);
redirectToStartURL();
}
}
Aggregations