jPoint API

jP note: jP is for jPoint like $ is for jQuery Type Description
jP.Lists Subclass Manipulates lists and list items (retrieve, save, delete)
jP.Form Subclass Manipulates fields on a form (get/set, hide, disable)
jP.Webparts Subclass Manipulates webparts on a page (overwrite script vars)

jP Main Class The base jPoint class has utility functions and helpful variables

jP.Lists close

The main purpose of the Lists class is to support the creation of one or more List objects.  This class is a wrapper for the lists.asmx web service.  The main function is setSPObject(), which acts as a psuedo constructor. This function creates List Item objects that represent SharePoint libraries and lists such Shared Documents and Announcements.

This can best be explained through a simple example.
var myAnnouncements = jP.Lists.setSPObject("http://servername/mysite", "Announcements");
alert(myAnnouncements == jP.Lists["Announcements"] == jP.Lists.ANNOUNCEMENTS);  //all three refer to same object
jP.Lists Type Description
jP.Lists.setSPObject Function / pseudo-Constructor Creates a List object
jP.Lists.{LIST} Subclass List object for creating, reading, updating, and deleting SharePoint list items.
{LISt} represents actual list name in all CAPS.
jP.Lists["{List Name}"] Subclass List object for manipulating SharePoint list items.
This is more safe than jP.Lists.{LIST} reference.
{List Name} represents string of actual list name.
jP.Lists.Items Variable List Item Collection array created from last List operation
jP.Lists.FieldCount Variable Length of Items array created from last List operation

jP.Lists.setSPObject close


Method

jPoint.Lists.setSPObject( SiteURL, ListName )

Overview

Creates a List object. This function acts like the constructor. It needs to be called every time you want to work with a new List.

Arguments

Name Type Optional Description
SiteURL String false SiteURL
ListName String false SharePoint list name

Returns

List object. 
Modifies the current jP and jPoint class object by adding the List to the jP.Lists collection.

Example
var myAnnouncements = jP.Lists.setSPObject("http://servername/mysite", "Announcements");
alert(myAnnouncements == jP.Lists["Announcements"] == jP.Lists.ANNOUNCEMENTS);  //all three refer to same object

jP.Lists.{LIST} close

The List object allows you to manipulate items in a SharePoint list. It is primarily a wrapper for the lists.asmx webservice. This List object is only created after the jP.Lists.setSPObject has been called one or more times. Once setSPObject is called, an Items array is created representing the collection of one or more Lists.

jP.Lists.{LIST} is the easiest way to reference a List object where {LIST} is the name of the list in all CAPS, but using the dot notation will not work when you have a list name with whitespace special characters. Thus, the best way to reference a List is using the array notation, jP.Lists["{List Name}"] where {List Name} is the actual string used to create the list.

jP.Lists.{LIST} Type Description
jP.Lists.{LIST}.getSPItem Function Gets a unique SharePoint list item by ID (int)
jP.Lists.{LIST}.getSPItemsWithQuery Function Gets a set of SharePoint list items by CAML Query
jP.Lists.{LIST}.updateItem Function Updates or adds an item to a SharePoint list
jP.Lists.{LIST}.addItem Function Add a new item to a SharePoint list
jP.Lists.{LIST}.getSPView Function Gets a set of SharePoint list items that have been filtered from a particular view
jP.Lists.{LIST}.getPictures Function Gets a set of SharePoint picture from a picture list view