public void onSuccess(GWTJahiaCreatePortletInitBean result) {
List<GWTJahiaNodeType> list = new ArrayList<GWTJahiaNodeType>(1);
list.add(result.getNodeType());
Map<String, GWTJahiaNodeProperty> defaultValues = new HashMap<String, GWTJahiaNodeProperty>();
GWTJahiaPortletDefinition definition = getGwtJahiaNewPortletInstance().getGwtJahiaPortletDefinition();
GWTJahiaNodePropertyValue value = new GWTJahiaNodePropertyValue(definition.getContextName()+"!"+definition.getDefinitionName(), GWTJahiaNodePropertyType.STRING);
defaultValues.put("j:definition", new GWTJahiaNodeProperty("j:definition", value));
if (definition.getExpirationTime() != null) {
value = new GWTJahiaNodePropertyValue("" + definition.getExpirationTime(), GWTJahiaNodePropertyType.LONG);
defaultValues.put("j:expirationTime", new GWTJahiaNodeProperty("j:expirationTime", value));
}
if (definition.getCacheScope() != null) {
value = new GWTJahiaNodePropertyValue(definition.getCacheScope(), GWTJahiaNodePropertyType.STRING);
defaultValues.put("j:cacheScope", new GWTJahiaNodeProperty("j:cacheScope", value));
}
pe = new PropertiesEditor(list, defaultValues, Arrays.asList(GWTJahiaItemDefinition.CONTENT));
pe.setMixin(result.getMixin());