Keep AJAX-returned XML from storing in user's browser cache
posted Wednesday 21st, February 2007
Yesterday I posted about adding the current date/time as a dummy parameter to the end of a url in an AJAX request ...to ensure that the request would fetch a fresh set of data. Julien Bottemanne was kind enough to post a comment about some optimization that one may want to do to help keep the caches of users' browsers from getting populated with the XML streams from these requests. Doing a little searching on the IBM site, I found some references to explain Julien's brilliant suggestion.
IBM has documented this type of use of a Web Site Rule (the HTTP response header type) to prevent caching. Here are the suggestions from Julien's comment and from the IBM posting:
Create a Web Site Rules document
Provide a meaningful Description, like 'Prevent caching on ReadViewEntries'
Set the 'Type of rule' to be 'HTTP response headers'
Set the 'Incoming URL pattern' to whatever makes sense. So in this case it might make sense to establish a standard for your shop to use when sending ajax requests to the server. Perhaps agree that all ajax calls should be done against views that have been created for this purpose, so that the view alias name begins with the characters 'vwAjax'. Then specify an Incoming URL pattern of '*.nsf/vwAjax*'
Set 'HTTP resonse codes' to '200, 206'. 200 is the standard success code. 206 indicates that a partial GET request has been successful (see RFC 2616)
Set 'Expires header' to 'Always add header', and 'Specify as date', specifying a date far in the past (01/01/1990 is recommended in the IBM documentation)
The IBM recommendation for 'Custom headers' is to populate as follows:
Lotus cert tests: Save half of cost through Jan 2007
posted Thursday 18th, January 2007
Edposted that more than half of the Lotusphere attendees this year are IBM Certified Professionals, so maybe a lot of folks already know about this discount. But it was news to me. Apparently, if you use the code Dec06 when registering for a Lotus cert test, you can save half of the cost of any of 8 certification tests listed on this IBM/Lotus page. That's good through the end of this month.
Wow. This morning I'm scanning headlines on Google news and spot articles announcing that the Notes client is now available on a Linux desktop. As fate would have it, just last night I finally started running Ubuntu linux on one of the laptops. Very cool move, IBM!
I continue to play with ND7 and keep discovering more cool stuff ...not all of which is new with Notes/Domino 7. This evening I noticed this fun little SmartIcon to use to edit the current location doc. Well, I checked my install of ND6 and the icon is also in there, so it's not new. But it's new to me (I hide all but the few icons I actually use, preferring keyboard shortcuts and other geekiness much of the time). I may never use it, but I think I'll leave this icon sitting there; palm trees always bring a mild wave of peace. (2)
Monday 26th, September 2005
ND7 Designer: In-view editing in design views
posted Monday 26th, September 2005
Notes and Domino 7 is very cool. There are many features that I think will be regarded as essential once folks have been using this version for even a short while (Autosave comes to mind immediately).
But not all new features are greeted enthusiastically. One feature of Designer that is fueling debate is the ability to rename design elements from the design view, without needing to open the element. Bruce has posted about this, as has Chris.
First off, Chris mentions that he can't think of a reason to use the same alias name on 2 design elements. Personally, I find this ability very useful if coding an application that will be accessed from the Notes client and the web client. This allows me to store the documents with a single form name, avoiding the need for form formulae in the views, and I can simply allow the design properties to control which form is used to render the data. That's a bit of an aside, but the point is that there are valid reasons to retain the design element name and alias across multiple elements.
Bruce's and Chris's points about the danger of in-view editing of design elements are well-taken. I happen to think this is a very cool feature, and I wish I could use it now in ND6. However, it would be much more intuitive if the properties were available via a right-button click of the mouse (or an Alt-Enter key combo after highlighting the design element). There's already a Design Document properties box that displays with a right-click. If one could set things like the alias from here (just like setting a database title via the DB properties box), that would preclude accidental renamings, and would most likely flatten a tiny bit of learning curve. I am not at all a fan of needing to edit the Notes.ini file to turn the in-view edit ability on and off, but I would be fine with enabling or disabling this via a Preferences dialog box.
The key to the whole thing is usability. The available parameters in the Notes.ini file are useful, but hardly intuitive. In-view editing is a wonderful feature in the client, so it makes sense to extend it to the Designer. And a means of managing this capability - via mechanisms with which folks are already familiar - would be a welcome enhancement. (3)
Thursday 23rd, June 2005
Strangeness with Date entry in Notes client
posted Thursday 23rd, June 2005
After periodically getting reports from users of date fields showing values that they'd not entered, I finally learned that someone or some team at Lotus, for some reason I've failed to understand yet, coded the date picker in the R5 and later Notes clients rather, um, strangely. For example, by default, if the user enters the letter "a" in the date field, it will be translated as April 1st of the current year. You can read a detailed description of the "One- and Two-Parameter Date Input" feature on the IBM site. OK, while I don't yet know what the motivation was to code the behavior of the date picker this way, fortunately one can modify the behavior for the user in their Lotus Notes client by adding this environment variable setting to the Notes.ini file:
StrictDateTimeInput=1
I now need to do a lot of testing and see if setting this parameter will break anything else for my users. If the Notes.ini change raises issues, then I may experiment with writing a date picker wizard in LotusScript, since there does not appear to be a way to force one to use the date picker. Well, I guess this is part of what I like about Notes (and what drives me mad) ...that there is always more to learn :-) (1)
Friday 10th, June 2005
Designer 6.5 charts: Buying from IBM might be cheapest option
posted Friday 10th, June 2005
Wow! I went to FedEx Kinko's today to pick up the 4 Designer 6.0 posters I was having laminated. I had thought they said it would be US$1 per square foot, so I was expecting a $24 charge for the lot. Nope! It was $1.50 per square foot, and so 4 posters, each 2 feet by 3 feet, times 4 meant that I paid US$36 to have them laminated. Yee-ow!
Well with Designer 6.5 there are now FIVE posters to a set, and you can either order them from IBM at US$36.25 for a set, or download them for free. So I was thinking that maybe it would be cheaper to download the PDFs and take a CD to FedEx Kinko's and have them printed. NOPE! Kinko's charges US$8 per square foot to print the poster. Yes, you did read that correctly - Kinko's would charge US$48 to print each poster from CD.
So, let's recap. You can order a set of 5 posters from IBM for US$36.25 ...or you can download for free and then pay Kinko's US$240 to print the posters. If you like to have the posters laminated as I do, then you can pay another $45 for the lamination, for a total of US$285. To be fair, Kinko's did tell me that they are running a "special": If I could accept having the posters printed at a size of 18 inches by 24 inches or smaller, they could print and laminate each poster for only $40, so I do have the option of downloading, printing, and laminating the 6.5 set for only US$200.
I think I'll just stick with my 6.0 posters for a while. (5)
Wednesday 8th, June 2005
Links to download 6.0 and 6.5 posters
posted Wednesday 8th, June 2005
I've created and stored a couple of links that can be used to easily get to the pages where you can download the PDFs of the Domino Designer posters for ND6.0 and ND6.5 ...The links are:
http://snipurl.com/nd60posters http://snipurl.com/nd65posters
I'm on my way to Kinko's to get my posters laminated. I'll see if I can get an estimate of cost to have downloaded PDFs printed and will post results if I learn anything. (1)
ND6.5 charts available; ND6 no longer available
posted Wednesday 8th, June 2005
Last night I posted about having received my order for 5 sets of ND6 object model charts (LotusScript parts 1 & 2 - which includes XML, Java, and @Formula ...5 sets of 4 charts each). But I had not saved the ordering URL and when I tried to find it last night the IBM site for ordering publications (at least the part I was trying to access) was unavailable, and I tried off an on for a while. So I couldn't post the URL.
This morning I see that the ND6 charts are no longer available.
The ND6.5 charts are available, however. You can order a set at http://snipurl.com/ffto ...be aware that what I had ordered was 5 sets of 4 charts each for a total of US$60. It appears that the 6.5 charts come in a pack that is ONE set of 5 charts for a price of US$36.25. If I'm interpretting that correctly, then I had paid US$3 per chart and anyone ordering ND6.5 charts will be paying US$7.25 per chart. That's a lovely 142 percent price increase for a product that helps us continue to develop applications using IBM Lotus products. YIKES!
It looks to me like IBM is really, really wanting folks to download the PDF versions and go to Kinko's or something to have the posters printed.
ND6 Object Model charts exist - I've received my order
posted Tuesday 7th, June 2005
My short buddy Duffbert has been lamenting about the dearth of object model charts for Notes/Domino 6. Fret not, my vertically challenged colleague! The charts do exist. I ordered a set and have received them. In fact, Mr Duff, I wasn't going to tell you this because I wanted to surprise you ...but I have one set that I am sending to you. I gave away 2 sets at work, kept 2 sets for me (one for home and one for work) and reserved the other for you as a Christmas in June present. But now I'm worrying that you might actually order them, so I'm spilling the secret. Something very cool is that along with the LotusScript and Java charts is a chart of the @Formula language. Suh-WEET!
Even though the site said that the charts were not yet available, I went ahead to the ordering page and tried ordering anyway. Yup, they arrived within a week :-) (4)
Monday 6th, June 2005
Notes Client Development forum this week at LotusUserGroup.org
posted Monday 6th, June 2005
Notes client development is very much alive. Every job I've had over the past decade has involved a large amount of development for the Notes client. Even with applications that were focused at web users (internal or external), I've always also included a Notes client component for the database owners. Why? Because the Notes client is a rich client. One can often provide more functionality with better response time vs an application developed for the web. So it really comes down to your target audience. If they have a Notes client and connectivity, then it makes very good sense to take advantage of the rich feature set provided by the client.
I know that there are many others who also do Notes client development. Some have been doing so for years, and others may be fairly new to the game. I am moderating this week's forum at LotusUserGroup.org. The topic this week is Notes Client Development. Please drop on by and post any questions - or tips and suggestions! You do need to be registered, but that only takes a moment, and you then have access to the wealth of information that is building from the many Lotus user groups that are now participating at LotusUserGroup.org. (1)
Thursday 24th, March 2005
R6: Embed multiple views from different databases
posted Thursday 24th, March 2005
I'm posting this so that I can easily find the answer if I forget later! I'm working on a form in the Notes client, and this form needs to include multiple embedded views, with the views being pulled from various different external Notes databases. I was having a heck of a time figuring out how to do this. I knew that I had done this many times in the past, but today I was unable to get the database and view that I needed.
The solution? With the Client and Designer programs running, drag the icon of the desired database to the Designer client (to the title of the Designer window down on the Windows taskbar). In my case, I didn't have designer rights to the needed database, but the database was now listed in my Designer client. Once that was done, I could open the form on which I was working, click to embed a view, and now in the "Insert embedded view" properties box I was finally able to select the database I needed. It appears that if one wishes to embed a view from an external database, the database must be listed within one's Designer client (with a few exceptions, like one's mail file, personal NAB, etc.). This may be documented somewhere in the Designer Help, but I sure couldn't find it.
I apparently had not had a problem with this in the past because the other times when I needed to embed a view from a different database, I happened to already have that other database within my Recent Databases folder inside of Designer.
OK, I'm just passing this one along, since I am ignorant about all but the most basic of things LDAP. In a post a few days ago, I mentioned an issue folks at work were trying to address. After upgrading to Domino 6, LDAP quit working. Tony Kelleran kindly provided a link to the solution:
Add LDAPPre55Outlook=1 to Notes.ini.
That worked beautifully, so, of course, the next layer of the LDAP onion has been revealed. There is now an issue with some VBScript being used to try to create a new user from within an ASP page. If you are up for a challenge and know of the mysteries of LDAP, please have a look at the script and the error. I think I already owe a few folks beer or coffee or something at Lotusphere, so if you can solve this one, I'll gladly add you to my debt list.
A client has a Domino server recently upgraded from R5 to ND6.5.2. This server is running ldap. When it was R5, one could click Start / Run from the Windows desktop, then type ldap://logicalName and press Enter (or ldap://IPaddress), and one could then enter a name in the displayed window and be returned search results from the ldap server. After upgrading to version 6.5.2, if one tries to issue the same search, this error message displays:
I am a developer. It has been years since I did any administration, and that was only in a backup role. So I am definitely not an expert here. My guess is that they figured I must know the answer to something, so they'd ask me, just in case maybe I had happened to have come across this at some point. Being a developer with deadlines and such, I have not even attempted to research this more than a quick search of the various Notes/Domino support sites. And I have not personally used the ldap service on this server when it was running R5. I typically like to verify everything for myself, and I cannot do that here.
All that being said - or written, actually - if any of this sounds like something you have encountered and solved (or if you have any ideas), please do share your experience. Thanks! (5)
NotesDomino 6: @For rocks!
posted Tuesday 4th, January 2005
Yesterday I needed to update a formula used to generate a list of choices for a field. The existing formula was 20 lines with various @Replace and @SubString, etc. This was necessary in earlier versions of Notes in order to parse the prefixes on each of the potential values. Fortunately, this client site is running ND6, so I was able to replace what would have been about 30 lines of code (after the modifications) with a few lines similar to what's shown here:
@For( n :=1; n <=@Elements( tAllValues ); n := n + 1;
tList := @If( @Begins( tAllValues[n]; tWantedPfx ); tList : tAllValues[n]; tList ));
@Sort( @Trim(tList) )
It's a great feeling to be able to go into code that's been around for quite a while and take advantage of current features to dramatically ease the future maintenance. Life is good :) (4)
Wednesday 15th, December 2004
Document locking in Notes 6
posted Wednesday 15th, December 2004
In earlier versions of Notes, many of us have coded (or 'borrowed') routines to handle document locking and unlocking. It's typically a little messy - meaning that you have to put code in a number of places to ensure proper handling of locks. Well Notes 6 makes this all very easy. You simply assign an administration server to your database and then enable the database property to 'Allow document locking':
The only issue I've run across is that sometimes documents stay locked (for example, if a user's PC crashes). Notes does provide menu actions to unlock the selected document, but you have to know that it's locked. So what I do is to create a view to display locked documents, and a scheduled agent to run in the middle of the night and free up any documents that are still locked. The key is to know that the new system fields $Writers and $WritersDate are what control the locks. So the first step is to create a view with this SELECT formula: SELECT @IsAvailable( $Writers )
The other step for the view is to add these 2 columns:
Column heading: "Locked by" ...column formula: @Name([Abbreviate]; $Writers )
Column heading: "Locked since" ...column formula: $WritersDate
It is then easy to see which (if any) documents are locked, and the date/time when the locks were applied. One can either manually research and unlock the documents as warranted, or it is easy to code an agent to go through the view each night and delete the $Writers and $WritersDate items from each document in the view, thereby releasing the locks.
This is so much simpler than the old way of handling document locking! (5)
Wednesday 29th, September 2004
Woo-hoo! First meeting of I-4 iWUG coming Oct 20!
posted Wednesday 29th, September 2004
Thanks to the hard work of Mac Guidera, and the gracious sponsorship of IBM, the I-4 IBM Workplace User Group (I-4 iWUG) will have its first meeting in Orlando on Wednesday, October 20, 2004, at 6pm at IBM in Orlando. The plan is to meet on the 3rd Wednesday of each month, alternating between Orlando and Tampa. For those not familiar with Florida, I-4 is the Interstate freeway that connects Tampa and Orlando. The name of the user group was chosen because we want to cover the full suite of IBM Lotus products (Notes/Domino, Workplace, Lotus Team Workplace (QuickPlace), Lotus Instant Messaging and Web Conferencing (Sametime), etc. - and we want the user group to bring together IBM Lotus professionals throughout the central Florida area. For full details (date, time, location, directions, agenda), please see the I-4 iWUG site. (0)
Thursday 23rd, September 2004
Question for RichText gurus
posted Thursday 23rd, September 2004
I was emailed today with these 2 questions:
I have an application which maintains employee profiles. When an employee fills out their profile, they paste their picture in a RichTextField using either Create-Picture or File-Import. The image therefore is not stored as an attachment or as an embedded object. How then can I get the image name? Also, do you know of a way to convert an image that has been pasted into a RTF into an attachment and store it in another RTF so that I can then reference @AttachmentNames?
Better control of window focus when using Notes:// protocol
posted Wednesday 7th, July 2004
Back in October 2003 I'd posted about using the Notes:// protocol to link from a web browser to the Notes client. This week it was pointed out to me that if the user has Notes already open in the background and Notes is not minimized, then the Notes:// link will open the desired location in the Notes client, but the Notes window is not brought to the foreground.
The solution is to replace the url in the anchor tag so that some simple JavaScript provides the desired control. The general format of a standard Notes:// link is: notes://serverName/folderName/dbFilename.nsf
To use JavaScript to add a little better behavior to the link, try something like this instead of the standard Notes:// url: javascript:var winNotes=window.open('notes://serverName/folderName/dbFilename.nsf', 'winNotes'); winNotes.close();
The full anchor tag would therefore be similar to this: <a href="javascript:var winNotes=window.open('notes://serverName/folderName/dbFilename.nsf', 'winNotes'); winNotes.close();">My Database Link</a> (0)
Wednesday 16th, June 2004
View categories and case sensitivity
posted Wednesday 16th, June 2004
17 June 2004 Follow-up: Many thanks to Dan Soares at Stony Brook University for pointing out that the issue I mentioned below is easily addressed by simply selecting the view column option for 'Case sensitive sorting'. Thanks Dan!
If you change the value of a categorized field, changing only the case of the letters, the displayed category in views will not change. So far I have only tested this in ND6. It appears to be similar to SPR # GCUN5ECLRD, which reports that one cannot rename a folder (using the shortcut menu after right-clicking on the folder) - if one is trying to simply change the case of the folder name.
Regarding the view category, here's the scenario: I provide a function to allow a user to change the value of a categorized field. The button is used to, for example, change a value of 'Abc' to now be 'ABC'. The documents are all changed, but the view still displays the old 'Abc' in the category. The only solution I've found so far is to first change the field value to something that includes at least one additional or different letter, like 'ABCz', and then to change the field value to the desired value of 'ABC'. Similarly the SPR referenced above suggests workaround of renaming the folder to something completely different, and then setting it to what one really wants.
At least this time the issue doesn't appear to be my own goofy blunder, but I do wish I could provide a cleaner solution. The only thing I've come up with so far is possibly putting code in the button to capture the desired new field value, set the field to that value plus something bogus like 'z~z', and then set the field to the REAL new value. Man, that's goofy! (3)
Tuesday 15th, June 2004
NotesUIWorkspace and document in preview pane
posted Tuesday 15th, June 2004
I received a call this morning from a user who was getting the infamous 'Object variable not set' error every time he'd open a certain view.
The culprit? It turned out that he had the preview pane open - only opened a few pixels, but it was open. This meant that Notes was grabbing whatever document happened to be selected, and was opening that document in the very small preview pane. And that meant that the Postopen event of the document's form was invoked. Well for many, many years, I have used a block of code like this in the Postopen event:
OK, I'm lazy I guess. My thought was to declare a few of the very common objects in the global declarations and then instantiate those objects in the Postopen event so that they were available to the rest of the form events. I had never heard of any problem like today's issue. Well after a very short time in the Lotusscript debugger, I could see that the NotesUIWorkspace object does not get set from the preview pane. What I mean is that this line:
Set ws = New NotesUIWorkspace
...does not appear to work if the document is being opened in the preview pane. So the solution was simply to set 'uidoc' equal to 'Source', rather than trying to reference the CurrentDocument property of the NotesUIWorkspace object.
Yes, it was a quick fix, and I do need to revisit the code, but I'd thought I'd share...Oh, and if you are someone stuck supporting code I've written, you may want to check my code droppings :-) ...and, of course if I'd followed my own advice there would have been a meaningful and helpful error message instead of the generic one. D'oh! (1)
Friday 14th, May 2004
Anyone know how to add custom X header to outgoing Domino email
posted Friday 14th, May 2004
A gent with whom I used to work emailed another former cohort and me with this request:
Either of you smart boys know how to add a custom X header to an e-mail sent from a Domino client? I want to add a header as a flag for a third party SMTP relay to recognize and process.
I am useless on my own :-) ...so anyone have the answer? (4)
Tuesday 20th, April 2004
ND6: Design Replace Failed...
posted Tuesday 20th, April 2004
If, when doing a design replace (or refresh) in ND6, you get this error message:
Design Replace Failed, Cannot add role, maximum number of entries has been reached.
...The issue may be listed for you in the message, but it's sure not easy to see. The scenario I encountered was that work had been done to the design of an ND6 database. The design now referenced several new roles, and those roles had not been added to the ACL of the target database. The ACL has only 10 or 15 roles - well below the limit of 75 roles. But the above message would display when I tried to update the design. Using TeamStudio's Delta, I could see that the design DID, in fact, update.
The solution was to add the needed roles to the ACL of the target database, and then the design replace or refresh completes with no errors. Looking at each piece of the error message, my interpretation is this:
"Design Replace Failed" - not true. The design replace worked. The ACL was not updated, but I did not expect it to be updated.
"Cannot add role" - true. But so what? It's great that the update process seems to be smart enough now to analyze what roles might be needed, but if it's going to complain about it, I'd prefer it to be smart enough to ADD the role(s).
"maximum number of entries has been reached." - not true. We are nowhere NEAR the 75-role limit.
Perhaps this is an error message that is invoked if one attempts to update a design referencing non-existent roles (as I did), and maybe the same error message is invoked if one tries to exceed the 75-role limit.
Oh well. The bottom line is that I can avoid the error in the future and the database seems to be happy. :-) (2)
Monday 23rd, February 2004
Anyone have a 6.5 server to test *possible* bug?
posted Monday 23rd, February 2004
During my hours at Lotusphere (some folks had days; I had hours. Oh well :-) ...I did stop in to see one vendor with which I'd had a fair amount of contact. While chatting, the head of the company told me of what looked like a Domino 6.5 bug. Well, I don't have a 6.5 server, and don't have access to play with one (at least not one with the http task running). So if anyone can verify this bug or verify that this is at least not an issue on your server, please share the findings. I've searched the web and so far cannot find any mention of this, so it could be that 6.5 is too new for many folks to have hit the bug, or it could be that the bug does not exist! Here's the scoop on the possible bug (note I said possible! Often folks report "bugs" and it is then determined to be more a case of PEBCAK - Problem Exists Between Chair And Keyboard - although it was a pretty intelligent person reporting this problem to me):
Create or locate a database that is sitting on a web-enabled 6.5 server. From your browser, try to open a document using a URL in the format of http://database.nsf/viewname/keyValue ...where keyValue is the value from the first sorted column of the view. Normally Domino would open that document using the default action of ?OpenDocument, and I know I have coded many, many URLs without specifying the full URL. It just looks better to not have to have that ?OpenDocument hanging on the end of the URL, and gosh, our Domino URLs can get long enough as it is! Well, if this bug is for real, that shortened URL will give you an error page. Try the same URL on the same database from a server running a version of Domino prior to 6.5, and the shorter URL should work just fine. Typically you can specify any note in a database (remember that everything in Notes is a note - a view is a note, a page is a note, a document is a note, etc., etc.) -- typically you can provide enough info in the URL to identify the note, and Domino will take the default action on that note, without you needing to specify that default action.
So if you've got a little time and a 6.5 server, please do a little test and share the results. Thanks! (7)
Wednesday 8th, October 2003
notes:// protocol vs NDL files
posted Wednesday 8th, October 2003
Like many companies, we've had a need to link from intranet pages to locations to be opened in the Notes client. We've been doing that with NDL files, but the downside is that the poor user must click 3 times to get to the target content: once when they click on the initial link (that points to the NDL file), a second time in a dialog box to select the radio button to run the file from its current location, and then a third click on <OK> to finally get to the desired link. Oh, and none of that will even work if the user doesn't have the proper registry entries (email me if you need the registry settings to get NDL files to work).
I've tried using the notes:// protocol in URLs in the past, but testing turned up a large percentage of users for whom the link wouldn't work. So here's the secret. I've tested this with several versions of Notes from R5.0.6a up through R5.0.12 (I have not tested all of the versions in there, so do your own testing). The rest of the environment in which I've tested is Windows 2000 for the O/S and IE 5.x browser
To get the notes:// protocol to work, you need to tweak your Windows Registry a little (newer versions of Notes are supposed to add the registry settings during install). So here's a .reg file that you can download and simply run - after you edit it with Notepad to ensure that the entries point to your Notes program folder - and it should add the needed entries to your Registry.
Or to be safer, you can edit the Registry manually (after taking a Registry backup, of course!). Here are screen shots of the needed Registry settings: pic1, pic2, pic3, pic4, pic5.
Another nagging problem has been solved due to a post on Master Jake's Codestore site.
I've been having problems replicating with ND6. Tried 6.01 and 6.02 CF1 on server and client. Once in a great while, replication would work. The solution? Ensure that every entry in the ACL has the option checked for "Replicate or copy documents". Are you kidding me? OK, whatever. The bottom line is that this adjustment to the ACL does no harm (that I can see), and it fixes the problem. So I'm a happy guy.
One can learn a lot by viewing the html source generated by Domino. While I've developed a number of Domino apps, I've never needed to worry about the tab order of fields and buttons on a web form -- until now. I'd been asked to take a VB app and develop something similar that would run in a web browser and that would not involve DLLs and an install routine. I was able to do this with a Domino form and JavaScript, but since there was a very particular layout required, the default left-to-right and top-to bottom tab navigation of buttons and fields was not acceptable. I set the tab order for a few fields and then looked at the html that Domino generated.
DUH! I had never explicitly set the TABINDEX property. It turns out that even though Designer does not offer an up-front way to set the tab order of buttons, we can do this by simply setting the TABINDEX property on the HTML tab of the item properties box for each field and button on the form. I was able to quickly set the tab order to exactly what was required.
Just another simple discovery that makes life easier. (2)
Thursday 27th, March 2003
Domino: Getting textarea effect from text field
posted Thursday 27th, March 2003
Followup to earlier post about using STYLE properties to control the rendering of textareas: Chris Toohey pointed out to me that by setting a couple of field properties, one can get the same textarea effect while using a regular old text field (no richText required). Pretty cool. So here's what to do:
Set the field to be regular ol' text, and select the 'Allow multiple values' option on the first tab of the properties box.
Next go to the 'Advanced' tab - the propeller beanie cap tab, and set both Multi-Value Options to 'New Line'.
The final step is to go to the HTML tab and specify your STYLE properties, just as I'd suggested in yesterday's post.
This lets you enjoy the ease of working with regular text fields (no @Abstract or item.text needed), while also having whatever size field you want along with scroll bars and word wrap.
My preferred approach to design and coding is to first decide how the interface should appear and behave, and THEN figure out how to make it happen.
One of the thorns in my side when I first tried using a richText field on the web a couple of years ago was the challenge of controlling the look of the generated textarea. The default textarea from Domino is 7 rows by 50 columns, and (as I recall) is Times or Courier. The default size is never what I really want, and I tend to develop pages that display Verdana or other sans-serif font.
Solution: Use STYLE parameters. A couple of years ago I would put ROWS and COLS parameters in the 'Other' portion of the Field's HTML tab. Now I prefer to specify settings in the 'Style' area of the same tab:
For a recent app, the settings I used for one richText field were height:78px; width:250px; font-family: Verdana, sans-serif;
Here's how the richText field renders as a textarea before using the STYLE settings:
...and here it is after:
In this case, I had some other CSS that was also ensuring that the text came in as Verdana, so I got a bit redundant on the HTML tab.
In a similar vein, folks will often have a field located within a table or DIV. In this case, I think the easiest way to allow the richText area to render as a textarea that uses the maximum available width, is to simply include a STYLE 'width' parameter set to 100%: width:100%;
Of course, in the best tradition supporting the notion of the cobbler's children with no shoes, you may notice that there are several parts of this site that could use a bit of cosmetic attention. All in time...all in time. (6)
Sunday 23rd, March 2003
CSS
posted Sunday 23rd, March 2003
(Hmmm....the espresso must be in the bloodstream, 'cause the fingers keep typing :-) CSS (Cascading Style Sheets) are in use, at least to a degree, on more and more sites. This is pretty much required if one wishes to approach a goal of separating content from presentation. In the USA, the Rehabilitation Act's Section 508 requires Federal agencies to make their web sites accessible to those with disabilities. This would include designing the site to be compatible with software that 'reads' the site for folks who are visually impaired. More on theories of usability is available at Jakob Nielsen's site.
As for me, I see that the folks who have graciously offered Domino blog templates (BlogSphere, CodeStore, DominoBlog, and FreeDom Blog - on which this site is currently based) have all used CSS to some or large degree. On my own site, one of my goals is to completely get away from the use of tables for formatting, unless I am presenting true tabular data (row/column stuff).
So, as a start, a week or so ago I changed my About page to use only CSS for the presentation, instead of tables. I've used tables for years to control the presentation of data within Notes client documents and pages, Domino pages, and 'regular' web sites. Part of that is from having FrontPage at work and at home (NetObjects Fusion at home before that), and it's just so easy to use the WYSIWYG editors to get a page looking how you want. But if you look at the generated html, it's a mess! There are font tags and all kinds of junk strewn throughout the page. While FrontPage (and I'm guessing most other web tools) have provisions for CSS, if one simply opens the tool and starts building a page, what you end up with is heavy use of tables and heavy use of the HTML4-deprecated font tag.
My first html editor was Notepad and that's still the editor I use the most. When using FrontPage, I tend to use the html tab to type or paste in my html (after first deleting the stuff that FrontPage puts in there), and then use the preview mode to check how it's looking. Even easier is using my favorite JavaScript editor, Antechinus, plopping the html in there, and doing a preview.
With the studying I'm doing, and all the stuff going on at work, no guarantees just how soon I'll meet my goal of a site devoid of tables, a site with ALT text equivalents for all images, etc.,etc........but it will happen. (0)