358 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Jobs | Twitter | Bookmarks | Pods | Forum | Blogs | Search | myPL | About 
 
Latest 7 Posts
DDN unresponsive - who to go to for Domino hosting?
Tue, Aug 24th 2010 67
Importing a text file by line position
Mon, Aug 9th 2010 66
Cheating for CheckBoxGroup/RadioButtonGroup validation
Tue, Aug 3rd 2010 99
Breaking my head: value from a checkbox
Mon, Jul 26th 2010 151
I hate the new Designer Help
Wed, Jul 21st 2010 200
Contigent validation: if other you must describe
Wed, Jul 21st 2010 92
Put any number of columns in a CheckBoxGroup
Thu, Jul 1st 2010 121
Top 10
I hate the new Designer Help
Wed, Jul 21st 2010 200
Use (image) resource in Java
Thu, Jan 28th 2010 191
XPages have tighter security
Tue, May 4th 2010 175
Get the text from a pop-up
Thu, Mar 25th 2010 161
Great Tutorial for creating PDFs with iText
Wed, Jan 27th 2010 154
Breaking my head: value from a checkbox
Mon, Jul 26th 2010 151
XPage Error Logging using NotesLog
Wed, Jun 30th 2010 148
2 Column CheckBoxGroup
Tue, Jun 29th 2010 146
Startkey= for XPage views? Is there one?
Wed, May 19th 2010 135
Quickly find agent errors
Tue, Mar 23rd 2010 125


Breaking my head: value from a checkbox
Brian M Moore    

div Ive been breaking my head trying to get a value out of a checkbox for validation, i.e. before submission to the server. For a variety of other fields, I can get it via the client call like: /divdivblockquotefont color=#4169e1var cName = document.getElementById(quot;#{id:checkBox1}quot;).value;br /if(cName == quot;quot; || cName == null) {br /    alert(quot;Please check a box. quot;);br /    return false; br /}br //font/blockquoteBut this just isnt working. Im not getting any value at all. Here is my checkbox: br //divblockquotediv   font color=#4169e1 lt;xp:checkBox text=quot;This document does not have an original datequot;br /        id=quot;checkBox1quot; value=quot;#{viewScope.dateEscape}quot; defaultChecked=quot;falsequot;br /        immediate=quot;truequot;gt;br /        lt;xp:this.checkedValuegt;lt;![CDATA[quot;No datequot;]]gt;lt;/xp:this.checkedValuegt;br /        lt;xp:this.uncheckedValuegt;lt;![CDATA[quot;Datequot;]]gt;lt;/xp:this.uncheckedValuegt;br /        lt;xp:this.onchangegt;lt;![CDATA[#{javascript:viewScope.put(quot;dateEscapequot;,getComponent(quot;checkBox1quot;).getSubmittedValue());}]]gt;lt;/xp:this.onchangegt;br /        lt;xp:eventHandler event=quot;onclickquot; submit=quot;truequot; refreshMode=quot;completequot;gt;br /        lt;/xp:eventHandlergt;br /    lt;/xp:checkBoxgt;/font /div/blockquotediv /divdiv I just cant seem to get a value from the client side with the code above. Ive been doing variations on full and partial refresh,  but to no avail. Ive also tried putting the value into a viewScope, or not. In my mind, this is something that should act like Input Validation in classic Notes development. /divdiv /divdivIn the process Im working on, the checkbox will be in a custom control that is asking for a date, and if there is no date for the user to check the box, so there is  no question as to the intent. I dont want to save the doc at this point, as there is another custom control that will let them upload a file and save it. But with the workflow, I want to get the date/no date nailed down first. Im using strikeHide/Whens/strike err Visible to  make a simple wizard like interface. So I want to see if I have a value in either the date field or this checkbox before going to the next step. I posted on a href=http://www.bleedyellow.com/blogs/roller-ui/authoring/weblog.do?entryId=50228446-c514-4cbe-a1ab-efa95f205ce6amp;method=editamp;lang=encontingent validation/a, but the code that where there doesnt seem to work and I cant figure out why. If anyone has any suggestions, please tell me, otherwise well have to be calling the kings horses and the kings men./divdiv /divdivCheers,br /Brianbr / /div

---------------------
http://www.bleedyellow.com/blogs/DominoHerald/entry/breaking_my_head_value_from_a_checkbox5
Jul 26, 2010
152 hits



Recent Blog Posts
67


DDN unresponsive - who to go to for Domino hosting?
Tue, Aug 24th 2010 1:26p   Brian Moore
div For the last several years, Ive used the Domino Developer Network to host my personal Notes apps. Overall, Ive not had any problems. Support requests werent answered in 2 seconds, but since they werent critical, I got decent responses - except for the one time the request got lost entirely./divdiv /divdivLast month, however, I created some new XPage apps and moved them up. When I tried them from a browser, they didnt work. A little troubleshooting showed that quot;.xsp is not recognizedquo [read] Keywords: domino notes network server
66


