You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Paul Lindner (JIRA)" <ji...@apache.org> on 2008/02/11 21:48:08 UTC

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

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] Created: (SHINDIG-59) opensocial.Person.getDisplayName returns an object instead of a string

Posted by Paul Lindner <pl...@hi5.com>.
I committed a fix for this.  If an unstructured name is present we
just return that, otherwise we return the joined together available
fields.

If no one objects to that design I'll close this bug.  Thanks!

On Mon, Feb 11, 2008 at 12:48:08PM -0800, Paul Lindner (JIRA) wrote:
> 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.
> 
> 
> 

-- 
Paul Lindner
hi5 Architect
plindner@hi5.com

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.
>>     
>
>   


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

Posted by "Cassie Doll (JIRA)" <ji...@apache.org>.
     [ 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.