 |
| | -- Main.carlavmott - 06 Jun 2007
Main data model page | | | },
{ label:'Click me for fun!', action:{message: '/fun.jsp'}},
{ label:'Disabled!', disabled:true }, | |
< < | { label:'Sun Microsystems', href: 'http://www.sun.com', action:{topic: '/my/topic',message:'http://www.sun.com'} },
{ label:'Oracle', href: 'http://www.oracle.com', action:{message:'http://www.oracle.com' }} | > > | { label:'Sun Microsystems', href: 'http://www.sun.com',
-
-
-
- action:{topic
- '/my/topic/setInclude', message: { url : 'http://www.sun.com'} } }, { label:'Oracle', href: 'http://www.oracle.com',
- action:{topic
- '/my/topic/setInclude', message: { url : 'http://www.oracle.com'} } }
| | | ]}
| | | The href property indicates that the string following the property is a URL and that navigation should go to that URL. | |
< < | The action property is used to provide the name of the page that is then published on the topic. If this property is present, a click on this node will cause the message to be published on the topic. There must be a listener (most likely a dcontainer) which actually loads the page but that is outside the scope of this model. | > > | The action is the way to override the default event that is published if a menu item is selected. | | | The topic property overrides the publish arg at the tag level for the particular item identified by label. |
| | -- Main.carlavmott - 06 Jun 2007
Main data model page | | | ]}
| |
> > | (2) Data Model
Incorporating the feedback from the team here is the latest rev of the 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.
menuBar ::= "{" {<menu>} "}"
menu ::= "menu:" "[" {<label>} "]"
label ::= "{" "label:" <string>, [<menu> | <href> [<action>] ] [<disabled>] [<style> ] "},"
href ::= "href:" <string> ,
action ::= "action:" "{" [<topic>] <message> "},"
topic ::= "topic:" <string>,
message ::= "message:" <obj>
obj ::= <string> | <JavaScript object literal>
style ::= "style:" "{" < CSS markup> "}"
disabled ::= "disabled: true"
| | | JSON Schema for mat is:
{ | | | "action" : {"type" : "object","optional":true,
-
-
-
-
-
-
-
- "properties"
- {
- "topic"
- {"type" : "string", "optional" : true},
| |
< < | "message": {"type" : "string", "optional" : true} | > > | "message": {"type" : ["string","object"], "optional" : true} | | | }
}
} | | | }
| |
< < | (2) Data Model
Incorporating the feedback from the team here is the latest rev of the 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.
menuBar ::= "{" {<menu>} "}"
menu ::= "menu:" "[" {<label>} "]"
label ::= "{" "label:" <string>, [<menu> | <href> [<action>] ] [<disabled>] [<style> ] "},"
href ::= "href:" <string> ,
action ::= "action:" "{" [<topic>] <message> "},"
topic ::= "topic:" <string>,
message ::= "message:" <obj>
obj ::= <string> | <JavaScript object literal>
style ::= "style:" "{" < CSS markup> "}"
disabled ::= "disabled: true"
| | | (2.2) Property Descriptions |
| | -- Main.carlavmott - 06 Jun 2007
Main data model page | | | ]}
| |
> > | JSON Schema for mat is:
{
"description" : "jMaki Menu",
"type":"object",
"properties": {
"menu" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : {
"id" : {"type": "string", "optional":true,},
"label" : {"type": "string"},
"menu" : {"type" : "object","optional":true,
"properties": {
"id" : {"type": "string", "optional":true,},
"label" : {"type": "string"},
"href" : {"type": "string","optional":true},
"action" : {"type" : "object","optional":true,
"properties": {
"topic": {"type" : "string", "optional" : true},
"message": {"type" : "string", "optional" : true}
}
}
}
},
"href" : {"type": "string","optional":true},
"action" : {"type" : "object","optional":true,
"properties": {
"topic": {"type" : "string", "optional" : true},
"message": {"type" : "string", "optional" : true}
}
}
}
}
}
}
}
| | | (2) Data Model
Incorporating the feedback from the team here is the latest rev of the 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 - 06 Jun 2007
Main data model page | | | (3) Event Handling | |
< < | This still needs alot of work and discussions are happening on the dev alias of the ajax project ajax.dev.java.net. | > > | There is only one event for that model that causes a message to be published to the communication bus. | | | Events that trigger a payload to be published are: | |
< < |
| > > |
| event type | payload contents |
| | |
| onclick | widget id, topic name, href or message |
|
| | -- Main.carlavmott - 06 Jun 2007
Main data model discussion page | | | | |
< < | (2.2) Element Descriptions | > > | (2.2) Property Descriptions | | | | |
< < | The outermost menu element or elements identify the labels of the menu bar. As you will see below, the label element allows nodes to be nested to an arbitrary level. Note that there are no restrictions on the order of subordinate elements. | > > | The outermost menu property or properties identify the labels of the menu bar. As you will see below, the label element allows nodes to be nested to an arbitrary level. Note that there are no restrictions on the order of subordinate properties. | | | | |
< < | The label element defines the text that will be displayed for this particular node. This element is required. | > > | The label property defines the text that will be displayed for this particular node. This property is required. | | | | |
< < | The href element indicates that the string following the element is a URL and that navigation should go to that URL. | > > | The href property indicates that the string following the property is a URL and that navigation should go to that URL. | | | | |
< < | The action element is used to provide the name of the page that is then published on the topic. If this element is present, a click on this node will cause the message to be published on the topic. There must be a listener (most likely a dcontainer) which actually loads the page but that is outside the scope of this model. | > > | The action property is used to provide the name of the page that is then published on the topic. If this property is present, a click on this node will cause the message to be published on the topic. There must be a listener (most likely a dcontainer) which actually loads the page but that is outside the scope of this model. | | | | |
< < | The topic element overrides the publish arg at the tag level for the particular item identified by label. | > > | The topic property overrides the publish arg at the tag level for the particular item identified by label. | | |
(3) Event Handling |
| | -- Main.carlavmott - 06 Jun 2007
Main data model discussion page | | | ] }
]
}, | |
< < | { label:'Click me for fun!', inlcude: '/fun.jsp' }, | > > | { label:'Click me for fun!', action:{message: '/fun.jsp'}}, | | | { label:'Disabled!', disabled:true },
{ label:'Sun Microsystems', href: 'http://www.sun.com', action:{topic: '/my/topic',message:'http://www.sun.com'} },
{ label:'Oracle', href: 'http://www.oracle.com', action:{message:'http://www.oracle.com' }} | | |
menuBar ::= "{" {<menu>} "}"
menu ::= "menu:" "[" {<label>} "]" | |
< < | label ::= "{" "label:" , [ |
|