I have finally made the jump to including Java in my notes developement, but I am meeting one challenge.
I have not figured out how to either store on a form the java returned value to a particular field or grab from the java field in lotus script. This makes my save a little useless as the values are not captured.
Can anyone provide me an example or point me in the right direction… I have exhausted my sources… so any pointers would be appreciated.
Subject: Trapping a Java value in Lotus Script (field)
Can you explain a bit more about this bit… “I have not figured out how to either store on a form the java returned value to a particular field or grab from the java field in lotus script.”
If you are writting Java agents then creating/reading Notes Items is almost identical to LS.
To create an item use doc.replaceItemValue( “MyField”, “My Value” ).
To read the value use something similar to doc.getItemValueString( “MyField” )
Subject: RE: Trapping a Java value in Lotus Script (field)
What I am attempting to use is a Datepicker on a Form which is almost completely LS. The JS that I am using has been saved as GCappearance.js and GurtCalendar.js.
I have a field called DateLaunch which is a of notesdate/Time type - hidden.
I then have java script above this field as follows:
Subject: RE: Trapping a Java value in Lotus Script (field)
Um… the first question is what does this have to do with Java? Javascript and Java are two completely different languages. You write a value to a field in javascript using the following technique:
frm.field.value = “fieldvalue”
where frm is a variable defined in the onLoad event as
frm = window.document.forms[0];
and field is the name of the field on the form you are writing to (note that the name is case sensitive, javascript shares this with the java language). define the form variable in onLoad so that it may be referenced by all of your code throughout the form.
I also wouldn’t spend a lot of time building a date picker from scratch unless you are doing it as an intellectual excersize. There are dozens of them out there, many freeware. Dynarch’s is excellent, widely used, and well-documented.