This is just a quick little show today to demonstrate a couple of ways to deal with formatting numbers on an XPage.
Nothing really fancy today. 🙂
This is just a quick little show today to demonstrate a couple of ways to deal with formatting numbers on an XPage.
Nothing really fancy today. 🙂
NotesIn9 Week continues with this episode in which Graham Acres comes on as a guest to talk about how he got started using XPages. I want to thank Graham very much for taking the time to record this presentation for NotesIn9.
Graham will talk about his journey into learning this new technology and then will show off a couple of interesting demo’s and tips.
When I first heard of this presentation, which I think he did for a Canadian user group, I thought that this might be really inspirational. Everyone who starts out learning XPages struggles with it. The first several weeks are the hardest. The way to get past that is to not get frustrated. Realize there is a roadmap to improving your skills and that you’re not alone out there. There are now a lot of great resources out there for XPages information. Here’s just a couple:
XPages.Info
XPagesWiki.com
XPages Forum
XPages Blog
Designer Wiki
XPagesCheatSheet.com
XPages101.net
XPages.TV
OpenNTF.org
TLCC.com
Again, a big thanks to Graham for his presentation.
In this show I talk and demo ways to use Java HashMaps and TreeMaps with your XPages applications.
UPDATE: April 11, 2016 –
I was just now reviewing this older show. I see one thing in the code that might work but I don’t think is quite right.
var myList:java.util.HashMap = new java.util.HashMap
That appears to be missing the “()” at the end. It really should look like this:
var myList:java.util.HashMap = new java.util.HashMap()
and of course it’s a Map and not a List so a better variable name might have been “myMap”.
July 11th is the second anniversary of my Notes in 9’s screencast. It was 2 years ago that I posted my first “official” show to YouTube. That show talked about one of my favorite XPages features – The Repeat Control.
In the last 2 years, I’ve done a bunch of shows and have even been able to get some expert speakers to come on and contribute. Together Notes In 9 has produced 27 shows of the 10 minute or less length, and 8 “Extended Edition” shows. For over 7 and a half hours of free educational content!
Even though I’m simply a customer and not a consultant or business partner, deciding to give back to the community and creating NotesIn9 is by far one of the best professional decisions I’ve ever made. I’ve gained so much more then I’ve given. I’ve learned an incredible amount in the process of creating these shows. I’ve met many wonderful people and gained some really good friends. I’ve gotten the opportunity to speak at great conferences like, IamLUG, MWLug, Tri-State LUG, and even 2 Lotuspheres. I pretty much got an absolute dream job from this screencast and sharing effort. And most recently I’ve been named an IBM Champion.
So if there’s anything I could suggest – it’s that sharing your knowledge is extremely important. I say this all the time to people I meet at LUGS. If you know something, try and take the time to share it. I don’t care how “simple” it might seem. If you took 5 minutes to figure it out… or research something to solve a problem then it’s sharable. Someone out there does NOT know what you just figured out. And if someone posted the solution before? Who cares? That doesn’t mean others can find it. One of the reasons why I created NotesIn9 was because it seemed that even though XPages was new, many of the great bloggers were starting to post some pretty advanced topics and I thought people just starting out were getting left behind. There’s nothing wrong with posting “simple” information.
Where do you share? Anywhere really. If you don’t have a blog there’s the designer wiki and the XPages forum. Heck most established bloggers would likely publish something if you just asked them to. So please – consider sharing what you learn.
Ok – enough of my rambling. Let’s talk about this week. As a celebration of 2 years of NotesIn9. It’s my intention to try and publish a show EVERY day this week. That’s 5 new shows. I’m not sure I can pull it off as I only have 1 “in the can” and the rest are just ideas at this stage. But I’m going to give it a good try.
In closing I want to thank everybody for watching the show and for the feedback! I truly appreciate it.
Dave
In this show I demo one way to access CGI variables inside your XPages applications.
I hope it’s helpful.
This morning I learned that I was chosen to be an IBM Champion.
I just want to say Thank You to anyone who nominated me and the selection committee. I was very surprised by this. I don’t know if I really know what this means yet, but I’m honored to be chosen.
As my way of saying thanks, I’ll be ending my NotesIn9 drought shortly. I have quite a few shows in the queue that I’m working on and am excited to get them out. I’m also talking to a couple of different guests who are interested in coming on the show to contribute. So more shows are on the way!
Anyway – Thanks again!!
I got some bad XPages news today… where I’m doing something that works today… that I feel I should be able to do.. it’s not really that fancy.. but learned that it’s very possible that what I’m doing might not work in the future. 🙁
Here’s the issue. If you look at this XPage from xpagescheatsheet.com:
You’ll see a list of contacts in a repeat control. Yes this is an UGLY page. But the inside of the repeat is being generated from a SSJS Object. Why? I wanted to seperate my data from the UI structure. I’ve included that code at the bottom of this post.
What’s a SSJS Object? We’ll I’m just a small town Notes Client Developer at heart. But there is a way to use SSJS similar to a LotusScript Custom Class. I like that. It’s “comfy”. So my SSJS Object can basically have properties and methods/functions.
I demonstrated this technique in my Introduction to XPages Video (Part 2). Skip to minute 42ish to see what I’m talking about.
Anyway – what I’ve learned today.. is that this type of object – which works totally fine in sessionScope today… does not work in viewScope. (I’ve not ever tried that actually). In addition I learned that it’s very possible that this technique will no longer work in sessionScope in the future.
Why? I don’t know. It has to do with “Serialization”. Honestly I don’t know what that means. viewScope is strict about this.. sessionScope “overlooks” this… for now.
The best solution is to “Suck it up, Learn Java and use Managed Beans”. And while I agree that is the best way to go, I feel a little bummed that I’m forced to go the Java path and that SSJS can’t handle something that LotusScript did so very well.
Anyway… this might not be a huge deal.. I don’t know.. Maybe I’m the only one really trying to do this. I am certainly not the best XPages/JavaScript dev in the land. Far from it actually. I just liked learning and working with SSJS in a similar way that I used LotusScript. It helped me with the transition.
I will say that I did reach out to someone from IBM, and very quickly got a nice response giving me details on this and even a potential workaround. I’ve not fully digested that information yet, but I very much appreciate the IBMers that took the time to get involved!
I’ll be playing with this stuff this weekend, but I think the moral is that XPages development, unfortunately, needs more Java skills then I originally thought, and more then I would have wanted. 🙁
Here is the code structure of the SSJS object:
var contactDoc = (function contactDoc(key) {
// Key really needs to be a string here. Convert it before it gets passed in.
//Pull data from External Datbase
// Here are the Database and View Names
var dbName = “FakeNames.nsf”;
var viewName = “ByName”;
// I assume that the database we’re looking up is in the SAME PATH as the current db
var path = database.getFilePath().split(database.getFileName())[0];
var fullDB = path + dbName
var lookupDB:NotesDatabase = session.getDatabase(database.getServer() , fullDB);
//var vLookup:NotesView = lookupDB.getView(viewName);
//print(“key=” + key);
var size = @Length(key)
//print(size);
if (size > 15)
{
//This is a Unid
var unid = key;
var contactDoc:NotesDocument = lookupDB.getDocumentByUNID(unid);
var contactKey = contactDoc.getItemValueString(“number”);
var temp = 1
var status = true
}
else if (size>1 && size <= 15)
{
// Key must be an @Unique or ProjectKey
var lookup:NotesView = lookupDB.getView(“ByNumber”);
// print(lookup.getSelectionFormula());
var contactDoc:NotesDocument = lookup.getDocumentByKey(key, true);
var unid = contactDoc.getUniversalID();
var contactKey = contactDoc.getItemValueString(“number”);
//print(key);
var status = true
var temp = 2
}
else
{
var status = false
var contactKey = “”
var temp = 3
}
return {
getUNID: function() {
return unid;
},
getKey: function() {
return contactKey;
},
getFirstName: function() {
return contactDoc.getItemValueString(“firstname”);
},
getLastName: function() {
return contactDoc.getItemValueString(“lastname”);
},
getFullName: function() {
return this.getFirstName() + ” ” + this.getLastName();
}
}
});
Did you know that openNTF is running an XPages Development Contest? 3 iPads have been sponsored by We4IT. Already many custom controls have been submitted for free use in any applications. In this show we take a look at one of these custom controls.
Mark Hughes from hugesconnect.com comes on the show to discuss his custom control creation – a very powerful View Picker.
Here’s a quick little show that I threw together last night. Was talking to someone who had a question on how to do a Collapse All/Expand All for a view control and it turns out to be WAY more difficult then it should. I’ll maintain there are better UI constructs to do this but he wanted to stick with a view control. So here goes.
Some links from the show:
I received a sad phone call yesterday. My former company is considering abandoning the Notes/domino platform for Application development due to the inability to find a Notes/Domino Developer. They would keep Notes for Email as they’re very happy with Notes overall. But not having a resource available to continue to enhance the applications is becoming a big problem.
They have iSeries (AS/400) developers on staff and I guess are considering moving app dev to PHP on the iSeries. I guess that’s a supported language in some fashion.
One of the problems of finding a person is that the company is a little “old school” in some ways. They have no interest in “Work form Home”. They want someone, full time, in Lebanon Pa. Lebanon is not exactly a hot bed of technology. They also need someone “affordable”.
I’m on good terms with them and they’ve asked me to come in next week to have a brief discussion with the President of the company on the pros and cons of this thinking. Of reasons to stay with Notes as opposed to moving to a different platform. Almost all the apps are currently Notes Client apps, and before I left, the decision was made to move them to XPages to embrace the web.
Of course I don’t want to see them move off Notes, though not being able to find an affordable resource is a pretty big hurdle to the discussion. I could go on and on about some of the advantages or the platform, Security…. agents… XPages… Maybe get into RAD though it’s clear other platforms can be RAD as well to at least some point. I know very little about PHP, especially PHP on iSeries.
The interesting thing is that they really don’t have any true Web developers in house. They have excellent RPG developers who can do SOME things on the Web like Web services and Net.Data pages. So there’s going to have to be some training that has to take place. Do they bring someone up to speed on Domino/XPages? Or do they just forget it and go the PHP route? It boggles my mind that they can find RPG developers pretty easily but not Notes Devs.
If anyone has any opinions or thoughts I’d sure appreciate hearing them.