Not able to get attribute value on picker callback function from custom JSP page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Not able to get attribute value on picker callback function from custom JSP page.
Hi All, I'm stuck on a problem where im not able to get the custom attribute on the picker callback, the tags and the scripts written in the jsp page is as specified below.
Tag written in the jsp page.
<wctags:itemPicker
id="pickerID"
objectType="WCTYPE|wt.doc.WTDocument|Type1|Type2"
componentId="pickerID"
searchResultsViewId="pickerID.view"
label="Submitter"
pickerTitle="Picker Title"
pickerCallback="PickerCallback1"
pickedAttributes="number,attrInternalName1,attrInternalName2,attrInternalName3"
/>
<script>
function PickerCallback1(objects,pickerID)
{
var myJSONObjects = objects.pickedObject;
for (var i = 0; i < myJSONObjects.length; i++) {
var str = JSON.stringify(myJSONObjects[i]);
alert(str);
var fullName = myJSONObjects[i]["attrInternalName1"];
alert(fullName);
}
}
</script>
Output on alert : "undefined"
Solved! Go to Solution.
- Labels:
-
General Customization
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
<tr><wctags:itemPicker id="pickerid" objectType="WCTYPE|wt.doc.WTDocument|Type1|Type2" componentId="pickerid" searchResultsViewId="Picker.view" label="Submitter" pickerTitle="Customer Picker" pickerCallback="PickerCallback1" displayAttribute="number,org.CustomerName,orgCustomerNumber,org.AddressID"/></tr>
Picked attributes are not required, only display attributes are required.
This worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Sorry, haven't used any custom pickers jet.
By the way, it would make it easier for any reader to insert code instead copy/paste text:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks, noted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
<tr><wctags:itemPicker id="pickerid" objectType="WCTYPE|wt.doc.WTDocument|Type1|Type2" componentId="pickerid" searchResultsViewId="Picker.view" label="Submitter" pickerTitle="Customer Picker" pickerCallback="PickerCallback1" displayAttribute="number,org.CustomerName,orgCustomerNumber,org.AddressID"/></tr>
Picked attributes are not required, only display attributes are required.
This worked.
