198 Lotus blogs updated hourly. Who will post next? Home | Blogs | Search | About 
 
Latest 7 Posts
IBM Connect with PSC and LDC
Mon, Feb 13th 2017 6
(Not So) Super Secret Discount Code for IBM Connect 2017
Thu, Jan 19th 2017 6
What’s Plasti Dip And How Did You Do That?
Wed, Dec 7th 2016 3
I Got a New Ride
Fri, Nov 18th 2016 3
Getting the Correct Syntax for JavaScript in XPages
Wed, Oct 5th 2016 4
Back to Running
Fri, Sep 23rd 2016 6
Recent Adjustments to 6 Years Cable Free
Wed, Sep 21st 2016 3
Top 10
Join Me with Insights for IBM Connect 2016
Thu, Dec 3rd 2015 8
Review: Getting Started with VMware Fusion, by Michael Roy – Packt Publishing
Thu, May 22nd 2014 6
IBM Champion
Mon, Nov 23rd 2015 6
Running Notes of a Different Kind – Part 3
Mon, Mar 21st 2016 6
Running Notes of a Different Kind – Part 2
Mon, Mar 21st 2016 6
The Road To Empathy – Read More
Mon, Jul 11th 2016 6
Back to Running
Fri, Sep 23rd 2016 6
(Not So) Super Secret Discount Code for IBM Connect 2017
Thu, Jan 19th 2017 6
IBM Connect with PSC and LDC
Mon, Feb 13th 2017 6
SocialBizUg Articles – June Edition
Tue, Jul 22nd 2014 5


Getting the Correct Syntax for JavaScript in XPages
Twitter Google+ Facebook LinkedIn Addthis Email Gmail Flipboard Reddit Tumblr WhatsApp StumbleUpon Yammer Evernote Delicious
Kathy Brown    

I was recently working on a project where my code was injecting XPage elements onto the page at runtime.  To do that, you need to know a lot of syntax.  Syntax that isn’t in the help file, or blogged about, or easily findable.  Sure, there’s this, but that isn’t exactly reader-friendly, nor are there examples of how to use the elements.  Just because you know you’re using “XspInputText”, doesn’t mean you know how to use it.  What’s the syntax for adding an attribute, for example?  Or maybe you know the syntax structure, but need to know what the parameter looks like in the code.

Designer Data Panel for Date Field For example, you want to add a Date field with certain parameters set.  You know how to set them in Designer in the data panel, but how do you set those parameters programmatically in JavaScript?

Thankfully, Toby Samples showed me a cheat to find out.  Create a dummy XPage, add your element and do whatever it is you want to do, i.e. set the parameters for your date field.  Save the page.  In Designer, go to Package Explorer and your nsf.  Expand the Local folder and then the xsp folder.  There you’ll see all of your custom controls and XPages with a .java extension.  Double-click on the XPage.java file.  It will open and there you’ll see the Java code used to generate that XPage, including your element and how the parameters were set programmatically.  This can be really useful when you’re adding something like an attribute via JavaScript and you can’t find any examples of HOW to add an attribute (or class or value binding or any other property).

Example, if you set the above “display format” to “Date and Time” in the picker, how is that set programmatically?

converter.setType(“both”);

With the parameter “both”.  Good luck figuring that out on your own.

File under: “Things you may have already known, but I didn’t, and I share it just in case you didn’t either” AND “Blog post titles I struggled with actually explaining what the post was about without actually typing the post in the title”



---------------------
http://feedproxy.google.com/~r/RunningNotes/~3/NT-PuAEgnd4/
Oct 05, 2016
5 hits



Recent Blog Posts
6
IBM Connect with PSC and LDC
Mon, Feb 13th 2017 7:23p   Kathy Brown
IBM Connect 2017 is just a week away.  I’ll be there and look forward to learning new stuff and meeting new people.  In addition to attending sessions and networking events, John Head and I will available to meet with YOU to discuss your collaboration roadmap.  And thanks to our partnership with LDC, we will also be the onsite representatives for LDC Via. If you’d like to meet with us, then go check out what we’re offering and sign up here, connect17.psclistens.com!
6
(Not So) Super Secret Discount Code for IBM Connect 2017
Thu, Jan 19th 2017 3:50p   Kathy Brown
Okay, it’s a secret in that I’m not blogging it, but it’s not so secret, in that all you have to do is reach out to me ( @IamKathyBrown on most social media ) or any other IBM Champion of your choice, for a $100 discount to attend IBM Connect 2017. If you read this in time, you can also listen to the ICS Community call this morning at 10AM ET (link), where they will discuss “What To Expect at IBM Connect”.  If you miss it, they usually record it.
3
What’s Plasti Dip And How Did You Do That?
Wed, Dec 7th 2016 9:15p   Kathy Brown
I recently plasti-dipped my side mirror caps on my new MINI.  I posted pics in various places online and several people asked “What’s Plasti Dip?” So, PlastiDip is “an air-dry rubber coating”.  Originally used to cover tool handles by dipping them in the substance.  Then people started dipping their car tire rims, then other parts of the car.  PlastiDip now comes in cans, so you can spray it on almost anything.  Why is it so great?  Because it peels off.  Dec
3
I Got a New Ride
Fri, Nov 18th 2016 1:19p   Kathy Brown
The Background: I’ve never had a fancy car.  Cars aren’t really my thing, so I always chose utility, safety, price, etc.  I also have what I jokingly call “car dyslexia”.  I can never remember or distinguish between anyone’s cars.  Sure, I can tell the difference between a sedan and a truck, but all sedans look the same to me. My first car was an ’86 Honda Accord manual hatchback in “champagne”.  It was high school, the car was used and afford




Created and Maintained by Yancy Lent - About - Planet Lotus Blog - Advertising - Mobile Edition