java.net: Wiki

The Source for Java Technology Collaboration


 <<O>>  Difference Topic JMakiDrawerDataModel (6 - 06 Jun 2008 - Main.carlavmott)
Line: 1 to 1
 
META TOPICPARENT name="JMakiDataModels"
Main data model discussion page
Line: 60 to 60
  "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 JMakiDrawerDataModel (5 - 30 May 2008 - Main.carlavmott)
Line: 1 to 1
 
META TOPICPARENT name="JMakiDataModels"
Main data model discussion page
Line: 43 to 43
  obj ::= |
Added:
>
>
JSON Schema format:
 
Added:
>
>
{
       "description" : "jMaki Drawer",
         "type":"object",
         "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},
                  "expanded" : {"type": "boolean","optional":true, "default":true},
                  "action" :  {"type" : "object","optional":true,
                        "properties": {
                           "topic": {"type" : "string", "optional" : true},
                            "message": {"type" : "string", "optional" : true}                            
                            }
                   }
               }               
  }
 

(2.2) Property Descriptions


 <<O>>  Difference Topic JMakiDrawerDataModel (4 - 03 Aug 2007 - Main.carlavmott)
Line: 1 to 1
 
META TOPICPARENT name="JMakiDataModels"
Main data model discussion page
Line: 16 to 16
 
<a:widget name="dojo.drawer" 
          value=" { label : 'Drawer',
Changed:
<
<
content : 'Static Drwawer Content',
>
>
content : 'Static Drawer Content',
  expanded : true, action: { topic : '/jmaki/doSomething',

 <<O>>  Difference Topic JMakiDrawerDataModel (3 - 02 Aug 2007 - Main.gmurray71)
Line: 1 to 1
 
META TOPICPARENT name="JMakiDataModels"
Main data model discussion page

 <<O>>  Difference Topic JMakiDrawerDataModel (2 - 02 Aug 2007 - Main.gmurray71)
Line: 1 to 1
 
META TOPICPARENT name="JMakiDataModels"
Deleted:
<
<
 Main data model discussion page

jMaki Drawer Data Model

Line: 33 to 32
 
Changed:
<
<
label ::= "{" "label:" , [ | | ] [] [] "},"
>
>
label ::= "{" "label:" , [ | | ] [] "},"
  expanded ::= "expanded:" "true" | "false" (default is true) include ::= "include:" , lazyload ::= "lazyload:" "true" | "false",
Line: 50 to 49
 label is the property which identifies a particular tab, It is required and there may be more than one.
Changed:
<
<
expanded if set to true then this row is displayed when the widget is rendered. If more than one row or label have selected set to true then the last one set wins.
>
>
expanded if set to true then this row is displayed when the widget is rendered.
 content describes the static content which will be displayed in the row when the widget is rendered. It indicates that the static content is included inline.
Changed:
<
<
include is the page that should be loaded in the row.
>
>
include is the page that should be loaded in the pane
 action is the way to override the default events that are fired if no action is specified.

(3.0) Events

Changed:
<
<
Several events are fired in the accordion model. The table below describes the default events and payload published with each event.
>
>
Several events are fired in the model. The table below describes the default events and payload published with each event.
 

(3.1) Publish Events


 <<O>>  Difference Topic JMakiDrawerDataModel (1 - 01 Aug 2007 - Main.gmurray71)
Line: 1 to 1
Added:
>
>
META TOPICPARENT name="JMakiDataModels"

Main data model discussion page

jMaki Drawer Data Model

(1.0) Introduction

A drawer is a container widget that allows you to expand or collapse the widget. The widget follows the general dynamic container model which allows you to set the content or URL to include as the content even after you load the widget.

(1.1) Example

Here is a sample:

<a:widget name="dojo.drawer" 
          value=" { label : 'Drawer',
          content : 'Static Drwawer Content',
          expanded : true,
          action: 
                { topic : '/jmaki/doSomething',
                  message : { targetId : 'foo', value : 'gregge'}
                }
          }"/>

(2.0) Data Model

The model is similar to the previous model with a few added features. 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 that was specified by the publish property on the tag. We want the message to be a string or JavaScript object literal and this may need additional specification.

    label ::=  "{" "label:"  <string>, [<content> | <include> |<action> ]  [<lazyload>]  [<rowid>] <selected>"},"
    expanded ::= "expanded:" "true" | "false"  (default is true)
    include ::= "include:" <string> ,  
    lazyload ::= "lazyload:" "true" | "false",
    content ::= "content:" <string>,
    action ::= "action:" "{" [<topic>] <message>  "},"
    topic ::=  "topic:" <string>,
    message ::= "message:" <obj>
    obj ::= <string> | <JavaScript object literal>

(2.2) Property Descriptions

label is the property which identifies a particular tab, It is required and there may be more than one.

expanded if set to true then this row is displayed when the widget is rendered. If more than one row or label have selected set to true then the last one set wins.

content describes the static content which will be displayed in the row when the widget is rendered. It indicates that the static content is included inline.

include is the page that should be loaded in the row.

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 accordion 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, targetId, message if it exists Published when a user selects an accordion pane.

(3.2) Subscribe Events

Event Payload
collapse  
expand  
setContent value (string which may include markup)
setInclude targetId, value which is a URL to include (same domain)

Examples:

Expand the Pane:

jmaki.publish("/dojo/drawer/expand", { });

Collapse the Pane:

jmaki.publish("/dojo/drawer/collapse", { });

Set the content of a pane:

jmaki.publish("/dojo/drawer/setContent, { value : 'content is king'});

Set the include:

jmaki.publish("/dojo/drawer/setInclude", { value : 'foo3.jsp'});

-- Main.gmurray71 - 01 Aug 2007


Topic JMakiDrawerDataModel . { View | Diffs r6 < r5 < r4 < r3 | More }
 XML java.net RSS