Importing a text file by line position
Mon, Aug 9th 2010 6:29p   Brian Moore
 One of the ways of getting data from other systems is via a flat file, without delimiters, but using the line position. This does eliminate the problem of the delimiter being used in the text, but isnt very human readable (not that it needs to be). I was recently asked to set up an import for this type of text file. Ive done similar imports before, but this one has a whole lot of fields. I started as I normally do, setting up the Notes form, I had a view to check my data, and then I started do [read] Keywords: agent dxl lotusscript notes database
99


Cheating for CheckBoxGroup/RadioButtonGroup validation
Tue, Aug 3rd 2010 6:30p   Brian Moore
 Checkboxgroups and Radiobuttongroups are not fully implemented in XPages. By this I mean that not only are they relegated to quot;Otherquot; in the controls, but they dont have the drop-and-use aspects of the other controls. These are pretty important controls, and I can only image that they will be more robust within a few releases.br /br /One of the problems is that there isnt an easy way to validate these when used. There are a couple of posts out there, including a really great set by a hr [read] Keywords: notes xpages javascript
152


Breaking my head: value from a checkbox
Mon, Jul 26th 2010 5:27p   Brian Moore
div Ive been breaking my head trying to get a value out of a checkbox for validation, i.e. before submission to the server. For a variety of other fields, I can get it via the client call like: /divdivblockquotefont color=#4169e1var cName = document.getElementById(quot;#{id:checkBox1}quot;).value;br /if(cName == quot;quot; || cName == null) {br /    alert(quot;Please check a box. quot;);br /    return false; br /}br //font/blockquoteBut this just isnt working. Im not getting any value at [read] Keywords: notes xpages bleedyellow bleedyellow.com development interface javascript server
200


I hate the new Designer Help
Wed, Jul 21st 2010 5:24p   Brian Moore
 Im not trying to start a flame war here, but I cant ever seem to find anything in the new quot;helpquot; that comes in Designer. The instant case in point is that Im trying to find a way to conditionally validate a date/time field in XPages. Im using the quot;Date Time Pickerquot; custom control. I want to see some of the properties so I can try to determine why an empty, untouched field returns a value of  quot; on quot; when tested. So I try the new quot;helpquot; in Designer. I go to the i [read] Keywords: connections notes sametime xpages bleedyellow bleedyellow.com database development properties
92


Contigent validation: if other you must describe
Wed, Jul 21st 2010 9:23a   Brian Moore
In traditional Notes development, its a fairly simple thing to only require a value in field quot;Bquot; if field quot;Aquot; has a certain value. I use this when I give people an opportunity to select quot;Otherquot; for some reason: I then require to know what the quot;Otherquot; is. Im working on this for a XPage, but where its even easier there than in traditional Notes to put in some validation, I couldnt find an example of how to require a second field only if a previous field had a certai [read] Keywords: dblookup lotusscript notes xpages development javascript openntf server
121


Put any number of columns in a CheckBoxGroup
Thu, Jul 1st 2010 6:24p   Brian Moore
 a href=http://www.bleedyellow.com/blogs/DominoHerald/entry/2_column_checkboxgroup14?lang=en_usThe other day I blogged about created a CheckBoxGroup with two columns/a. Being able to configure CheckBoxGroups (and RadioButtonGroups) are not in the current release of XPages. My solution was to populate two sessionScope variables with alternating entries from a view column, then have each of two CheckBoxGroups display the values from their variable. My first call for this was for two columns, but [read] Keywords: xpages bleedyellow bleedyellow.com javascript xml




148


XPage Error Logging using NotesLog
Wed, Jun 30th 2010 12:28p   Brian Moore
 I use the NotesLog a lot with my LotusScript work, and Ive gotten very used to having the NotesLog to help me pinpoint problems. The new XPages JavaScript functions have the same (or similar) capability, but Ive not seen strikemany/strike any posts on this method. So I started kicking it around a bit. The code snippet below is a basic bit that works according to my limited testing so far. The quot;sessionquot; is the default session given when you start your code, and the name is something to [read] Keywords: lotusscript xpages javascript
146


2 Column CheckBoxGroup
Tue, Jun 29th 2010 1:25p   Brian Moore
 One of the things XPages are currently missing is a simple control for radio or checkboxes. There are other controls for them, but they arent very robust yet. What I mean by that is you cant easily specify to have several columns that match up, you can have them all go horizontal or vertical, but Im working on a process and Id like to have the checkboxes spread out over two columns. After some experimentation, I finally created two checkbox groups, one in each cell of a table, the problem them [read] Keywords: xpages bleedyellow bleedyellow.com javascript xml
106


Hide-When printed in XPages
Wed, Jun 23rd 2010 3:27p   Brian Moore
 XPages use quot;Visiblequot; rather than Hide-When, and like traditional Hide-Whens, you can put in a value to compute. But I didnt find one for the traditional quot;Hide when printedquot; from the Notes Client. Im working on a XPage where there is a button to call up a dialog box, and I naturally dont want that button printed up. After some digging and experimentation, Ive found a way to hide things when printed. The function is done via a CSS, so here is the bit to put in:br /blockquoteblock [read] Keywords: notes notes client xpages bleedyellow bleedyellow.com css firefox properties




Created and Maintained by Yancy Lent - About - Blog Submission - Suggestions - Change Log - Blog Widget - Advertising - FAQ - Mobile Edition