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

Generic Picker Callback

Highlighted
Newbie

Generic Picker Callback

Generic picker callback method does not get the oid of the object selected. I have generic picker in the jsp that would select the document and call a callback method. I am trying to get the oid of the selected object but it throws error.

1 REPLY 1
Highlighted

Re: Generic Picker Callback

Posting the error would be helpful. I just grabbed a simple example that works with a generic picker:

<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%@ taglib uri="http://www.ptc.com/windchill/taglib/components" prefix="jca" %>

<%@ taglib tagdir="/WEB-INF/tags" prefix="wctags" %>

<%@ taglib uri="http://www.ptc.com/windchill/taglib/picker" prefix="p"%>

                                      

<%@ include file="/netmarkets/jsp/util/beginPopup.jspf"%>

<script language='JavaScript'>

function myPickerCallbackGeneric(objects, pickerID){

    var updateDisplayField = document.getElementById(pickerID + "$label$");

    var myJSONObjects = objects.pickedObject;

   var displayOid;

   for(var i=0; i< myJSONObjects.length;i++) {

     var oid = myJSONObjects[i].oid;

     displayOid = oid;

   }

 

    updateDisplayField.value= displayOid;

}

</script>

<table border="0" cellspacing="5" >

<tr >

        <%--    launching Item  Masterpicker--%>

        <wctags:genericPicker id="viewPicker" componentId="viewPicker"  objectType="wt.vc.views.View" label="View Picker using generic" pickerType="tree" pickerCallback="myPickerCallbackGeneric" />

</tr>

</table>

<%@ include file="/netmarkets/jsp/util/end.jspf"%>

Announcements
LiveWorx Call For Papers Happening Now!