use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.
the class PolicyOpViewBeanBase method createChild.
protected View createChild(String name) {
View view = null;
if (!bPopulateTables) {
populateTables();
bPopulateTables = true;
}
if (ptModel.isChildSupported(name)) {
view = ptModel.createChild(this, name);
} else if (name.equals(PROPERTY_ATTRIBUTE)) {
view = new AMPropertySheet(this, propertySheetModel, name);
} else if (propertySheetModel.isChildSupported(name)) {
view = propertySheetModel.createChild(this, name, getModel());
} else {
view = super.createChild(name);
}
return view;
}
use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.
the class RuleOpViewBeanBase method createChild.
protected View createChild(String name) {
View view = null;
if (name.equals(ACTIONS_TILED_VIEW)) {
view = new ActionTiledView(this, tblActionsModel, name);
} else if (ptModel.isChildSupported(name)) {
view = ptModel.createChild(this, name);
} else if (name.equals(TBL_ACTIONS)) {
CCActionTable table = new CCActionTable(this, tblActionsModel, name);
table.setTiledView((ActionTiledView) getChild(ACTIONS_TILED_VIEW));
view = table;
} else if (name.equals(PROPERTY_ATTRIBUTE)) {
view = new AMPropertySheet(this, propertySheetModel, name);
} else if (propertySheetModel.isChildSupported(name)) {
view = propertySheetModel.createChild(this, name, getModel());
} else {
view = super.createChild(name);
}
return view;
}
use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.
the class RealmPropertiesViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
if (!isJatoSessionRequestFromXUI(getRequestContext().getRequest()) && isXuiAdminConsoleEnabled()) {
String redirectRealm = getRedirectRealm(this);
redirectToXui(getRequestContext().getRequest(), redirectRealm, MessageFormat.format("realms/{0}/dashboard", Uris.urlEncodePathElement(redirectRealm)));
return;
}
super.beginDisplay(event);
RMRealmModel model = (RMRealmModel) getModel();
if (model != null) {
if (!submitCycle) {
String realm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
AMPropertySheet ps = (AMPropertySheet) getChild(REALM_PROPERTIES);
psModel.clear();
try {
ps.setAttributeValues(model.getAttributeValues(realm), model);
} catch (AMConsoleException a) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", "no.properties");
}
}
setPageTitle(getModel(), "page.title.realms.properties");
}
}
use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.
the class IDRepoEditViewBean method setDefaultValues.
/**
* Sets the default values for the attributes of a particular
* data store entry. The name of the data store is retrieved from
* the page session. The type passed in the request is not used here.
*/
protected void setDefaultValues(String type) {
String idRepoName = (String) getPageSessionAttribute(IDREPO_NAME);
if (idRepoName != null) {
IDRepoModel model = (IDRepoModel) getModel();
String realmName = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
try {
Map attrValues = model.getAttributeValues(realmName, idRepoName);
propertySheetModel.clear();
AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
ps.setAttributeValues(attrValues, model);
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
forwardTo();
}
}
}
use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.
the class SCServiceProfileViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
SubSchemaModel model = (SubSchemaModel) getModel();
if (model.hasGlobalSubSchema()) {
if (!submitCycle) {
populateTableModel(model.getSubConfigurations());
}
resetButtonState(AMPropertySheetModel.TBL_SUB_CONFIG_BUTTON_DELETE);
Map createable = model.getCreateableSubSchemaNames();
if (createable.isEmpty()) {
resetButtonState(AMPropertySheetModel.TBL_SUB_CONFIG_BUTTON_ADD);
} else {
SubConfigModel scModel = getSubConfigModel();
boolean canCreate = false;
for (Iterator i = createable.keySet().iterator(); i.hasNext() && !canCreate; ) {
String name = (String) i.next();
String plugin = scModel.getSelectableSubConfigNamesPlugin(name);
if (plugin == null) {
canCreate = true;
} else {
Set subconfigNames = scModel.getSelectableConfigNames(name);
canCreate = (subconfigNames != null) && !subconfigNames.isEmpty();
}
}
disableButton(AMPropertySheetModel.TBL_SUB_CONFIG_BUTTON_ADD, !canCreate);
}
}
if (serviceName.equals("iPlanetAMAuthHTTPBasicService")) {
CCRadioButton radio = (CCRadioButton) getChild("iplanet-am-auth-http-basic-module-configured");
if ((radio.getValue() == null) || (radio.getValue().equals(""))) {
String defaultModule = new String();
String realmName = SMSEntry.getRootSuffix();
if (realmName != null) {
List moduleList = AMAuthUtils.getModuleInstancesForHttpBasic(realmName);
if (!moduleList.isEmpty()) {
defaultModule = (String) moduleList.get(0);
radio.setValue(defaultModule);
}
}
}
}
// If this is a dynamic request the UI is set with unsaved attribute values
AMPropertySheet propertySheet = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
if (dynamicRequest) {
propertySheet.setAttributeValues(unsavedAttributeValues, model);
}
}
Aggregations