java.net: Wiki

The Source for Java Technology Collaboration


 <<O>>  Difference Topic JMakiFisheyeModel (14 - 06 Jun 2008 - Main.carlavmott)
Line: 1 to 1
 -- Main.gmurray71 - 23 Jul 2007

Main data model page | jMaki Homepage | jMaki Wiki

Line: 70 to 70
  "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 JMakiFisheyeModel (13 - 30 May 2008 - Main.carlavmott)
Line: 1 to 1
 -- Main.gmurray71 - 23 Jul 2007

Main data model page | jMaki Homepage | jMaki Wiki

Line: 59 to 59
 
{
       "description" : "jMaki Fisheye",
Deleted:
<
<
"type":"object",
"properties"
{ "items" : {
  "type" : "array", "items" : { "type" : "object",
Line: 78 to 75
  } } }
Deleted:
<
<
} }
 

(2.2) Property Descriptions


 <<O>>  Difference Topic JMakiFisheyeModel (12 - 30 May 2008 - Main.carlavmott)
Line: 1 to 1
 -- Main.gmurray71 - 23 Jul 2007

Main data model page | jMaki Homepage | jMaki Wiki

Line: 61 to 61
  "description" : "jMaki Fisheye", "type":"object",
"properties"
{
Added:
>
>
"items" : { "type" : "array", "items" : { "type" : "object", "properties" : { "id" : {"type": "string", "optional":true,},
  "label" : {"type": "string"}, "iconSrc" : {"type": "string"}, "href" : {"type": "string","optional":true},
Changed:
<
<
"action" : {"type" : "object",
>
>
"action" : {"type" : "object","optional":true,
 
"properties"
{
"topic"
{"type" : "string", "optional" : true},
Changed:
<
<
"message": {"type" : "object", "optional" : true}
>
>
"message": {"type" : "string", "optional" : true} } } }
  } } }

 <<O>>  Difference Topic JMakiFisheyeModel (11 - 29 May 2008 - Main.carlavmott)
Line: 1 to 1
 -- Main.gmurray71 - 23 Jul 2007

Main data model page | jMaki Homepage | jMaki Wiki

Line: 57 to 57
 JSON schema format is
Deleted:
<
<
[
  {
Changed:
<
<
"item" : {"menu" : {"type": "string"}, {"label" : {"type": "string"}, {"iconSrc" : {"type": "string"}, {"href" : {"type": "string","optional":true}, {"action" : {"topic": {"type" : "string", "optional" : true}}, {"message": [{"type" : "string", "optional" : true}, {"type" : "object", "optional" : true}}],
>
>
"description" : "jMaki Fisheye", "type":"object",
"properties"
{ "label" : {"type": "string"}, "iconSrc" : {"type": "string"}, "href" : {"type": "string","optional":true}, "action" : {"type" : "object",
"properties"
{
"topic"
{"type" : "string", "optional" : true}, "message": {"type" : "object", "optional" : true} } }
  } }
Deleted:
<
<
]
 

 <<O>>  Difference Topic JMakiFisheyeModel (10 - 28 May 2008 - Main.carlavmott)
Line: 1 to 1
 -- Main.gmurray71 - 23 Jul 2007

Main data model page | jMaki Homepage | jMaki Wiki

Line: 55 to 55
  obj ::= |
Added:
>
>
JSON schema format is
[
  {
    "item" : {"menu" : {"type": "string"},
         {"label" : {"type": "string"},
         {"iconSrc" : {"type": "string"},
         {"href" : {"type": "string","optional":true},
         {"action" :
        {"topic": {"type" : "string", "optional" : true}},
        {"message": [{"type" : "string", "optional" : true},
                             {"type" : "object", "optional" : true}}],
            }
  }
] 

 

(2.2) Property Descriptions


 <<O>>  Difference Topic JMakiFisheyeModel (9 - 15 Aug 2007 - Main.tigerfarm)
Line: 1 to 1
 -- Main.gmurray71 - 23 Jul 2007

Main data model page | jMaki Homepage | jMaki Wiki

Line: 104 to 104
  {iconSrc:'menu1.jpg',label:'Menu1:Greg Murray:Ajax',action:{topic:'/jmaki/dcontainer',message:'menu1.jsp'}}, {iconSrc:'menu2.jpg',label:'Menu2:Carla Mott:Ajax',action:{topic:'/jmaki/dcontainer',message:'menu2.jsp'}}, {iconSrc:'menu3.jpg',label:'Menu3:Stacy David Thurston:href',href:'http://blogs.sun.com/tiger/'},
Changed:
<
<
{iconSrc:'menu4.jpg',label:'Menu4:Rick Evans:glue.js',action:{topic:'/jmaki/glue',message:{id:'rick',href:'menu4.jsp'}}},
>
>
{iconSrc:'menu4.jpg',label:'Menu4:Rick Evans:glue.js',action:{topic:'/jmaki/glue',message:{id:'rick',url:'menu4.jsp'}}},
  {iconSrc:'menu3.jpg',label:'Menu5:Stacy David Thurston:href',href:'http://blogs.sun.com/tiger/'} ]"/>
<-- leftSidebar -->
Line: 123 to 123
 
jmaki.debug = true;
jmaki.subscribe("/jmaki/glue", function(args) {
Changed:
<
<
jmaki.log("fisheye args.targetId="+args.targetId+" args.message.id="+args.message.id+" args.message.href="+args.message.href); jmaki.publish("/jmaki/dcontainer", args.message.href);
>
>
jmaki.log("fisheye args.targetId="+args.targetId+" args.message.id="+args.message.id+" args.message.href="+args.message.url); jmaki.publish("/jmaki/dcontainer", args.message.url);
 });

 <<O>>  Difference Topic JMakiFisheyeModel (8 - 14 Aug 2007 - Main.tigerfarm)
Line: 1 to 1
 -- Main.gmurray71 - 23 Jul 2007
Changed:
<
<
Main data model page
>
>
Main data model page | jMaki Homepage | jMaki Wiki
 

Fisheye Data Model

Line: 46 to 49
  item ::= "menu:" "[" {
Changed:
<
<
action ::= "action:" "{" [] [ ] "},"
>
>
action ::= "action:" "{" [] ] | []"},"
  topic ::= "topic:" , message ::= "message:" obj ::= |
Line: 68 to 71
 

(3) Event Handling

Deleted:
<
<
This still needs alot of work and discussions are happening on the dev alias of the ajax project ajax.dev.java.net.
 Events that trigger a payload to be published are:
Line: 90 to 92
 ]
Added:
>
>

(5) Read Fisheye message values in a JavaScript program.

From the index.jsp:

            <div class="main">
                <div class="leftSidebar">
                    <a:widget name="dojo.fisheye" 
                              args="{ orientation:'vertical'}"
                              value="[ 
                              {iconSrc:'menu1.jpg',label:'Menu1:Greg Murray:Ajax',action:{topic:'/jmaki/dcontainer',message:'menu1.jsp'}},
                              {iconSrc:'menu2.jpg',label:'Menu2:Carla Mott:Ajax',action:{topic:'/jmaki/dcontainer',message:'menu2.jsp'}},
                              {iconSrc:'menu3.jpg',label:'Menu3:Stacy David Thurston:href',href:'http://blogs.sun.com/tiger/'},
                              {iconSrc:'menu4.jpg',label:'Menu4:Rick Evans:glue.js',action:{topic:'/jmaki/glue',message:{id:'rick',href:'menu4.jsp'}}},
                              {iconSrc:'menu3.jpg',label:'Menu5:Stacy David Thurston:href',href:'http://blogs.sun.com/tiger/'}
                              ]"/>
                </div> <!-- leftSidebar -->
                <div class="content" style="height:400px">
                    <h3>Biography Display for Ajax Link</h3>
                    <div  style="margin: 10px 10px 10px 10px">
                        <a:widget name="jmaki.dcontainer"  subscribe="/jmaki/dcontainer" />
                    </div>
                </div> <!-- content -->
            </div> <!-- main -->

In menu4 of the above Fisheye menu, use the following code in glue.js to echo the event values and publish the href to the jMaki dcontainer ("/jmaki/dcontainer").

From the glue.js:

jmaki.debug = true;
jmaki.subscribe("/jmaki/glue", function(args) {
    jmaki.log("fisheye args.targetId="+args.targetId+" args.message.id="+args.message.id+" args.message.href="+args.message.href);
    jmaki.publish("/jmaki/dcontainer", args.message.href);
});

 <<O>>  Difference Topic JMakiFisheyeModel (7 - 08 Aug 2007 - Main.carlavmott)
Line: 1 to 1
 -- Main.gmurray71 - 23 Jul 2007

Main data model page

Line: 61 to 61
 The href property indicates that the string following the property is a URL and that navigation should go to that URL.
Changed:
<
<
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 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. Either topic or message or both must be supplied.
 The topic property overrides the publish arg at the tag level for the particular item identified by label.

 <<O>>  Difference Topic JMakiFisheyeModel (6 - 08 Aug 2007 - Main.carlavmott)
Line: 1 to 1
 -- Main.gmurray71 - 23 Jul 2007

Main data model page

Line: 46 to 46
  item ::= "menu:" "[" {
Changed:
<
<
action ::= "action:" "{" [] "},"
>
>
action ::= "action:" "{" [] [ ] "},"
  topic ::= "topic:" , message ::= "message:" obj ::= |

 <<O>>  Difference Topic JMakiFisheyeModel (5 - 02 Aug 2007 - Main.gmurray71)
Line: 1 to 1
 -- Main.gmurray71 - 23 Jul 2007

Main data model page


 <<O>>  Difference Topic JMakiFisheyeModel (4 - 23 Jul 2007 - Main.gmurray71)
Line: 1 to 1
 -- Main.gmurray71 - 23 Jul 2007

Main data model page

Line: 15 to 15
 

(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.
Changed:
<
<
[
>
>
[
  { 'action': {
'topic'
'/foo',
Line: 37 to 38
 

(2) Data Model

Changed:
<
<
Following is the data model for FishEye? widgets
>
>
Following is the data model for Fisheye widgets
 

 <<O>>  Difference Topic JMakiFisheyeModel (3 - 23 Jul 2007 - Main.gmurray71)
Line: 1 to 1
Deleted:
<
<
 -- Main.gmurray71 - 23 Jul 2007

Main data model page

Line: 83 to 82
 Here is an example of the old format which will not be supported in jMaki 1.0 and beyond.
Changed:
<
<
items:[
>
>
[
  {iconSrc:'https://ajax.dev.java.net/images/blog_murray.jpg',caption:'You are here!'}, {iconSrc:'https://ajax.dev.java.net/images/chinnici.jpg',caption:'test3'}, {iconSrc:'https://ajax.dev.java.net/images/JayashriVisvanathan.jpg',caption:'test4'}

 <<O>>  Difference Topic JMakiFisheyeModel (2 - 23 Jul 2007 - Main.gmurray71)
Line: 1 to 1
Deleted:
<
<
 -- Main.gmurray71 - 23 Jul 2007
Line: 17 to 16
 

(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.
Changed:
<
<
 [ 
        { label:'Must Read',
            menu: [ 
                { label:'Slashdot', href:'http://www.slashdot.org' },
                { label:'dev.java.net', menu: [ 
                {label : 'jMaki',href: 'http://ajax.dev.java.net'}, 
                {label : 'GlassFish', href: 'http://glassfish.dev.java.net'} 
                ] }
           ]
>
>
[
   {
        'action': {
            'topic': '/foo',
            'message': 'item 1'
  },
Changed:
<
<
{ 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' }}
>
>
'iconSrc': 'https://ajax.dev.java.net/images/blog_murray.jpg', 'label': 'You are here!' }, { 'iconSrc': 'https://ajax.dev.java.net/images/chinnici.jpg', 'label': 'test3' }, { 'iconSrc': 'https://ajax.dev.java.net/images/JayashriVisvanathan.jpg', 'href': 'http://jmaki.com', 'label': 'test4' }
  ]

(2) Data Model

Changed:
<
<
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.
>
>
Following is the data model for FishEye? widgets
 
Changed:
<
<
fishEye ::= "{" {} "}"
>
>
fishEye ::= "[" {} "]"
  item ::= "menu:" "[" {
Changed:
<
<
label ::= "{" "label:" , [ | [] ] [] [