Skip to main content
1-Visitor
Mar 9, 2018 6:56 PM UTC
Solved

Custom Action - handle to all selected rows

I am working on a custom action where the user can select one or more EPM Documents and start the action.  My implementation is currently using the request parameter to grab the oid’s/soid’s of the selected objects however it only works when the user selects 8 or less items.  Is there another way to get the list of all the selected item rows at the time the custom action is selected?  If so, can you provide some guidance?

 Current method used in popup JSP

ids = request.getParameterValues("soid") or id = request.getParameter("oid")

 

Thanks,

Mark Bohannon

Lenovo

3-Newcomer
Mar 11, 2018 4:25 PM UTC

Hi Mark

I've never noticed this behavior. However, you can perhaps have a look on OOTB JSP (in codebase/netmarkets/jsp/...) ?

 

I've been able to find this (<WT_HOME>/codebase/netmarkets/jsp/object/editMultiObjects.jspf)

ArrayList oidList = cb1.getSelectedOidForPopup();

But there could be a better way. I invite you to look at the Customizer Guide.

 

Florent

2 replies

3-Newcomer
Mar 11, 2018 4:25 PM UTC

Hi Mark

I've never noticed this behavior. However, you can perhaps have a look on OOTB JSP (in codebase/netmarkets/jsp/...) ?

 

I've been able to find this (<WT_HOME>/codebase/netmarkets/jsp/object/editMultiObjects.jspf)

ArrayList oidList = cb1.getSelectedOidForPopup();

But there could be a better way. I invite you to look at the Customizer Guide.

 

Florent

Translate
1-Visitor
Mar 21, 2018 1:59 PM UTC

Thanks for the information.  I had found a reference to the NmCommandBean in the documentation however I did not know how to implement.  I ended up usin

// Code in /ext/publishDocuments/jsp/publishPopup.jspf
sessionBean.setDoneCB(false);
NmCommandBean cb1 = new NmCommandBean();
cb1.setInBeginJsp (true);
cb1.setOpenerCompContext (request.getParameter("compContext"));
cb1.setOpenerElemAddress (NmCommandBean.convert(request.getParameter("openerElemAddress")));
cb1.setCompContext (NmCommandBean.convert(request.getParameter("compContext")));
cb1.setElemAddress (NmCommandBean.convert(request.getParameter("elemAddress")));
cb1.setSessionBean (sessionBean);
cb1.setRequest (request);
cb1.setResponse (response);
cb1.setOut (out);
cb1.setWtcontextBean (wtcontext);
cb1.setContextBean (nmcontext);

ArrayList oidList = cb1.getSelectedOidForPopup();
cb1.setSelected(oidList);


// Code in /ext/publishDocuments/jsp/publishPopup.jsp
<%@ include file="/ext/publishDocuments/jsp/publishPopup.jspf" %>

<%
...
cb1.getSelected().get(i) // to retrieve each id - I iterated through the list
...
Translate