Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
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.
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"%>