Want to learn more about the Dojo Toolkit?

Dojo ToolkitSitePen, the primary contributer to Dojo, wrote today about “FREE Top 10 and 100% FREE Dojo FREE Resource List!“. Worth noticing is the last and final one, Dojo QuickStart Guide. A new good tutorial to get up to speed with Dojo.

From SitePen’s blog by Dylan Schiemann:

  1. Dojo API Viewer. A full-featured API documentation tool, generated from source code comments and documentation. Features include simple navigation, complete listings of an object’s fields, clear definitions of a field’s type, clear ancestry paths on a field, function parameters, source and examples.
  2. The Dojo Book. An online culmination of extensive examples and detailed explanations about all things Dojo, authored by dozens of Dojo community members.
  3. The Dojo Forums. A community support resource for your learning and research efforts, without thousands of answers to Dojo questions.
  4. The #dojo IRC channel on irc.freenode.net is the place to chat live with contributors and users of Dojo.
  5. Dojo Campus. An up and coming site that contains a collection of articles and demos about Dojo, as well as a feature-explorer showing off the capabilities of Dojo.
  6. Dojo Community Blogs. Popular Dojo blogs include the official Dojo blog, Planet Dojo, SitePen blog, and Ajaxian’s Dojo category.
  7. Dojo Trac. View open and recently fixed tickets, and easily browse the Dojo source tree using Dojo’s Trac instance. Because of Dojo’s very open nature, every code commit, ticket request, and comment can be viewed through Trac.
  8. Dojo Key Links. A reviewed collection of current and up to date tutorials, demos, and articles about Dojo.
  9. Dojo Presentations. SlideShare hosts a variety of conference slides from recent Dojo presentations.
  10. SitePen’s Dojo QuickStart Guide. This is our brand new, concise, easy-to-follow tutorial for getting up to speed quickly with the Dojo Toolkit.

All these links/tips are great if you want to learn more about the Dojo Toolkit. Enjoy! Smile


Find your Twitter friends’ friends with Twubble

TwubbleI ran across Twubble today. If you like/can’t live without Twitter this is a great tool/website to find your Twitter friends’ friends. It’s written by Bob Lee that works at Google.

If you use Twitter, Twubble can look at your existing friends’ friends and recommend new people for you to follow. It’s a stupid simple idea, but I think the execution and fun factor have won people over.

I wrote Twubble in a couple nights of hacking in bed after the kid went to sleep. I used the latest Google Web Toolkit milestone which supports Java 5 (flawlessly from my experience). I was writing Javascript code (server and client side) for years before I ever got into Java, but I have to say, you’d be crazy to write AJAX apps any other way than GWT nowadays.

Try it out. It’s amazing how many friends you can find by having this tool examining your friends.


Rock, Chalk, Champions

KU JayhawksLast night in a very exciting game, Kansas University Jayhawks won the first NCAA basketball championship in 20 years. They came back to tie the game after being down 9 points with only 2 minutes left of the game. In overtime the Memphis Tigers had no chance of stopping KU from winning with the final score 75-68. Lawrence, KS (only 25 minutes from SNAPPS office) went crazy last night and all classes are canceled at the University today. The fans is expecting the team home today at 3 PM.

Congratulations to the Jayhawks for an unbelievable year and your championship. Now I’m off to watch KC Royals home opener.


Dojo Toolkit 1.1 is released

Dojo ToolkitDojo Toolkit 1.1 was released today with huge improvements. I’ve been testing the beta of 1.1 for some time now and it’s really great.

You can read more details in the Change Log, Release Notes and Porting Guides.
Here are some of the improvements.

  • An easy to use and significantly improved Dojo API Viewer with some seriously great features, including the ability to easily find the original definition of a method that is “mixed-in”
  • A growing collection of demos, tutorials, and articles
  • A new BorderContainer Dijit, which is a much better way to handle layout-based widgets than SplitContainer and LayoutContainer
  • Significant performance improvements to dojo.query and dojo.fx
  • Support for Adobe AIR and Jaxer, and updated dojox.flash and dojox.offline APIs
  • Major improvements to Dijit infrastructure and widgets
  • All around Dijit theme improvements including the CSS structure for themes, refinements to the Tundra theme, re-introduction of the Soria theme, and the newly added Nihilo theme
  • DTL, the Django Template Language, is now available for use in widgets with dojox.dtl
  • Vector graphics animations
  • Additions to DojoX including an analytics package
  • Improvements to Dojo Data and RPC, and support for JSONPath
  • Many improvements to the build system including CSS optimization, multiple-versions of the Dojo Toolkit co-existing in the same document, and other great tools for optimizing performance

