Moment of most celebrated enlightenment usually comes from putting together a frustration with a piece of knowledge gleaned for a completely unrelated reason. A couple of days ago I had such an epiphany.
Often when I’m developing I need to check something somewhere else on the XPage or Custom Control. Or I need to add a custom property to a Custom Control, for which I need to position the cursor on the xp:view element of the Custom Control in order to see the Custom Properties panel. But I then want to get back to where I was working. Typically that would mean scrolling to the top of the page (or Ctrl + Home), then scrolling all the way down to wherever I was working.
But then I realised a much simpler way.
If I add a TODO tag to the page, when it’s built I get a nice marker in the right-hand gutter. Now, no matter where I am on the page, no matter if I have to re-open the editor, with a single click I can get to where I need to be working in the source pane.
It’s not rocket science and I’m sure some people are already doing it. Hopefully some people who aren’t will read this and see the benefit of it.
Great tip.
I use it all the time in Java development. But I know it works also in the XML of the XPage code
Paul, there is another shortcut that you may want to know: Ctrl+Q. It will take you back to the last edit location. In Java/XML that is actually the last edit location – wheras in the LotusScript editor it just seems to take you back to the last edited element (in custom classes in script libraries anyway – which is what I have used…).
You can press: Ctrl+Shift+L to get a list of all the shortcuts – then you just need to go playing with them 😉
Thanks, I wasn’t aware of that one. Shame it doesn’t go any further than the last edit location.
Agree – but it is still handy in many situations 🙂
Hi JohnI look at it from a slightly dnfefreit angle.If you have a static method in a class that means you can call the method without having created an instance (object) based on the class. This is extremely handy for many things (e.g. utility functions you can find a bunch of these for conversion etc. on e.g. the String class).As soon as you want to keep some data for later reuse you need to create an object (or instance or container ) of the mentioned class. It becomes an individual with its own specific data. You can create one or many instances of the class. Each of them are individual entities on their own. And this was what you were looking for in your code. And then you found out that you can share these with the XPage SessionScope by using variableResolver Just another way to look at it /John