Comparing versions 14 and 15.

BulletList

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 
)

History Key

  • New content
  • Removed content

Recent Versions

Choose two versions to compare, or click the link to view it.

  1. 15. about 1 year by xexamedes
  2. 14. about 1 year by slim
  3. 13. about 1 year by xexamedes
  4. 12. about 1 year by xexamedes
  5. 11. about 1 year by xexamedes
  6. 10. about 1 year by slim
  7. 9. about 1 year by slim
  8. 8. about 1 year by slim
  9. 7. about 1 year by xexamedes
  10. 6. about 1 year by xexamedes
  11. 5. about 1 year by xexamedes
  12. 4. about 1 year by xexamedes
  13. 3. about 1 year by xexamedes
  14. 2. about 1 year by xexamedes
  15. 1. about 1 year by xexamedes