On top of these there are over 800 improvements, bug fixes and enhancements. Way to go and a big congratulations to the Dojo Toolkit team. Head over to the site and download now.


Happy Saint Patrick’s Day from a Swede

I saw this video on Bill Buchan’s blog this morning and I liked it because it has the Swedish Chef singing. So a happy St. Patrick’s Day from me and the Muppet show.


LotusScript and JSON, living together

Hi. Troy here. Viktor has been nagging me Wink to write something about the LotusScript JSON classes that I created, so here goes. You can read some background information about the classes here.

First a little history. I originally wrote the JSONReader to support a particular piece of functionality we were putting into one of the templates for Quickr. In that case, an agent was to read JSON and output an Excel spreadsheet. Later, I wrote the JSONWriter class with methods to create JSON text on the fly (with methods such as BeginObject, BeginArray, Key, AppendValue, etc). This still was not completely satisfying. Finally, I added the ToJSON method to the JSONWriter class. This method accepts pretty much any data note (NotesDocument, NotesDocumentCollection, NotesView, NotesViewEntry, NotesViewEntryCollection) and outputs it as a JSON string. The data format is outlined on the download page. One potential use of this is in an agent that is called from a browser. The agent could respond with JSON and the browser could then parse it and process it as needed. If you want a different data format, you can change the private functions DocumentToJSON or EntryToJSON.

I want to share a real world example with you, but first I want to discuss the JSONWriter class a little more. It has several properties that can affect how data is output. If you pass a NotesDocument to JSONWriter, the output will include many properties of the NotesDocument and also all field data including a text representation of rich text. If you don’t want all fields, just pass an array of the fields you do want to the SetFieldsToOutput method. Maybe you only want a digest of the rich text items. In that case you can set the number of characters to output using the TruncateRichText property. There are others as well.

Now on with the show (and some code)! I was working on a QuickPlace (yes, QuickPlace) application where there was a need for a grid of reviewer data with an unknown number of rows (reviewers). I decided to make the data repository a JSON string which was stored in fields on the document. The form took care of parsing the JSON and presenting it for the browser. Without going into too much detail, an agent needed to update the JSON string when a reviewer approved a piece of the form. Enter stage right, JSONReader, JSONWriter, JSONArray, JSONObject.

Here is a simplified example of how the JSON string was defined:

{
“id_0″: {
name: “Project/Task Manager”,
reviewer: “John Doe”,
reviewerDN: “CN=John Doe/O=Acme”,
email: “jdoe@acme.com”,
status: STATUS_DEFAULT,
signature: “”,
completed: “”,
unid: “”
},
“id_1″: {
name: “Quality Assurance”,
reviewer: “Richard Roe”,
reviewerDN: “CN=Richard Roe/O=Acme”,
email: “rroe@acme.com”,
status: STATUS_DEFAULT,
signature: “”,
completed: “”,
unid: “”
}
}

The agent needed to set the status, signature, completed (a date), and the unid of the review document based on the id of the “row”. Here is the relevant code from the agent (p_vParms is a List with input arguments passed to the agent):

Dim jsonReader As JSONReader
Dim jsonObjAll As JSONObject
Dim jsonObjReview As JSONObject

sJSON = docTarget.GetItemValue(“c_ReviewerJSON”)(0)
Set jsonReader = New jsonReader

‘first put the entire JSON into an object
Set jsonObjAll = jsonReader.Parse(sJSON)

‘now get the specific object inside for the particular row we are updating (”Quality Assurance”)
Set jsonObjReview = jsonObjAll.GetItemValue(“id_1″)

‘update the fields in the object
Call jsonObjReview.ReplaceItemValue(“status”, p_vParms(ARG_STATUS))
Call jsonObjReview.ReplaceItemValue(“signature”, p_vParms(ARG_CN))
Call jsonObjReview.ReplaceItemValue(“completed”, Format(Now, “dd-mmm-yyyy”))
Call jsonObjReview.ReplaceItemValue(“unid”, p_vParms(ARG_UNID))

‘put our updated object back into the main object
Call jsonObjAll.ReplaceItemValue(p_vParms(“id_1″), jsonObjReview)

‘convert the object into a JSON string
sJSON = jsonObjAll.ToJSON

‘put the JSON back into the field
Call docTarget.ReplaceItemValue(“c_ReviewerJSON”, sJSON)

