Hi Experts,
We have developed a custom Dialog in D2.
Currently this dialog only works on single selection, means even if there is multi selection in document List widget. We are getting only one r_object_id in our buildDialog() method.
public XmlNode buildDialog(D2fsContext context, List attributes)
throws Exception {
XmlNode result = null;
System.out.println("Inside BuidlDialog Method Of CustomDialogPlugin");
ParameterParser parameterParser = context.getParameterParser();
List<Attribute> params = parameterParser.getParameters();
for(Attribute attribute : params) {
LOG.info("Attribute Name : " + attribute.getName() + " Attribute Value : " + attribute.getValue());
}
if(attributes != null) {
for(Object attr : attributes) {
Attribute at = (Attribute) attr;
LOG.info("Attribute Name 1) : " + at.getName() + " Attribute Value 1) : " + at.getValue());
}
}
int count = context.getObjectCount();
LOG.info("Number Of Objects Selected : " + count);
java.net.URL dialogFile = context.getXmlDialogFile();
LOG.info("XML Dialog File : " + dialogFile.getPath(
}));
We get following information in Logs
Attribute Name : id Attribute Value : 09*******003679f
Number Of Objects Selected : 1
Question : How can we fetch r_object_id value for other selected documents in Document List widget.
Observation : The In build Dialog in D2 implements Managers Like
Send Mail ----> Show dialog with manager :"SendmailManager"
This dialog uses SendmailManager class which resides under WEB-INF\classes\com\emc\x3\portal\client\manager\sendmail in D2 Application.
We also tried to create The manager class like this
}
public class AgendaManager extends AbstractActionManager
{
protected static final Logger LOG = LoggerFactory.getLogger(AgendaManager.class.getName());
public List<String> listIds;
public AgendaManager(OpenAjaxMessage message) {
super(message);
}
@Override
public void handleAction() {
LOG.info("AgendaManager");
List<String> ids = initListIds();
for (String strid:listIds)
{
LOG.info("ListIDS element: "+strid);
}
StringBuilder builder = new StringBuilder();
Iterator<String> it = ids.iterator();
while(it.hasNext()) {
String s = it.next();
builder.append(s);
LOG.info("IDS : " + s);
}
String idfIDs = builder.toString();
List<Attribute> attributes = new ArrayList();
getDialogController().showDialog(idfIDs, "AgendaDialog", attributes);
}
private List<String> initListIds()
{
listIds = new ArrayList();
String ids[] = getMessage().getIds();
for(int i = 0; i < ids.length; i++)
listIds.add(ids[i]);
return listIds;
}
}
currently we have created custom menu and specified "Show Dialog "AgendaDialog". In logs we are getting single r_object_id on multiple selection.
We are specifying this manager in custom menu in D2-Config, But it seems that custom manager class is not getting invoked at all.
Do we need to register this class somewhere in D2 , How should we enable mutiple selection in D2 Dialog.
Regards
Mayur Mitkari