Archives for the ‘XPages’ Category

15 May 2015
10

XPages Tip: Filter your design elements for quicker navigation

This is a quick tip on how to filter your design elements in Domino Designer to help quickly find what you’re looking for.

I have to laugh at myself sometimes. 80% into one of my recent XPages Projects, I found myself completely frustrated, trying to pinpoint 1 of many custom control designs in Domino Designer. I almost fell off my chair when I realised that the solution was staring me in the face the entire time.

In Domino Designer, irrelevant of if you’re viewing XPages design elements, custom controls, views, forms, etc, there is a filter option on the top right side of the content Pane. This allows you to track a certain design element using a keyword. As long as that keyword exists in the design element name or alias column, you’re good to go.

EXAMPLE OF FULL LIST OF VIEWS

Screen Shot 2015-05-15 at 11.35.24 AM

EXAMPLE WHERE FILTERED BY KEWORD “Reports”

Screen Shot 2015-05-15 at 11.36.12 AM

Pity I only found this out now :(

Hope this helps.

Cheers. John

UPDATE:

Thanks to Tommy Valand and Per Lausten for suggesting Ctrl + Shift + R, which searches for any design element by name in applications that are open in DDE.

Per also referenced a great blog post: “10 Eclipse Navigation Shortcuts every Java programmer should know

14 May 2015
5

Java XSnippet Published: Translate an ArrayList to a Vector

Here is a Java XSnippet I published the other day on how to manually convert an ArrayList Object to a Vector Object.

UPDATE

Thanks to “Martin Rolph” and “Jesse Gallagher” for providing a much simpler method of getting the same result without having to use my XSnippet. I’ve decided to keep my XSnippet published as I do feel it will add value as a reference point.

ORIGINAL POST

Click here to view XSnippet

When binding Scoped Variables to a List Control in XPages, the values returned are defined as an ArrayList. You might want to convert these values into a Vector for whatever reason.

Quick Example of how to use XSnippet:

doc.replaceItemValue("MultiValueField", TranslateArrayListToVector(viewScope.get("Values"));

Martin’s and Jesse’s much better alternative:

doc.replaceItemValue("MultiValueField", new Vector(viewScope.get("Values")));
9 Mar 2015
13

XPages Best Practice: Don’t add ids to controls if they are not required

This is a quick best practice tip and what will most likely become an involved discussion around ids for XPages controls.

I had to think carefully before posting this, but decided to do so as I know it would prove beneficial to the online community either way.

One of the recent items I’ve added to my “best practices” list, is to not use ids for XPages controls that do not require it. A great example of this are label controls. 99.9% of the time, I require no programmatic handle on any of my label controls. What most should know by now is that if you assign an id of “label1” to the label control, this id gets converted to something along the lines of “view:_id1:_id2:_id11:label1” when the HTML page gets rendered to the user. I’m hoping by now you start understanding my concern?

Let’s say you had about 20 controls that make up your XPage that don’t require ids….that’s at least about 500 bytes of data the user has to download just for these id names. NOTE: This is before compression has taken place. (This could be 100 bytes after compression is applied)

See below example XPage. All it contains (other than the defaults that Domino provides) is 20 label controls with an id name of “label1“. The size of the HTML page is 633 bytes (post compression).

Screen Shot 2015-03-09 at 12.07.12 PM

See below 2nd example of the same XPage, except there are no ids assigned to these 20 labels. The size of the HTML page is 567 bytes (post compression).

Screen Shot 2015-03-09 at 12.05.16 PM

For most of you (i’m guessing), the difference in size is probably too small to action, but for me, it forms part of a drive to deliver the best online, mobile and browser experience possible to my clients and users.

Ok people, bring on the discussions….I’m ready!! :)

3 Feb 2014
3

Slides and Info for Worklight Session at IBM Connect 2014

Firstly, a big thanks to everyone who attended our session on “IBM Worklight and XPages” at IBM Connect 2014 last week. It was great to see so many people turn up, especially on the last day of IBM Connect.

Below are the slides to the IBM Worklight Session, which will be available on SlideShare and for download. I will be releasing a video on this topic and will submit it through David Leedy’s NotesIn9 VideoCast (Hopefully next week still). I will also have the source code available for download when submitting the video.

Thanks once again and see you all online.

Cheers
John
29 Nov 2013
2

DanNotes Session Slides: Appcelerator Mobile and XPages

Here are the slides for my 1 session at DanNotes this week: Appcelerator Mobile. The Doppelgänger to XPages.

I cleaned it up a bit. Sadly there were 2 live demos, but I will publish more content around this soon enough.

I will submit my other slides early next week and will also be blogging about my Denmark trip soon enough.

Enjoy :)