You may not realize it, but the JSONWriter class was used in this example. It was the engine behind the ToJSON call on the jsonObjAll object. I didn’t say it before, but the JSONArray and JSONObject classes also have the ToJSON method. This allows “round-tripping” of the JSON string. JSON string comes in, is parsed into LotusScript objects using JSONReader, those objects are modified using the JSONArray or JSONObject methods, and finally the resulting object is converted back to a JSON string using the ToJSON method.

Hopefully this gives you a taste of what can be accomplished using the JSON classes. Now back to your regular programming. Smile


My album cover

As many out there including Adam Gartenberg I have created my own album cover. The instructions are:

  1. Go to Wikipedia’s random article page. The first article you get is the name of your band.
  2. Go to the Random Quotations page. The last four words of the last quote is the album title.
  3. Go to Flickr’s Interesting photo page. Third picture, no matter what it is, is your album cover.
  4. Put it all together to make your album. Either crop it to CD cover size, or just use the raw image itself … the only rule is you’re only allowed to add the album title and artist title.

My random Wikipedia article landed on Battista Dossi, an Italian painter. A great name for a band I think.
My random quote was by L. M. Montgomer, a Canadian novelist that wrote this in 1915:

Anyone who has gumption knows what it is, and anyone who hasn’t can never know what it is. So there is no need of defining it.

My Flickr photo is taken by ©dinamarie originals. A beautiful photo I now have destroyed by adding my band name and album title.

Need of defining it by Battista Dossi

I hope you like it.


Dojo Grid with Domino Views

This is the third posting going more in depth of the code I showed at my Lotusphere session BP212: The Great Code Giveaway: “Beyond Cool”. If you haven’t read the first and second article yet I recommend doing so. You find them by clicking the links. You can download the instructions, code and databases here.

What is a Grid

The Book of Dojo explains it well.

Grids are familiar in the client/server development world. Basically a grid is a kind of mini spreadsheet, commonly used to display details on master-detail forms. From HTML terms, a grid is a “super-table” with its own scrollable viewport.

The domino.view.grid that I showed in my session contains two classes. The domino.view.grid class that extends dojox.grid.Grid and the domino.view.model class that extends the dojox.grid.data.DojoData class. It also uses domino.data.ViewStore for doing the XMLHttpRequest (XHR). I wrote about the domino.data.ViewStore in the previous postings.

Instead of going through 630+ lines of code, I’m going to show how to add it to your pages or forms. First the easy one and we’ll gradually move to more complex examples.
All the examples I’m going to show require you to add a couple of lines of code to your page/form.

In the HTML Head Content you have to add a style sheet, tundraGrid.css, and the dojo.js JavaScript. The tundraGrid.css file contains all the classes needed for the Grid to display properly.

"<style type=\"text/css\">" + @NewLine +
"@import \"/dojo102/dojox/grid/_grid/tundraGrid.css\";" + @NewLine +
"</style>" + @NewLine +
"<script type=\"text/javascript\" src=\"/dojo102/dojo/dojo.js\" djConfig=\"parseOnLoad: true, usePlainJson: true\"></script>"

In the HTML Body Attributes we add a class of tundra.

"class=\"tundra\""

In the JS Header we add the required JavaScript files for the domino.view.grid and the dojo.parser. This is done the very specific Dojo way. It looks like Java but is really JavaScript. Dojo does this really smart by checking if the external JS file is already loaded and available to the browser. If it is not it gets/loads it.

dojo.require("domino.view.grid");
dojo.require("dojo.parser");

All those have to be added in all my examples here. In some of the examples in the download I have added more CSS classes and more JavaScript. In the very basic example this is all we need.

Now let’s add the HTML code to our page/form.

<div dojoType="domino.view.grid" url="sessiongrid1" style="height:600px;"></div>

Simple GridAs you can see (click on thumbnail for larger view) this is a very basic example that just displays a 600 pixel high grid from a view called “sessiongrid1″ in the same database as the page/form. If you would look at the “sessiongrid1″ view you would see that these columns are in the same order and widths. If you have specified that a column is not Resizable than you can’t resize it in the Grid either.

Grid with handleViewDesignIn the next example we add an attribute of handleViewDesign=true. That will also read in font families, sizes, colors, style and justification of both column headers and bodies. It will also read in colors for Alternate rows in the view property. You also see in this example that when Display values as icons is selected on the column, it displays in the Grid. Both numbered and shared Resources work.

