I am checking all the opensocial.Environment.ObjectType fields with
Environment.supportsField but it returns "false"  for all the fields.
Please see the following code. What is wrong with the following code?

====================Code======================
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="person">
<Require feature="opensocial-0.7" />
</ModulePrefs>
<Content type="html">
<![CDATA[
<script language="javascript">
function init() {
alert("supported fields"+
"\n email = " +
opensocial.getEnvironment().supportsField(opensocial.Environment.ObjectType.EMAIL,"EMAIL")
+
"\n NAME= " +
opensocial.getEnvironment().supportsField(opensocial.Environment.ObjectType.NAME,"NAME")
+
"\n PERSON = " +
opensocial.getEnvironment().supportsField(opensocial.Environment.ObjectType.BODY_TYPE,"PERSON")
+
"\n ACTIVITY = " +
opensocial.getEnvironment().supportsField(opensocial.Environment.ObjectType.ACTIVITY,"ACTIVITY")
+
"\n ACTIVITY_MEDIA_ITEM = " +
opensocial.getEnvironment().supportsField(opensocial.Environment.ObjectType.ACTIVITY_MEDIA_ITEM,"ACTIVITY_MEDIA_ITEM")
+
"\n ADDRESS = " +
opensocial.getEnvironment().supportsField(opensocial.Environment.ObjectType.ADDRESS,"ADDRESS")
+
"\n BODY_TYPE = " +
opensocial.getEnvironment().supportsField(opensocial.Environment.ObjectType.BODY_TYPE,"BODY_TYPE")
+
"\n FILTER_TYPE = " +
opensocial.getEnvironment().supportsField(opensocial.Environment.ObjectType.ADDRESS,"ADDRESS")
+
"\n MESSAGE= " +
opensocial.getEnvironment().supportsField(opensocial.Environment.ObjectType.MESSAGE,"MESSAGE")
+
"\n MESSAGE_TYPE = " +
opensocial.getEnvironment().supportsField(opensocial.Environment.ObjectType.MESSAGE_TYPE,"MESSAGE_TYPE")
+
"\n ORGANIZATION = " +
opensocial.getEnvironment().supportsField(opensocial.Environment.ObjectType.ORGANIZATION,"ORGANIZATION")
+
"\n PHONE = " +
opensocial.getEnvironment().supportsField(opensocial.Environment.ObjectType.PHONE,"PHONE")
+
"\n SORT_ORDER= " +
opensocial.getEnvironment().supportsField(opensocial.Environment.ObjectType.SORT_ORDER,"SORT_ORDER")
+
"\n URL = " +
opensocial.getEnvironment().supportsField(opensocial.Environment.ObjectType.URL,"URL")
);
}
gadgets.util.registerOnLoadHandler(init);
</script>
]]>
</Content>
</Module>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenSocial Application Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/opensocial-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to