java.net: Wiki

The Source for Java Technology Collaboration


 <<O>>  Difference Topic JMakiComboxModel (12 - 23 Jul 2008 - Main.gmurray71)
Line: 1 to 1
 Main data model discussion page

Combobox Data Model

Line: 11 to 11
 Below is an example using the Combobox data model. Data passed to the Combobox widgets will be in JSON format as shown here.
[
Changed:
<
<
{ label : 'Alabama', value : 'AL'}, { label : 'California', value : 'CA'}, { label : 'New York', value : 'NY', selected : true}, { label : 'Texas', value : 'TX'}
>
>
{ id : 'al', label : 'Alabama', value : 'AL'}, { id : 'ca', label : 'California', value : 'CA'}, { id : 'ny', label : 'New York', value : 'NY', selected : true}, { id, 'tx', label : 'Texas', value : 'TX'}
  ]
Line: 27 to 27
 
    combobox ::= "["  {<item>} "]"
Changed:
<
<
item ::= "{" "label:" , [] [ ] [ ] "},"
>
>
item ::= "{" "label:" , [] [ ] [] [] "},"
  selected ::= "selected: false" action ::= "action:" "{" [] "},"
Changed:
<
<
topic ::= "topic:" ,
>
>
topic ::= "topic:"
  message ::= "message:"
Added:
>
>
id ::== "id" :
  obj ::= |
Line: 64 to 65
 The label property defines the text that will be displayed for this particular node. This element is required.
Added:
>
>
The id property defines an id associated with the item. This can later be used to select the item. It can be the same as the value but does not have to be.
 The value is published as the value property of the payload when an item is selected.

The selected property if the item is selected. As we can not prevent multiple items with selected = true the last one with selected = true wins

Line: 85 to 88
 
  • select - Selects a given item with the provided value.
jmaki.publish("/dojo/combobox/select", {
Changed:
<
<
targetId : 'foo'}
>
>
targetId : 'ca'}
  });

 <<O>>  Difference Topic JMakiComboxModel (11 - 06 Jun 2008 - Main.carlavmott)
Line: 1 to 1
 Main data model discussion page

Combobox Data Model

Line: 50 to 50
  "action" : {"type" : "object","optional":true,
"properties"
{
"topic"
{"type" : "string", "optional" : true},
Changed:
<
<
"message": {"type" : "string", "optional" : true} }
>
>
"message": {"type" : ["string","object"], "optional" : true} }
  } } }

 <<O>>  Difference Topic JMakiComboxModel (10 - 30 May 2008 - Main.carlavmott)
Line: 1 to 1
 Main data model discussion page

Combobox Data Model

Line: 39 to 39
 
{
       "description" : "jMaki ComboBox",
Deleted:
<
<
"type":"object",
"properties"
{ "items" : {
  "type" : "array", "items" : { "type" : "object",
Line: 58 to 55
  } } }
Deleted:
<
<
} };
 

 <<O>>  Difference Topic JMakiComboxModel (9 - 29 May 2008 - Main.carlavmott)
Line: 1 to 1
 Main data model discussion page

Combobox Data Model

Line: 41 to 41
  "description" : "jMaki ComboBox?", "type":"object",
"properties"
{
Added:
>
>
"items" : { "type" : "array", "items" : { "type" : "object", "properties" : { "id" : {"type": "string", "optional":true,},
  "label" : {"type": "string"},
Changed:
<
<
"value" : {"type": "string"}, "selected" : {"type": boolean, "optional" : true}, "action" : {"type" : "object",
>
>
"value" : {"type": "string", "optional":true,}, "selected" : {"type": "boolean","optional":true, "default":false}, "action" : {"type" : "object","optional":true,
 
"properties"
{
"topic"
{"type" : "string", "optional" : true},
Changed:
<
<
"message": {"type" : "object", "optional" : true}
>
>
"message": {"type" : "string", "optional" : true} }
  } } } }
Added:
>
>
} };
 

(2.2) Property Descriptions


 <<O>>  Difference Topic JMakiComboxModel (8 - 29 May 2008 - Main.carlavmott)
Line: 1 to 1
 Main data model discussion page

Combobox Data Model

Line: 37 to 37
 JSON schema format is:
Deleted:
<
<
[
  {
Changed:
<
<
"item" : {"label" : {"type": "string"}, {"value" : {"type": "string"}, {"selected" : {"type": boolean, "optional" : true}}, {"action" : {"topic": {"type" : "string", "optional" : true}}, {"message": [{"type" : "string", "optional" : true} | {"type" : "object", "optional" : true}],
>
>
"description" : "jMaki ComboBox?", "type":"object",
"properties"
{ "label" : {"type": "string"}, "value" : {"type": "string"}, "selected" : {"type": boolean, "optional" : true}, "action" : {"type" : "object",
"properties"
{
"topic"
{"type" : "string", "optional" : true}, "message": {"type" : "object", "optional" : true} } }
  } }
Deleted:
<
<
]
 

(2.2) Property Descriptions


 <<O>>  Difference Topic JMakiComboxModel (7 - 21 Feb 2008 - Main.carlavmott)
Line: 1 to 1
 Main data model discussion page

Combobox Data Model

Line: 35 to 35
  obj ::= |
Added:
>
>
JSON schema format is:
[
  {
    "item" : {"label" : {"type": "string"},
         {"value" : {"type": "string"},
         {"selected" : {"type": boolean, "optional" : true}},
         {"action" :
        {"topic": {"type" : "string", "optional" : true}},
        {"message": [{"type" : "string", "optional" : true} |
                             {"type" : "object", "optional" : true}],
            }
  }
]
 

(2.2) Property Descriptions


 <<O>>  Difference Topic JMakiComboxModel (6 - 30 Sep 2007 - Main.gmurray71)
Line: 1 to 1
Deleted:
<
<
-- Main.gmurray71 - 12 Jul 2007
 Main data model discussion page

Combobox Data Model

Line: 24 to 22
 

(2) Data Model

Deleted:
<
<
I
 
Added:
>
>
The value of a given combobox passed as the value property or via a service property must adhere to the following format.
 
    combobox ::= "["  {<item>} "]"
Line: 52 to 50
 

(3) Event Handling

Changed:
<
<
Events that trigger a payload to be published are:
>
>
Events are published to the topic assigned to the given widget instance. Events include:

Subscribe Events

event type argument (object literal)
select { value: <itemId>}
setValues { value: <[item]>}

Subscribe events allow you to manipulate a given instance of a widget. The event names are appended to the the subscribe topic name following a "/". For example "setValues" for a dojo.combobox would be "/dojo/combobox/setValues"

  • select - Selects a given item with the provided value.
jmaki.publish("/dojo/combobox/select", {
     targetId : 'foo'}
 });

  • setValues - The payload value passed to the widget is added to the the table and the filters will be applied.

jmaki.publish("/dojo/combobox/setValues", {
     value :
      [
        { label : 'Alabama', value : 'AL'},
        { label : 'California', value : 'CA'},
        { label : 'New York', value : 'NY', selected : true},
        { label : 'Texas', value : 'TX'}              
      ]
 });
 
Changed:
<
<
event type payload
action widget id, topic name, href or message
>
>

Publish Events

 
Added:
>
>
These are the events published to the "publish" topic associated with a widget.
 
Added:
>
>
Event type Payload Event
onSelect {widgetId : uuid , topic : , type : 'onSelect' , targetId : selected_id, value : selected_value} Publshed when a user selects a item.
 
Added:
>
>
-- Main.gmurray71 - 29 Sept 2007
 -

 <<O>>  Difference Topic JMakiComboxModel (5 - 19 Sep 2007 - Main.gmurray71)
Line: 1 to 1
 -- Main.gmurray71 - 12 Jul 2007

Main data model discussion page

Line: 29 to 29
 
    combobox ::= "["  {<item>} "]"
Changed:
<
<
item ::= "{" "label:" , [] [ ] "},"
>
>
item ::= "{" "label:" , [] [ ] [ ] "},"
  selected ::= "selected: false"
Added:
>
>
action ::= "action:" "{" [] "}," topic ::= "topic:" , message ::= "message:" obj ::= |
 

 <<O>>  Difference Topic JMakiComboxModel (4 - 30 Aug 2007 - Main.gmurray71)
Line: 1 to 1
 -- Main.gmurray71 - 12 Jul 2007

Main data model discussion page

Line: 13 to 13
 Below is an example using the Combobox data model. Data passed to the Combobox widgets will be in JSON format as shown here.
[
Changed:
<
<
{name : 'Alabama', label:'Alabama''}, {name: 'California', label:'California'}, {name: 'New York', label:'New York', selected : true}, {name: 'Texas', label:'Texas'}
>
>
{ label : 'Alabama', value : 'AL'}, { label : 'California', value : 'CA'}, { label : 'New York', value : 'NY', selected : true}, { label : 'Texas', value : 'TX'}
  ]
Line: 29 to 29
 
    combobox ::= "["  {<item>} "]"
Changed:
<
<
item ::= "{" "label:" , [] [ ] "},"
>
>
item ::= "{" "label:" , [] [ ] "},"
  selected ::= "selected: false"
Line: 40 to 40
 The label property defines the text that will be displayed for this particular node. This element is required.
Changed:
<
<
The name property indicates the name of the time in the list. If not provided the label is used
>
>
The value is published as the value property of the payload when an item is selected.
 
Changed:
<
<
The selected property if the item is selected. As we can not preven multiple items with selected = true the last one with selected = true wins
>
>
The selected property if the item is selected. As we can not prevent multiple items with selected = true the last one with selected = true wins
 

 <<O>>  Difference Topic JMakiComboxModel (3 - 27 Jul 2007 - Main.gmurray71)
Line: 1 to 1
 -- Main.gmurray71 - 12 Jul 2007

Main data model discussion page


 <<O>>  Difference Topic JMakiComboxModel (2 - 27 Jul 2007 - Main.gmurray71)
Line: 1 to 1
 -- Main.gmurray71 - 12 Jul 2007

Main data model discussion page

Line: 10 to 10
 

(1) Introduction

This wiki page is dedicated to discussing the jMaki Combox

(1.1) Examples

Changed:
<
<
Below is an example using the new menu data model. Data passed to the menu widgets will be in JSON format as shown here.
>
>
Below is an example using the Combobox data model. Data passed to the Combobox widgets will be in JSON format as shown here.
 
[
  {name : 'Alabama', label:'Alabama''},
Line: 36 to 36
 

(2.2) Property Descriptions

Changed:
<
<
The combobox array of items. Each tiem has a label property node.
>
>
The combobox array of items. Each time has a label property node.
 The label property defines the text that will be displayed for this particular node. This element is required.

 <<O>>  Difference Topic JMakiComboxModel (1 - 12 Jul 2007 - Main.gmurray71)
Line: 1 to 1
Added:
>
>
-- Main.gmurray71 - 12 Jul 2007

Main data model discussion page

Combobox Data Model

(1) Introduction

This wiki page is dedicated to discussing the jMaki Combox

(1.1) Examples

Below is an example using the new menu data model. Data passed to the menu widgets will be in JSON format as shown here.
[
  {name : 'Alabama', label:'Alabama''},
  {name: 'California', label:'California'},
  {name: 'New York', label:'New York', selected : true},
  {name: 'Texas', label:'Texas'}              
 ]

An optional selected property allows you to define the selected item.

(2) Data Model

I

    combobox ::= "["  {<item>} "]"
    item ::=  "{" "label:"  <string>, [<name>] [<selected> ]  "},"
    selected ::=  "selected: false"

(2.2) Property Descriptions

The combobox array of items. Each tiem has a label property node.

The label property defines the text that will be displayed for this particular node. This element is required.

The name property indicates the name of the time in the list. If not provided the label is used

The selected property if the item is selected. As we can not preven multiple items with selected = true the last one with selected = true wins

(3) Event Handling

Events that trigger a payload to be published are:

event type payload
action widget id, topic name, href or message

-


Topic JMakiComboxModel . { View | Diffs r12 < r11 < r10 < r9 | More }
 XML java.net RSS