<div dojoType="domino.view.grid" url="sessiongrid2" handleViewDesign="true" style="height:600px;"></div>

Structure

A really neat feature of Dojo’s Grid is that you can have multi row headers. That gives us a way of displaying more data in less space, especially when we have columns with a lot of text. Again the Book of Dojo explains it for us.

In standard spreadsheet and table terminology, a cell is the basic unit of displayed data. A row is a horizontally aligned contiguous group of cells, and a column is a vertically aligned contiguous group of cells. (Wow, that makes a simple concept sound complex!)

In grid-land, there’s a distinction between rows and subrows. A subrow is what people normally think of as a row - it’s exactly one cell tall. In Grid, a row may be more than one subrow - but it is selectable as a unit.

A View is a group of contiguous logical rows with the same inner and outer “shape”… You specify this in JavaScript with an array of arrays. Each array element is an object literal. The most important property of the object is “name”, which names the column. The column name always appear as the top logical row of the grid, and unlike other rows, it doesn’t scroll up or down.

<div dojoType="domino.view.grid" url="sessiongrid3" structure="myStructure" style="height:600px;"></div>

As you can see we are using a view called “sessiongrid3″. You can find that view in the “Sessions.nsf” database in the download. In that view we have added a column with the SessionAbstract field. This field contains a lot of text and if we displayed it in the same way as the previous examples we would see only two/three documents and we would have to scroll the grid a lot. But as you can see we have added a new attribute to the div, structure="myStructure". That tells the domino.view.grid class NOT to read in the design of the view and creating the structure dynamically, but instead that we are supplying it to the grid. Below you see the code example from the page “Grid 4″ inside “Sessions.nsf”.

var myViewDesign = {
cells: [
[
{
name:'Session ID',
field:"SessionID",
width:'68px',
sortAsc:true,
sortDesc:true
},
{
name:'Location',
field:"SessLocs",
width:'113px',
sortAsc:true,
sortDesc:true
},
{
name:'Begin',
field:"BeginTime",
width:"96px",
sortAsc:true,
sortDesc:true
},
{
name:'End',
field:"EndTime",
width:"96px",
sortAsc:true,
sortDesc:true
},
{
name:'Session Abstract',
field:"SessionAbstract",
width:'auto',
rowSpan: 2
}
],
[
{
name:'Title',
field:"TITLE",
colSpan: 2
},
{
name:'Speaker',
field:"Speaker",
sortAsc:true,
sortDesc:true,
formatter: withLineBreaks,
colSpan: 2
}
]
]
};
var myStructure = [ myViewDesign ];

Let’s take a look at this code. First we create an object called myViewDesign and in that object we have a property of cells which is an array containing two arrays. Each array represents it’s own row. The first array contains five column objects and the last array two column objects.

Let’s look at the first column object: Session ID. As you can see we have a few properties to this object. The first two are required. The name property is what we want it to say in the column header. The field property is the Programmatic Name of that column specified in the view column with Domino Designer. Width is the default width of the column when first displayed. sortAsc and sortDesc set to true is if we have selected that the column can be sorted ascending, descending or both.

If you look at the Session Abstract column object, you’ll see that we have a width of auto and that we added a property of rowSpan: 2. This column is going to span over 2 rows but also extend to the width of the grid.

Grid with multi row headersThe last two column objects are in their own array. As you can see both have a colSpan property with a value of 2. Just as you can do in a HTML table these two columns will span over two columns each, leaving only the Session Abstract column by itself. It however spans over two rows as mentioned earlier. The last thing we do is to create an array, myStructure (named so as to match the structure attribute on the div HTML tag representing the grid), and set it to our object myViewDesign. You can see the result to the right.

In this posting I have only scratched the surface of what you can do with Grids. If you download the demo databases you will see many more examples including how to open documents by clicking cells or rows. You also see examples of how to use several Grids in conjunction with each other, i.e. click on a user document in the first Grid and display his/hers sessions in the second.

If you read up on Dojo Grids on the Dojo Toolkit website you’ll see that there are many more things we can do with Grids. One is to update document data inline right there in the Grid. This doesn’t work in the domino.view.grid class yet but I’m working on it. We also need an Agent for that to work. This Grid class does not work with categorized views as of yet, but I’m working on that as well. Check back here on my blog for updates.

I hope you enjoyed this demo/tutorial and as always if you have any comments or questions please post them here. Smile


ComboBox & FilteringSelect for Domino

