Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Representing options (Radio buttons/drop-down list) #4

Open
johnlim opened this issue Nov 2, 2014 · 1 comment
Open

Representing options (Radio buttons/drop-down list) #4

johnlim opened this issue Nov 2, 2014 · 1 comment

Comments

@johnlim
Copy link

johnlim commented Nov 2, 2014

Hi Mike,

How would you represent radio options/drop-down menu items within collection-json? My idea is to use links in items like this:

{ "collection" :
  {
    "version" : "1.0",
    "href" : "http://example.org/friends/profile/jdoe",

    "links" : [
      {"rel" : "feed", "href" : "http://example.org/friends/jdoe/rss"}
    ],

    "items" : [
      {
        "href" : "http://example.org/friends/profile/edit/jdoe",
        "data" : [
          {"name" : "Field", "value" : "Occupation", "prompt" : "Occupation"},
        ],
        "links" : [
          {"rel" : "options", "href" : "http://examples.org/field/options/occupations", "prompt" : "Available Options in occupations", "render": "link},
        ]
      },
........

By doing this, the client requires making GET calls to the links, which increases transaction overheads. How would you go about representing it? :)

@mamund
Copy link
Member

mamund commented Nov 2, 2014

i found this pending merge: mamund/collection-json#6

can't recall why it never got merged in.

does this help you out?

mamund
+1.859.757.1449
skype: mca.amundsen
http://amundsen.com/blog/
http://twitter.com/mamund
https://github.com/mamund
http://linkedin.com/in/mamund

On Sun, Nov 2, 2014 at 4:35 AM, John Lim notifications@github.com wrote:

Hi Mike,

How would you represent radio options/drop-down menu items within
collection-json? My idea is to use links in items like this:

{ "collection" :
{
"version" : "1.0",
"href" : "http://example.org/friends/profile/jdoe",

"links" : [
  {"rel" : "feed", "href" : "http://example.org/friends/jdoe/rss"}
],

"items" : [
  {
    "href" : "http://example.org/friends/profile/edit/jdoe",
    "data" : [
      {"name" : "Field", "value" : "Occupation", "prompt" : "Occupation"},
    ],
    "links" : [
      {"rel" : "options", "href" : "http://examples.org/field/options/occupations", "prompt" : "Available Options in occupations", "render": "link},
    ]
  },

........

By doing this, the client requires making GET calls to the links, which
increases transaction overheads. How would you go about representing it? :)


Reply to this email directly or view it on GitHub
#4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants