 |
|
< < | Main data model discussion page
jMaki Tabbed View Data Model
(1) Introduction
This wiki page is dedicated to discussing the jMaki tabbed view data model. This data model will be used for all tabbed view widgets in jMaki regardless
of the underlying toolkit. It is expected that not all toolkits will support all features in the data model however each tabbed view should support
most of the features. The motivation for specifying a data model for all tabbed views is to enable users to move between toolkits more easily and to
provide a standard way of represent the data required by the widgets.
(1.2) Examples
Below is an example using the new tabbed view data model.
{ items :[
{label: 'My Tab', content : 'Some Content', id: 'tab1', selected: true}},
{label: 'My Tab 2', content : '', action:{topic: '/mytopic', message : { value : 'data.jsp'} }},
{label: 'My Tab 3', include: 'tab3.jsp', lazyload: true}
]
}
(2) Data Model
We wanted to
add an action property which allows users to specify the message to publish and the topic to publish to.
If no topic is specified then the default topic is used. We want the message to be a string or JavaScript
object literal and this may need additional specification. Also we want to be able to specify CSS which
is passed through to the underlying widget.
items ::= "{" {<label> } "}"
label ::= "{" "label:" <string>, [<content> | <include> |<action> ] [<lazyload>] [<id>] <selected> [<iframe>] "},"
selected ::= "selected:" "true" | "false" (default is false)
include ::= "include:" <string> ,
lazyload ::= "lazyLoad:" "true" | "false",
iframe ::= "iframe:" "true" | "false",
id ::= "id:" <string> ,
content ::= "content:" <string>,
action ::= "action:" "{" [<topic>] <message> "},"
topic ::= "topic:" <string>,
message ::= "message:" <obj>
obj ::= <string> | <JavaScript object literal>
JSON Schema format:
{
"description" : "jMaki TabbedMenu",
"type":"object",
"properties": {
"items" : {
"type" : "array",
"properties" : {
"id" : {"type": "string", "optional":true},
"label" : {"type": "string"},
"content" : {"type": "string","optional":true},
"include" : {"type": "string","optional":true},
"selected" : {"type": "boolean","optional":true, "default":false},
"lazyload" : {"type": "boolean","optional":true, "default":false},
"iframe" : {"type": "boolean","optional":true, "default":false},
"action" : {"type" : "object","optional":true,
"properties": {
"topic": {"type" : "string", "optional" : true},
"message": {"type" : "string", "optional" : true}
}
}
}
}
}
}
(2.2) Property Descriptions
items is the outermost property of the data structure.
label is the property which identifies a particular tab, It is required and there may be more than one.
selected if set to true then this tab is displayed when the widget is rendered. If more than one label has the selected property set to true then the last one set wins.
iframe if set to true then the content is loaded into an iframe. iframes are needed by some things like google and yahoo maps.
lazyLoad if set to true then the content is loaded when the pane is selected.
content describes the static content which will be displayed in the tab when the widget is rendered. It indicates that the static content is included inline.
id identifier for the tab. If not provided, it is autogenerated and is used in the payload to identify the tab which had an event. This project can also be used to specify which tab to perform an event on.
include the string following this property is the page that should be loaded in the tab. This is done behind the scenes using the dcontainer.
action is the way to override the default events that are fired if no action is specified.
(3.0) Events
Several events are fired in the tab model. The table below describes the default events and payload published with each event.
(3.1) Publish Events
| Event | Payload | Event |
| onSelect | widget id, topic name, type : 'onSelect' , targetId (selected tab), message if it exists | Publsihed when a tab is selected |
(3.1) Subscribe Events
| Event | Payload |
| select | targetId (tab id to select) |
| setContent | targetId (tab id to select), value (content including markup to put in the tab) |
| setInclude | targetId (tab id to select), value (URL to be included) |
Examples:
Set the content of a tab.
jmaki.publish("/yahoo/tabbedview/setContent", {targetId : 'foo', value : 'New content'});
Set the include URL of a tab.
jmaki.publish("/yahoo/tabbedview/setInclude", {targetId : 'foo', value : 'bar.jsp'});
Select a given tab.
jmaki.publish("/yahoo/tabbedview/select", {targetId : 'foo'});
(4.0) Background and History
The Tabbed view widgets support the following format as of release .9. This model lacks some features such as lazyloading, ability to publish events that may be useful for others to consume and the ability to select the tab which should be open when the widget is rendered.
{
'tabs' :[
{'label' :'My Tab', 'content' : 'Some Content', },
{'label' :'My Tab 2', 'url' : 'tab1.jsp'}
]
}
-- Main.carlavmott - 01 Aug 2007 | > > | The model is now described as part of the
jMaki Multi View Data Model discussion. |
| | Main data model discussion page | | | obj ::= |
| |
> > | JSON Schema format: | | | | |
> > |
{
"description" : "jMaki TabbedMenu",
"type":"object",
"properties": {
"items" : {
"type" : "array",
"properties" : {
"id" : {"type": "string", "optional":true},
"label" : {"type": "string"},
"content" : {"type": "string","optional":true},
"include" : {"type": "string","optional":true},
"selected" : {"type": "boolean","optional":true, "default":false},
"lazyload" : {"type": "boolean","optional":true, "default":false},
"iframe" : {"type": "boolean","optional":true, "default":false},
"action" : {"type" : "object","optional":true,
"properties": {
"topic": {"type" : "string", "optional" : true},
"message": {"type" : "string", "optional" : true}
}
}
}
}
}
}
| | | (2.2) Property Descriptions |
| | Main data model discussion page | | |
items ::= "{" {<label> } "}" | |
< < | label ::= "{" "label:" , [ | | ] [] [] "},"
selected ::= "selected:" "true" | "false" | > > | label ::= "{" "label:" , [ | | ] [] [] [ | | | include ::= "include:" , | |
< < | lazyload ::= "lazyload:" "true" | "false", | > > | lazyload ::= "lazyLoad:" "true" | "false",
iframe ::= "iframe:" "true" | "false", | | | id ::= "id:" ,
content ::= "content:" ,
action ::= "action:" "{" [] "}," | | | selected if set to true then this tab is displayed when the widget is rendered. If more than one label has the selected property set to true then the last one set wins. | |
> > | iframe if set to true then the content is loaded into an iframe. iframes are needed by some things like google and yahoo maps.
lazyLoad if set to true then the content is loaded when the pane is selected. | | | content describes the static content which will be displayed in the tab when the widget is rendered. It indicates that the static content is included inline.
id identifier for the tab. If not provided, it is autogenerated and is used in the payload to identify the tab which had an event. This project can also be used to specify which tab to perform an event on. |
| | Main data model discussion page | | | | |
< < | { tabs :[
{label: 'My Tab', content : 'Some Content', tabid: 'tab1', selected: true}}, | > > | { items :[
{label: 'My Tab', content : 'Some Content', id: 'tab1', selected: true}}, | | | {label: 'My Tab 2', content : '', action:{topic: '/mytopic', message : { value : 'data.jsp'} }},
{label: 'My Tab 3', include: 'tab3.jsp', lazyload: true}
] | | | | |
< < | tabs ::= "{" { | > > | items ::= "{" { | | | selected ::= "selected:" "true" | "false"
include ::= "include:" ,
lazyload ::= "lazyload:" "true" | "false", | |
< < | tabId ::= "tabId:" , | > > | id ::= "id:" , | | | content ::= "content:" ,
action ::= "action:" "{" [] "},"
topic ::= "topic:" , | | | (2.2) Property Descriptions | |
< < | tabs is the outermost property of the data structure. | > > | items is the outermost property of the data structure. | | | label is the property which identifies a particular tab, It is required and there may be more than one. | | | content describes the static content which will be displayed in the tab when the widget is rendered. It indicates that the static content is included inline. | |
< < | tabId identifier for the tab. If not provided, it is autogenerated and is used in the payload to identify the tab which had an action. | > > | id identifier for the tab. If not provided, it is autogenerated and is used in the payload to identify the tab which had an event. This project can also be used to specify which tab to perform an event on. | | | include the string following this property is the page that should be loaded in the tab. This is done behind the scenes using the dcontainer. |
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | | Select a given tab. | |
< < | jmaki.publish("/yahoo/tabbedview/selectTab", {targetId : 'foo'}); | > > | jmaki.publish("/yahoo/tabbedview/select", {targetId : 'foo'}); | | |
(4.0) Background and History |
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | |
{ tabs :[ | |
< < | {label: 'My Tab', content : 'Some Content', tabid: "tab1", selected: 'true'}}, | > > | {label: 'My Tab', content : 'Some Content', tabid: 'tab1', selected: true}}, | | | {label: 'My Tab 2', content : ' ', action:{topic: '/mytopic', message : { value : 'data.jsp'} }},
{label: 'My Tab 3', include: 'tab3.jsp', lazyload: true}
] |
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | | | |
< < | { 'tabs :[ | > > | { tabs :[ | | | {label: 'My Tab', content : 'Some Content', tabid: "tab1", selected: 'true'}}, | |
< < | {label: 'My Tab 2', content : ' ', action:{topic: '/mytopic', message: 'data.jsp'}},
{label: 'My Tab 3', include: 'tab3.jsp', lazyload: 'true'} | > > | {label: 'My Tab 2', content : ' ', action:{topic: '/mytopic', message : { value : 'data.jsp'} }},
{label: 'My Tab 3', include: 'tab3.jsp', lazyload: true} | | | ]
}
|
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | |
| setContent | targetId (tab id to select), value (content including markup to put in the tab) |
| setInclude | targetId (tab id to select), value (URL to be included) |
| |
> > | Examples:
Set the content of a tab.
jmaki.publish("/yahoo/tabbedview/setContent", {targetId : 'foo', value : 'New content'});
Set the include URL of a tab.
jmaki.publish("/yahoo/tabbedview/setInclude", {targetId : 'foo', value : 'bar.jsp'});
Select a given tab.
jmaki.publish("/yahoo/tabbedview/selectTab", {targetId : 'foo'});
| | | (4.0) Background and History
The Tabbed view widgets support the following format as of release .9. This model lacks some features such as lazyloading, ability to publish events that may be useful for others to consume and the ability to select the tab which should be open when the widget is rendered. |
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | | Several events are fired in the tab model. The table below describes the default events and payload published with each event. | |
> > | (3.1) Publish Events
| Event | Payload | Event |
| onSelect | widget id, topic name, type : 'onSelect' , targetId (selected tab), message if it exists | Publsihed when a tab is selected |
(3.1) Subscribe Events | | |
| |
< < |
| onClick | widget id, topic name, tagid, message if it exists |
| onLoad | widget id, topic name, tagid, message if it exists |
| onLoadComplete | widget id, topic name, tagid, message if it exists |
| onSelect | widget id, topic name, tagid, message if it exists |
| > > |
| select | targetId (tab id to select) |
| setContent | targetId (tab id to select), value (content including markup to put in the tab) |
| setInclude | targetId (tab id to select), value (URL to be included) |
| | | (4.0) Background and History
The Tabbed view widgets support the following format as of release .9. This model lacks some features such as lazyloading, ability to publish events that may be useful for others to consume and the ability to select the tab which should be open when the widget is rendered. |
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | | content describes the static content which will be displayed in the tab when the widget is rendered. It indicates that the static content is included inline. | |
< < | tabid identifies the tab. If not provided, it is autogenerated and is used to in the payload to identify the tab which had an action. | > > | tabId identifier for the tab. If not provided, it is autogenerated and is used in the payload to identify the tab which had an action. | | | include the string following this property is the page that should be loaded in the tab. This is done behind the scenes using the dcontainer. |
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | |
tabs ::= "{" {<label> } "}" | |
< < | label ::= "{" "label:" , [ | | ] [] [] "},"
selected ::= "selected:" "true" | "false" (default is false) | > > | label ::= "{" "label:" , [ | | ] [] [] "},"
selected ::= "selected:" "true" | "false" | | | include ::= "include:" ,
lazyload ::= "lazyload:" "true" | "false", | |
< < | tabid ::= "tabid:" , | > > | tabId ::= "tabId:" , | | | content ::= "content:" ,
action ::= "action:" "{" [] "},"
topic ::= "topic:" , |
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | | | |
< < | (2.2) Element Descriptions | > > | (2.2) Property Descriptions | | | | |
< < | tabs is the outermost element of the data structure. | > > | tabs is the outermost property of the data structure. | | | | |
< < | label is the element which identifies a particular tab, It is required and there may be more than one. | > > | label is the property which identifies a particular tab, It is required and there may be more than one. | | | | |
< < | selected if set to true then this tab is displayed when the widget is rendered. If more than one tab or label have selected set to true then the last one set wins. | > > | selected if set to true then this tab is displayed when the widget is rendered. If more than one label has the selected property set to true then the last one set wins. | | | content describes the static content which will be displayed in the tab when the widget is rendered. It indicates that the static content is included inline.
tabid identifies the tab. If not provided, it is autogenerated and is used to in the payload to identify the tab which had an action. | |
< < | include is the page that should be loaded in the tab. | > > | include the string following this property is the page that should be loaded in the tab. This is done behind the scenes using the dcontainer. | | | action is the way to override the default events that are fired if no action is specified. |
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | | (1.2) Examples
Below is an example using the new tabbed view data model. | |
< < | The Tabbed view widgets support the following format as of release .9 | | |
{ 'tabs :[ | | | }
| |
< < | Need to add the property selected which indicates which tab should be open when the widgets is rendered. | | | (2) Data Model
We wanted to
add an action property which allows users to specify the message to publish and the topic to publish to. |
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | | action is the way to override the default events that are fired if no action is specified. | |
< < | __+++(3.0) Events | > > | (3.0) Events | | | Several events are fired in the tab model. The table below describes the default events and payload published with each event. | |
< < | |Event | Payload
|onClick | widget id, topic name, tagid, message if it exists
|onLoad| widget id, topic name, tagid, message if it exists
|onLoadComplete | widget id, topic name, tagid, message if it exists
|onSelect | widget id, topic name, tagid, message if it exists | > > |
| Event | Payload |
| onClick | widget id, topic name, tagid, message if it exists |
| onLoad | widget id, topic name, tagid, message if it exists |
| onLoadComplete | widget id, topic name, tagid, message if it exists |
| onSelect | widget id, topic name, tagid, message if it exists |
| | | (4.0) Background and History
The Tabbed view widgets support the following format as of release .9. This model lacks some features such as lazyloading, ability to publish events that may be useful for others to consume and the ability to select the tab which should be open when the widget is rendered. |
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | | content describes the static content which will be displayed in the tab when the widget is rendered. It indicates that the static content is included inline. | |
< < | tabid identifies the tab. It not provided it is autogenerated and is used to in the payload to identify the tab which had an action. | > > | tabid identifies the tab. If not provided, it is autogenerated and is used to in the payload to identify the tab which had an action. | | | include is the page that should be loaded in the tab.
action is the way to override the default events that are fired if no action is specified. | |
> > | __+++(3.0) Events
Several events are fired in the tab model. The table below describes the default events and payload published with each event.
|Event | Payload
|onClick | widget id, topic name, tagid, message if it exists
|onLoad| widget id, topic name, tagid, message if it exists
|onLoadComplete | widget id, topic name, tagid, message if it exists
|onSelect | widget id, topic name, tagid, message if it exists | | | (4.0) Background and History
The Tabbed view widgets support the following format as of release .9. This model lacks some features such as lazyloading, ability to publish events that may be useful for others to consume and the ability to select the tab which should be open when the widget is rendered. |
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | | (2.2) Element Descriptions | |
< < | tab is the outermost element of the data structure. | > > | tabs is the outermost element of the data structure. | | | label is the element which identifies a particular tab, It is required and there may be more than one. | |
> > | selected if set to true then this tab is displayed when the widget is rendered. If more than one tab or label have selected set to true then the last one set wins. | | | content describes the static content which will be displayed in the tab when the widget is rendered. It indicates that the static content is included inline. | |
> > | tabid identifies the tab. It not provided it is autogenerated and is used to in the payload to identify the tab which had an action.
include is the page that should be loaded in the tab.
action is the way to override the default events that are fired if no action is specified. | | | (4.0) Background and History
The Tabbed view widgets support the following format as of release .9. This model lacks some features such as lazyloading, ability to publish events that may be useful for others to consume and the ability to select the tab which should be open when the widget is rendered. |
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | | The Tabbed view widgets support the following format as of release .9 | |
< < | { 'abs :[
{label: 'My Tab', content : 'Some Content', tabid: "tab1"}}, | > > | { 'tabs :[
{label: 'My Tab', content : 'Some Content', tabid: "tab1", selected: 'true'}}, | | | {label: 'My Tab 2', content : ' ', action:{topic: '/mytopic', message: 'data.jsp'}},
{label: 'My Tab 3', include: 'tab3.jsp', lazyload: 'true'}
] | | | | |
< < | tabs ::= "{" { | > > | tabs ::= "{" { | | | selected ::= "selected:" "true" | "false" (default is false)
include ::= "include:" ,
lazyload ::= "lazyload:" "true" | "false", |
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | |
{ 'abs :[ | |
< < | {label: 'My Tab', content : 'Some Content', action:{topic: '/mytopic', message: 'data.jsp'}},
{label: 'My Tab 2', include: 'tab1.jsp', lazyload: 'true'} | > > | {label: 'My Tab', content : 'Some Content', tabid: "tab1"}},
{label: 'My Tab 2', content : ' ', action:{topic: '/mytopic', message: 'data.jsp'}},
{label: 'My Tab 3', include: 'tab3.jsp', lazyload: 'true'} | | | ]
}
|
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | | The Tabbed view widgets support the following format as of release .9 | |
< < | { 'tabs' :[
{'label' :'My Tab', 'content' : 'Some Content', action:{topic: '/mytopic', message: 'data.jsp'}},
{'label' :'My Tab 2', 'include' : 'tab1.jsp', lazyload: 'true'} | > > | { 'abs :[
{label: 'My Tab', content : 'Some Content', action:{topic: '/mytopic', message: 'data.jsp'}},
{label: 'My Tab 2', include: 'tab1.jsp', lazyload: 'true'} | | | ]
}
|
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | |
{ 'tabs' :[
{'label' :'My Tab', 'content' : 'Some Content', action:{topic: '/mytopic', message: 'data.jsp'}}, | |
< < | {'label' :'My Tab 2', 'url' : 'tab1.jsp', lazyload: 'true'} | > > | {'label' :'My Tab 2', 'include' : 'tab1.jsp', lazyload: 'true'} | | | ]
}
|
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | |
tabs ::= "{" {<label> <selected>} "}" | |
< < | label ::= "{" "label:" , [ | | ] [] "}," | > > | label ::= "{" "label:" , [ | | ] [] []"}," | | | selected ::= "selected:" "true" | "false" (default is false) | |
< < | url ::= "url:" , | > > | include ::= "include:" , | | | lazyload ::= "lazyload:" "true" | "false", | |
> > | tabid ::= "tabid:" , | | | content ::= "content:" ,
action ::= "action:" "{" [] "},"
topic ::= "topic:" , |
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | | | |
< < | tabs ::= "{" { | > > | tabs ::= "{" { | | | label ::= "{" "label:" , [ | | ] [] "}," | |
< < | select ::= "selectIndex:" | > > | selected ::= "selected:" "true" | "false" (default is false) | | | url ::= "url:" ,
lazyload ::= "lazyload:" "true" | "false",
content ::= "content:" , |
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | |
tabs ::= "{" {<label> [<select>]} "}" | |
< < | label ::= "{" "label:" , [ | ] [ ] [] "}," | > > | label ::= "{" "label:" , [ | | ] [] "}," | | | select ::= "selectIndex:"
url ::= "url:" ,
lazyload ::= "lazyload:" "true" | "false", | | | (2.2) Element Descriptions | |
> > | tab is the outermost element of the data structure.
label is the element which identifies a particular tab, It is required and there may be more than one.
content describes the static content which will be displayed in the tab when the widget is rendered. It indicates that the static content is included inline. | | | (4.0) Background and History
The Tabbed view widgets support the following format as of release .9. This model lacks some features such as lazyloading, ability to publish events that may be useful for others to consume and the ability to select the tab which should be open when the widget is rendered. |
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | | The Tabbed view widgets support the following format as of release .9 | |
< < | {
'tabs' :[ | > > | { 'tabs' :[ | | | {'label' :'My Tab', 'content' : 'Some Content', action:{topic: '/mytopic', message: 'data.jsp'}},
{'label' :'My Tab 2', 'url' : 'tab1.jsp', lazyload: 'true'}
] |
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | | most of the features. The motivation for specifying a data model for all tabbed views is to enable users to move between toolkits more easily and to
provide a standard way of represent the data required by the widgets. | |
< < | (1.1) Background
TBD. | | | (1.2) Examples
Below is an example using the new tabbed view data model. |
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | | (2.2) Element Descriptions | |
> > | (4.0) Background and History
The Tabbed view widgets support the following format as of release .9. This model lacks some features such as lazyloading, ability to publish events that may be useful for others to consume and the ability to select the tab which should be open when the widget is rendered.
{
'tabs' :[
{'label' :'My Tab', 'content' : 'Some Content', },
{'label' :'My Tab 2', 'url' : 'tab1.jsp'}
]
}
|
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | | }
| |
< < | Need to add 2 more properties, selected. | > > | Need to add the property selected which indicates which tab should be open when the widgets is rendered. | | | (2) Data Model
We wanted to |
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | | | |
< < | tabs ::= "{" { | > > | tabs ::= "{" { | | | label ::= "{" "label:" , [ | ] [ ] [] "}," | |
< < | selected ::= "selectedIndex:" | > > | select ::= "selectIndex:" | | | url ::= "url:" ,
lazyload ::= "lazyload:" "true" | "false",
content ::= "content:" , |
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | | | |
< < | tabs ::= "{" { | > > | tabs ::= "{" { | | | label ::= "{" "label:" , [ | ] [ ] [] "}," | |
> > | selected ::= "selectedIndex:" | | | url ::= "url:" ,
lazyload ::= "lazyload:" "true" | "false",
content ::= "content:" , |
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | |
tabs ::= "{" {<label>} "}" | |
< < | label ::= "{" "label:" , [ | | ] "}," | > > | label ::= "{" "label:" , [ | ] [ ] [] "}," | | | url ::= "url:" , | |
> > | lazyload ::= "lazyload:" "true" | "false", | | | content ::= "content:" ,
action ::= "action:" "{" [] "},"
topic ::= "topic:" , |
| | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | | {
'tabs' :[
{'label' :'My Tab', 'content' : 'Some Content', action:{topic: '/mytopic', message: 'data.jsp'}}, | |
< < | {'label' :'My Tab 2', 'url' : 'tab1.jsp'} | > > | {'label' :'My Tab 2', 'url' : 'tab1.jsp', lazyload: 'true'} | | | ]
}
| |
> > | Need to add 2 more properties, selected. | | | (2) Data Model
We wanted to |
|
< < | | | | -- Main.carlavmott - 08 Jun 2007
Main data model discussion page | | |
{
'tabs' :[ | |
< < | {'label' :'My Tab', 'content' : 'Some Content'}, | > > | {'label' :'My Tab', 'content' : 'Some Content', action:{topic: '/mytopic', message: 'data.jsp'}}, | | | {'label' :'My Tab 2', 'url' : 'tab1.jsp'}
]
} |
|
< < | | | | -- Main.carlavmott - 08 Jun 2007 | |
< < | jMaki Tabbed View Data Model | > > | Main data model discussion page
jMaki Tabbed View Data Model
| | | | |
> > | (1) Introduction
This wiki page is dedicated to discussing the jMaki tabbed view data model. This data model will be used for all tabbed view widgets in jMaki regardless
of the underlying toolkit. It is expected that not all toolkits will support all features in the data model however each tabbed view should support
most of the features. The motivation for specifying a data model for all tabbed views is to enable users to move between toolkits more easily and to
provide a standard way of represent the data required by the widgets.
(1.1) Background
TBD.
(1.2) Examples
Below is an example using the new tabbed view data model. | | | The Tabbed view widgets support the following format as of release .9 | | | }
| |
> > | (2) Data Model
We wanted to
add an action property which allows users to specify the message to publish and the topic to publish to.
If no topic is specified then the default topic is used. We want the message to be a string or JavaScript
object literal and this may need additional specification. Also we want to be able to specify CSS which
is passed through to the underlying widget.
tabs ::= "{" {<label>} "}"
label ::= "{" "label:" <string>, [<content> | <url> | <action> ] "},"
url ::= "url:" <string> ,
content ::= "content:" <string>,
action ::= "action:" "{" [<topic>] <message> "},"
topic ::= "topic:" <string>,
message ::= "message:" <obj>
obj ::= <string> | <JavaScript object literal>
(2.2) Element Descriptions |
|
> > |
-- Main.carlavmott - 08 Jun 2007
jMaki Tabbed View Data Model
The Tabbed view widgets support the following format as of release .9
{
'tabs' :[
{'label' :'My Tab', 'content' : 'Some Content'},
{'label' :'My Tab 2', 'url' : 'tab1.jsp'}
]
}
|
|