Today we explore two extended form widgets I used in my Lotusphere session BP212: The Great Code Giveaway: “Beyond Cool”. The first article in this series can be found here. You can download the instructions, code and databases here.

domino.form.ComboBox & domino.form.FilteringSelect

These widgets are extended from dijit.form.ComboBox and dijit.form.FilteringSelect to accommodate for the URL syntax that a Domino view requires when doing a view search. They are modern and Ajax based. You can open both by clicking the down arrow but you can also type in the field to narrow down the choices. The important part of these widgets is in the _startSearch function.

if(key != ""){
var sLetters = "abcdefghijklmnopqrstuvwxyz**";
var lastChar = key.substring(key.length-1,key.length);
var sUntilKey = "";
if(isNaN(lastChar)){
var iCharNum = sLetters.indexOf(lastChar);
sUntilKey = key.substring(0,key.length-1) + sLetters.substring(iCharNum+1,iCharNum+2);
}else{
sUntilKey = key.substring(0,key.length-1) + (parseInt(lastChar)+1);
}
query["StartKey"] = key;
query["UntilKey"] = sUntilKey;
}else{
query["StartKey"] = null;
query["UntilKey"] = null;
}

What we do here is creating the URL syntax for a Domino view search that requires the &StartKey= and &UntilKey= arguments to find the document(s) the user is searching for.

From Domino Designer 8 Help:

StartKey=string
Where string is a key to a document in sorted view. The view displays at that document. In cases where there is no match for the StartKey, the next document is returned. So, for example, if the StartKey is “A” and there are no documents that begin with “A”, StartKey returns the first document that begins with “B.”

UntilKey=string
UntilKey is only valid when used with StartKey. It allows you to display the range of view entries beginning with the document specified by StartKey until the document specified by UntilKey. For example, &StartKey=A&UntilKey=B would give you all the entries that start with A. Use the &Count keyword to further limit the number of entries returned within any given range.

How to add to them to your form

Both these widgets are very easy to add to your forms. Both require the domino.data.ViewStore discussed in the previous article so you start by adding that.

<div dojoType="domino.data.ViewStore" jsId="DominoStore" url="../sessions.nsf/sessionlookup"></div>

Here we add a div tag with dojoType of domino.data.ViewStore, we give it a jsId of DominoStore and the url is pointing to a database and view. In this case a database called sessions.nsf parallel to the current database and a view named sessionlookup.

We add a Notes field to our form and make it type Dialog list. In the HTML Attributes of the field we add the following:

"dojoType=\"domino.form.ComboBox\" store=\"DominoStore\" searchAttr=\"IDTitle\" pageSize=\"10\" autoComplete=\"false\""

domino.form.ComboBox field

The store attribute is the same as the jsId attribute of our domino.data.ViewStore above. The pageSize attribute is the number of documents we get/show at a time and the autoComplete attribute is for making the top search value auto complete the field. Try if for yourself by setting it to true.

I left the searchAttr attribute for last because it need some explaining. As you know we are using a store to get the values for the field.

Column Programmatic Use

If we open up the view sessionlookup in the database sessions.nsf in Domino Designer we see that the view has two columns. If you look at the Programmatic Name for the first column you’ll see that it is IDTitle. This column is what we want values from so we set the searchAttr to IDTitle. The value saved by a domino.form.ComboBox is the same as what you see.

The difference between a domino.form.ComboBox field and a domino.form.FilteringSelect field is that the latter has an onChange attribute and that the value of the field is always the identifier of the store it is using. What is an identifier you ask? Well, all data stores has a unique identifier. In some cases that is just an incrementing number starting at zero, but in the domino.data.ViewStore I created I used the NoteID. Why not the UNID? Because a document can actually exist several times in the same view.

So in a domino.form.FilteringSelect field representing all speakers I have the following attributes.

"dojoType=\"domino.form.FilteringSelect\" store=\"SpeakerStore\" searchAttr=\"Name\" pageSize=\"10\" autoComplete=\"false\" onChange=\"setMentor(arguments);\""

You can see this field in the “Mentor Selection” form in the “Mentors.nsf” database. It is part of the download. We now need the setMentor function.

function setMentor(arguments){
var identityRequest = {
identity: arguments[0],
onItem: function(item){
var sEmail = SpeakerStore.getValue(item, "Email");
alert(sEmail);
},
onError: function(){
console.error("Fetch failed.");
}
};
SpeakerStore.fetchItemByIdentity(identityRequest);
}

