cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

We are happy to announce the new Windchill Customization board! Learn more.

Custom Action - handle to all selected rows

MarkBohannon
7-Bedrock

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

1 ACCEPTED SOLUTION

Accepted Solutions
Florent
14-Alexandrite
(To:MarkBohannon)

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

Florent ROUSSEL
www.4cad.ca

View solution in original post

2 REPLIES 2
Florent
14-Alexandrite
(To:MarkBohannon)

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

Florent ROUSSEL
www.4cad.ca

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
...
Top Tags