You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Cassie Doll (JIRA)" <ji...@apache.org> on 2008/09/06 03:10:46 UTC

[jira] Resolved: (SHINDIG-421) Shindig uses fields that might not be supported

     [ https://issues.apache.org/jira/browse/SHINDIG-421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Cassie Doll resolved SHINDIG-421.
---------------------------------

    Resolution: Won't Fix
      Assignee: Cassie Doll

The javascript here isn't buggy and is working as intended. 

-however- its intention is off as Kevin mentioned. The restful server should be producing a displayName field which the js will just reference. I will file a separate bug for this. 

> Shindig uses fields that might not be supported
> -----------------------------------------------
>
>                 Key: SHINDIG-421
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-421
>             Project: Shindig
>          Issue Type: Bug
>          Components: Features (Javascript)
>            Reporter: Henning Schmiedehausen
>            Assignee: Cassie Doll
>
> In opensocial-reference/person.js, there is the following code:
> var ORDERED_NAME_FIELDS_ = [
>     opensocial.Name.Field.HONORIFIC_PREFIX,
>     opensocial.Name.Field.GIVEN_NAME,
>     opensocial.Name.Field.FAMILY_NAME,
>     opensocial.Name.Field.HONORIFIC_SUFFIX,
>     opensocial.Name.Field.ADDITIONAL_NAME];
> [...]
>  // Next try to construct the name from the individual components
>     var fullName = '';
>     for (var i = 0; i < ORDERED_NAME_FIELDS_.length; i++) {
>       var nameValue = name.getField(ORDERED_NAME_FIELDS_[i]);
>       if (nameValue) {
>         fullName += nameValue + ' ';
>       }
>     }
>     return fullName.replace(/^\s+|\s+$/g, '') ;
> However, our container will not support some of these fields. Shouldn't Shindig check for this using supportsField() ?
>     var fullName = '';
>     for (var i = 0; i < ORDERED_NAME_FIELDS_.length; i++) {
>       if (opensocial.getEnvironment().supportsField(opensocial.Environment.ObjectType.NAME, ORDERED_NAME_FIELDS_[i])) {
>         var nameValue = name.getField(ORDERED_NAME_FIELDS_[i]);
>         if (nameValue) {
>           fullName += nameValue + ' ';
>         }
>       }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.