[ 
https://issues.apache.org/jira/browse/SHINDIG-608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632241#action_12632241
 ] 

Cassie Doll commented on SHINDIG-608:
-------------------------------------

In jsonrpccontainer and restfulcontainer.js you will see both classes making a 
call like this: FieldTranslations.translateServerPersonToJsPerson(serverJson);

this calls out to fieldtranslations.js which takes the serverJson and makes it 
backwards compatible with the json the opensocial js apis need. specifically, 
you will see:

  if (serverJson.gender) {
    var key = serverJson.gender == 'male' ? 'MALE' :
              (serverJson.gender == 'female') ? 'FEMALE' :
              null;
    serverJson.gender = {key : key, displayValue : serverJson.gender};
  }

So the js should be fine. The api for gadgets should not have changed at all. 
This is working on the java side for jsonrpccontainer so maybe there is just a 
bug in the restfulcontainer file for php?

> Gender field is not defined properly in canonicaldb.json
> --------------------------------------------------------
>
>                 Key: SHINDIG-608
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-608
>             Project: Shindig
>          Issue Type: Bug
>         Environment: windows
>            Reporter: impetus technologies
>         Attachments: canonicaldb.json.patch
>
>
> Gender field is defined as
> "gender" : "male" and "gender" : "female"
> that's why it is displaying "undefined" in gadgets instead of male/female.
> which should be
> "gender" : {"displayValue":"male","key":"MALE"} and "gender" : 
> {"displayValue":"female","key":"FEMALE"}

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

Reply via email to