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/02/11 21:54:07 UTC

[jira] Closed: (SHINDIG-59) opensocial.Person.getDisplayName returns an object instead of a string

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

Cassie Doll closed SHINDIG-59.
------------------------------

    Resolution: Fixed

> opensocial.Person.getDisplayName returns an object instead of a string
> ----------------------------------------------------------------------
>
>                 Key: SHINDIG-59
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-59
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Paul Lindner
>            Assignee: Paul Lindner
>
> The specification says that getDisplayName() should return a string.  Instead right now it returns a 
> opensocial.Name object:
> opensocial.Person.prototype.getDisplayName = function() {
>   return this.getField(opensocial.Person.Field.NAME);
> }
> To return a string we should construct a value based off the opensocial.Name object.

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


Re: [jira] Closed: (SHINDIG-59) opensocial.Person.getDisplayName returns an object instead of a string

Posted by Cassie <do...@google.com>.
Yup, this is correct. The sample container does not match the 0.7
spec. (0.6had it as just a string) So it breaks the sample container
but technically
the sample container was already broken :)

I'll commit this.


On Mon, Feb 11, 2008 at 2:29 PM, Jamey Wood <Ja...@sun.com> wrote:

> Doesn't this change break the sample container?  Around line 196 of
> statefileparser.js, the "name" property is set to a simple string:
>
>    'name' : $(xmlNode).attr(opensocial.Person.Field.NAME),
>
> ...so when the new  "name.getField in not a function" errors, when the
> new getDisplayName code comes along, it complains that "name.getField is
> not a function".
>
> Not sure if this is the proper way to fix this, but changing that line
> to this gets things working for me:
>
>    'name' : new opensocial.Name({'unstructured' :
> $(xmlNode).attr(opensocial.Person.Field.NAME)}),
>
> --Jamey
>
> Cassie Doll (JIRA) wrote:
> >      [
> https://issues.apache.org/jira/browse/SHINDIG-59?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel]
> >
> > Cassie Doll closed SHINDIG-59.
> > ------------------------------
> >
> >     Resolution: Fixed
> >
> >
> >> opensocial.Person.getDisplayName returns an object instead of a string
> >> ----------------------------------------------------------------------
> >>
> >>                 Key: SHINDIG-59
> >>                 URL: https://issues.apache.org/jira/browse/SHINDIG-59
> >>             Project: Shindig
> >>          Issue Type: Bug
> >>            Reporter: Paul Lindner
> >>            Assignee: Paul Lindner
> >>
> >> The specification says that getDisplayName() should return a string.
>  Instead right now it returns a
> >> opensocial.Name object:
> >> opensocial.Person.prototype.getDisplayName = function() {
> >>   return this.getField(opensocial.Person.Field.NAME);
> >> }
> >> To return a string we should construct a value based off the
> opensocial.Name object.
> >>
> >
> >
>
>

Re: [jira] Closed: (SHINDIG-59) opensocial.Person.getDisplayName returns an object instead of a string

Posted by Jamey Wood <Ja...@sun.com>.
Doesn't this change break the sample container?  Around line 196 of 
statefileparser.js, the "name" property is set to a simple string:

    'name' : $(xmlNode).attr(opensocial.Person.Field.NAME),

...so when the new  "name.getField in not a function" errors, when the 
new getDisplayName code comes along, it complains that "name.getField is 
not a function".

Not sure if this is the proper way to fix this, but changing that line 
to this gets things working for me:

    'name' : new opensocial.Name({'unstructured' : 
$(xmlNode).attr(opensocial.Person.Field.NAME)}),

--Jamey

Cassie Doll (JIRA) wrote:
>      [ https://issues.apache.org/jira/browse/SHINDIG-59?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Cassie Doll closed SHINDIG-59.
> ------------------------------
>
>     Resolution: Fixed
>
>   
>> opensocial.Person.getDisplayName returns an object instead of a string
>> ----------------------------------------------------------------------
>>
>>                 Key: SHINDIG-59
>>                 URL: https://issues.apache.org/jira/browse/SHINDIG-59
>>             Project: Shindig
>>          Issue Type: Bug
>>            Reporter: Paul Lindner
>>            Assignee: Paul Lindner
>>
>> The specification says that getDisplayName() should return a string.  Instead right now it returns a 
>> opensocial.Name object:
>> opensocial.Person.prototype.getDisplayName = function() {
>>   return this.getField(opensocial.Person.Field.NAME);
>> }
>> To return a string we should construct a value based off the opensocial.Name object.
>>     
>
>