Publish custom action in custom dialog - D2
Hello,
i am trying to publish custom action in custom dialog like the code below,
but how can i publish it IDynamicAction only create the "message" paramater without publishing.
i am trying to publish custom action in custom dialog like the code below,
but how can i publish it IDynamicAction only create the "message" paramater without publishing.
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.documentum.fc.client.DfQuery;
import com.documentum.fc.client.IDfCollection;
import com.documentum.fc.client.IDfSession;
import com.documentum.fc.common.DfException;
import com.emc.common.dctm.utils.DfSessionUtil;
import com.emc.common.java.bundles.MultiResourceBundle;
import com.emc.common.java.xml.XmlNode;
import com.emc.d2.api.config.modules.property.D2PropertyConfig;
import com.emc.d2.api.config.modules.property.ID2PropertyConfig;
import com.emc.d2fs.dctm.dialogs.AbstractDialog;
import com.emc.d2fs.dctm.dialogs.ID2Dialog;
import com.emc.d2fs.dctm.utils.ParameterParser;
import com.emc.d2fs.dctm.web.services.D2fsContext;
import com.emc.d2fs.dctm.web.services.property.D2PropertyService;
public class ConsDialog extends AbstractDialog
implements ID2Dialog
{
private Logger LOGGER = LoggerFactory.getLogger(getClass());
public static String PROPERTY_CONFIG = "property_config";
public ConsDialog()
{
}
public XmlNode buildDialog(D2fsContext context, List attributes)
throws Exception
{
IDfSession session = context.getSession();
ParameterParser parameterParser = context.getParameterParser();
String propertyName = parameterParser.getStringParameter(PROPERTY_CONFIG);
propertyName = "Mevaker_Doc_Cons";
ID2PropertyConfig propertyConfig = D2PropertyConfig.getInstanceByName(session, propertyName);
XmlNode xmlConfigDialog = propertyConfig.getXmlContent();
xmlConfigDialog.setAttribute(ID2PropertyConfig.D2_PROPERTY_CONFIG, propertyName);
XmlNode dialog = super.buildDialog(context, xmlConfigDialog, null);
return dialog;
}
public XmlNode validDialog(D2fsContext context) throws Exception {
IDfSession session = context.getSession();
(new D2PropertyService()).saveProperties(context);
Class actionClass = context.getClassByName("com.emc.d2fs.dctm.ui.dynamicactions.actions.Generic");
IDynamicAction action = (IDynamicAction)actionClass.newInstance();
Map<String, Object> map = new LinkedHashMap<String, Object>();
map.put("eMethod", "sendEmailViaOutlook");
map.put("eMode", "MULTI");
map.put("eService", "EmailViaOutlookAction");
map.put("rAction", "eval(result);");
map.put("rType", "JS");
String result = action.getAction(context, map);
return super.validDialog(context);
}
}
0
Categories
- All Categories
- 108 Developer Announcements
- 53 Articles
- 106 General Questions
- 144 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 899 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 120 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management