This is also a very nice example of small blueprint with a well-defined domain. It is and endpoint blueprint, meaning it has no output terminals.
Sample Declaration
<div id="bulletlist"
impl="~017F54FD5052D4410dB7A34CB8A523E375"
script="http://localhost/BulletList.js">
<ul>
</ul>
</div>
## Input Terminals
+ list:
+ **accepted message types:**
+ 1) an Array of text items.
+ 2) A single text string
+ 3) An array of objects.
+ 4) A single object
## Output Terminals
+ none
## Properties
+ none
## Demos that use it
+ yahoosearch.html
## How does it work?
Upon initiation, it finds the DOM node where it was defined and
creates an UL element for the list. Upon receiving a message in its input terminal, the onList function checks if
it already wraps a UL element, which is created otherwise.
If the
input message is a
normalsingle text string or
associativean array
andof scrapestext the content accordingly, finally it createsstrings, a LI element
underwill thebe UL listcreated for each
memberitem,
If objects are passed (either singly or in an array) they can be represented as a string or they may have attributes such as
"uri", "name", "description", and "text_content" ( i.e. {"uri" : http://www.maya.com/, "name" : "Item Name", "text_content" : Extra text content", "description":"Description"} )
This is a very typical object structure used by many of the sample infotrons included in the
array.
standard distro.
If the object has just a name, the name will be rendered as an item of the bulleted list, if it also has a uri, then the name will be hyperlinked to it. If there is the text_content attribute, then a ":" will be appended to the list item followed by the string stored in "text_content". If the "text_content" is missing, it will use what is i in"description" instead. ( i.e. Item Name: Extra text content
)