Dear all -
i am running into this issue with the view action called from my component - In webtop i have a custom menu that is invoked after selecting multiple objects which will then get merged into a single pdf and a view action needs to be triggered so the document is displayed to the user.
i created a container and a component. once i collect the obj_id's in the contianer I then pass it to the component where i am invoking the view action as below. but i am contantly getting "ContainerIncludeTag can only be included within a Container" err
MergeDocs.java Component
-----------------------------------------
public class MergeDocs extends Component {
public void onInit(ArgumentList args){
ArgumentList myarg=new ArgumentList();
IDfId objectID = null;
super.onInit(args);
System.out.println("Entered MergeDocs component");
String [] compArgs = args.getValues("objectId");
String []objIds = new String [compArgs.length];
for (int i=0; i < compArgs.length; i++){
System.out.println("ComponentArgs = " + compArgs[i]);
ArgumentList temp = ArgumentList.decode(compArgs[i]);
objIds[i] = temp.get("objectId");
objectID = new DfId(compArgs[0]);
}
for (int i=0; i<objIds.length; i++)
System.out.println(objIds[i]);
myarg.add("objectId", objectID.getId());
ActionService.execute("view", myarg, getContext().getSessionContext(), this, null);
System.out.println("Documents have been viewed: "+myarg.get("objectId"));
}
MergeDocsContainer.java Container
----------------------------------------------------
public class MergeDocsContainer extends DialogContainer {
public void onInit(ArgumentList argumentlist) {
super.onInit(argumentlist);
System.out.println("Entered Mergedocs Container");
String as[] = argumentlist.getValues("componentArgs");
ArgumentList argumentlist1 = new ArgumentList();
for (int i = 0; i < as.length; i++) {
System.out.println("ComponentArgs = " + as[i]);
String s = as[i];
argumentlist1.add(ArgumentList.decode(s));
}
for (int i=0; i < compArgs.length; i++){
System.out.println("ComponentArgs = " + compArgs[i]);
ArgumentList temp = ArgumentList.decode(compArgs[i]);
}
setContainedComponentArgs(argumentlist1);
}
}
thanks,
RKG