Speaking at MWLUG 2012 – XPages, jQuery, and Dojo – a new paradigm in Client Side JavaScript

I am really excited that my abstract was accepted for MWLUG 2012

http://www.mwlug.com/mwlug/mwlug12.nsf/Sessions.xsp

AD111: XPages, jQuery, and Dojo – a new paradigm in Client Side JavaScript
Speaker: Mark Roden – PSC Group, Senior Developer

In this session we will take a deep look at how dojo and jQuery can be used to easily manipulate the Document Model of your XPage. This truly opens up a new paradigm for solving every day development problems. Take back your web browser and significantly reduce your compatibility issues. We will look at several useful Tools to use in building your CSJS code; identify resources and illustrate effective methodologies for Client Side JavaScript development in XPages. 

Since Lotusphere this January it has been my intention to speak at a conference and this is a great opportunity for me to spread the jQuery/Client Side JavaScript word.

Through this presentation I hope to encourage XPage developers to use CSJS libraries and to highlight the possibilities – we are only limited by what we know and what we think we know – there is always more out there just beyond the horizon if you know where to look for it.

I really appreciate the support and encouragement to speak at MWLUG from my new employer PSC Group.

This is going to be a lot of fun ! 🙂

Advertisements

What is a scriptlet?

In the JavaScript world Scriptlets are short pieces of code which can be executed through the browser directly. They act on the page in the same wasy as if the user had clicked a button in an application.

An example of a simple Scriptlet is javascript: alert(location.href); void(0);

The best way to add a Scriptlet varies depending on which browser you have:

For Firefox – right click in the Bookmark bar and select New Bookmark

Example Scriplets

Here are some examples of some useful Lotus Notes Scriptlets – Keeping them in a Bookmark folder allows them to be used as developer tools whenever you need them

Show me the session cookie – (this works on any website)
javascript: var temp=document.cookie;alert(temp.replace(/;/gi,”\n”)+’\n\nLength=’+document.cookie.length)

Open ezScan from a URL (assumes URL in the format http://server/path/db.nsf/viewname/docUNID – no ? opendocument)
javascript: var sTemp=location.pathname; var loc=”scanez://YOURSERVERNAME/”+sTemp.substring(1, sTemp.indexOf(“.nsf”)+5)+”0/”+sTemp.substring(sTemp.lastIndexOf(“/”)+1, sTemp.length); alert(loc); void(0);

Open a specific document by Key (enter MRON-8QDL59)
javascript:%20a=prompt(‘Blog Number’,”);%20location.href=’http://www.nostradominus.com/mdroden/nd.nsf/d6plinks/’+a

Open a user’s document in the NAB (assuming you are viewing a Lotus Notes webpage)
javascript:%20a=prompt(‘Enter the User Shortname’,”);%20location.href=’/names.nsf/($Users)/ ‘

Show the current view in XML format (assuming the URL in the format http://server/path/db.nsf/viewname? openview)
javascript: var sTemp=location.pathname; var loc=”/”+sTemp.substring(1, sTemp.indexOf(“.nsf”)+5)+sTemp.substring(sTemp.lastIndexOf(“/”)+1, sTemp.length)+”?ReadViewEntries”; location.href = loc; void(0);

Show the current view in JSON format (assuming the URL in the format http://server/path/db.nsf/viewname? openview)
javascript: var sTemp=location.pathname; var loc=”/”+sTemp.substring(1, sTemp.indexOf(“.nsf”)+5)+sTemp.substring(sTemp.lastIndexOf(“/”)+1, sTemp.length)+”? ReadViewEntries&OutputFormat=JSON”; location.href = loc; void(0);

Search the current view (assuming the database is Full Text indexed and search forms are enabled)
javascript:%20a=prompt(‘Enter the Query’,”); var sTemp=location.pathname; var loc=”/”+sTemp.substring(1, sTemp.indexOf(“.nsf”)+5)+sTemp.substring(sTemp.lastIndexOf(“/”)+1, sTemp.length)+”?searchview&Query=”+a; location.href = loc; void(0);