Sample Code
Modifying a Property of an AttributeConfig in an AttributePanelConfig Created by the TypedAttrLayOutFactory
This shows how you might modify an AttributeConfig in an AttributePanelConfig created by the TypedAttrLayOutFactory.
List<ComponentConfig> components = attributePanelConfig.getComponents();
for (ComponentConfig componentConfig : components) {
if( componentConfig instanceof JcaGroupConfig){
List<ComponentConfig> attributeConfigs = ((JcaGroupConfig)
componentConfig).getComponents();
for (ComponentConfig attributeConfig : attributeConfigs) {
String attributeName =((AttributeConfig)attributeConfig).getId();
if(attributeName.equals("name")){
attributeConfig.setComponentMode(ComponentMode.EDIT);
}
if(attributeName.equals("folder.id")){
((JcaAttributeConfig)attributeConfig).setDataUtilityId
("saveAsVariantSpecLocationDataUtility");
}
}
}
}
Was this helpful?