A version of this function can be found in the “index” page inside the “Registration.nsf” database. In this function we first create an object, identityRequest, and set the property identity to the first value in the passed in arguments array by setting identity: arguments[0]. We also have an onItem property. This is the function we call when we have retrieved a value. onError is being called if an error occurs. In the bottom of the function we do the call to the store and pass in our identityRequest object. SpeakerStore.fetchItemByIdentity(identityRequest); In this case we only alert the email address of the user we selected but if you look at the same function in the “index” page mentioned above you’ll see that we call another function to go get the profile from greenhouse.lotus.com for that email.

If you want to dig deeper in all possible attributes that a ComboBox and a FilteringSelect can change see the dijit.form.ComboBox and the dijit.form.FilteringSelect JavaScript files. Remember that in Dojo the name space is done by the periods you see in the names above. So in the folder dijit you find a folder called form where you’ll find the files ComboBox.js and FilteringSelect.js.

I hope this tutorial together with my code examples will clarify these two widgets for you. If not please comment below and I will try to explain further.


Dojo data for Domino

At Lotusphere in my session BP212: The Great Code Giveaway: “Beyond Cool” I showed a couple of widgets and a Grid based on the Dojo Toolkit. I’m going to show you how I did those in a couple of articles the next few days. Instead of going through the code line for line I’m just going to highlight some of the changed variables and code. All the code for these examples and demos can be found here.

Extending Dojo code

One of the really powerful things you can do with a large toolkit like Dojo is that you can extend a widget/class instead of having to change the underlying code in the toolkit itself. Instead of having to write all the code for your class you just extend an existing class and change the functions/variables you need to. You can also add your own variables and functions. Extending Dojo code is really easy. You create your own JavaScript file and “require” the existing class/widget.

dojo.provide("my.new.Widget");
dojo.require("dijit.widgetToExtend");
dojo.declare("my.new.Widget", dijit.widgetToExtend, {
variablesToChange: "myNewValue",
functionToChange1: function(arg1){
//New code
},
functionToChange2: function(arg1, arg2){
//New code
}
}

In the example above we have extended a widget class called “dijit.widgetToExtend”. You would copy this JavaScript in a file named Widget.js inside a folder structure of “/my/new/” located parallel to the dijit, dojo and dojox folders. There are other places you can put your code but this is the simplest.

Using dojo.data

What is dojo.data?
Dojo.data is a uniform data access layer that removes the concepts of database drivers and unique data formats. All data is represented as an item or as an attribute of an item. With such a representation, data can be accessed in a standard fashion.

Ultimately, the goal of dojo.data is to provide a flexible set of APIs as interfaces that datastores can be written to conform to. Stores that conform to the standard interfaces should then be able to be used in a wide variety of applications, widgets, and so on interchangeably. In essence, the API hides the specific structure of the data, be it in JSON, XML, CSV, or some other data format, and provides one way to access items and attributes of items consistently.

The great thing about dojo.data stores are that they use a predefined way of getting/setting/updating code in the store. Whoever writes code for widgets that use stores does not have care about where the underlying data is located. It could come from a MySQL database, a XML file on the file system or now a Domino view.

domino.data.ViewStore

I’ve added three variables to this class. You see them below with their default value.

parseTypes: false,
dateFormatLength: "short",
handleAsJSON: true,

parseTypes: Parses all view data into it’s correct format. Numbers become floats, dates become locale dates. Locale dates are dates that show up in the format that the current browser language want to show them.
dateFormatLength: If parseType is true, then show the date in this “length”. Can be long, short, medium or full.
handleAsJSON: Default is that all data from the Domino view is returned with JSON using the “&OutputFormat=JSON”. If you set this to false all data is retrieved using XML instead. JSON was not implemented on the Domino server until version 7.0.2 so if you use a server prior to this you need to set this variable to false.

There are five functions I want to mention briefly.

_filterResponse: Used for parsing view data in JSON format to the required format for a store.
_filterXMLResponse: Used for parsing view data in XML format to the required format for a store.
_returnColumnValue: Helper function to get the value for a specific object. Used from _filterResponse.
_returnEntryValue: Helper function to get the value for a specific XML node. Used from _filterXMLResponse.
_returnDateTime: Helper function to format the Domino date string to a dojo.date.locale.

That’s it for this time. Next time we’ll look at domino.form.ComboBox and domino.form.FilteringSelect that both use the domino.data.ViewStore. Happy coding. Smile


Pages (7): [1] 2 3 4 » ... Last »
Close
E-mail It