Domino Code Fragment
Code Name* DocumentContext property | Date* 04/29/2024 | Source (or email address if you prefer)* Rlatulippe@romac.com IP address:.18.217.208.72 | |
Description* This example prints the value of the Text field of the in-memory document. | Type* Java | Categories* (Misc) |
Implementation: | Required Client: | Server: |
Limitations: | Comments: |
public class documentcontextagent extends AgentBase
{
public void NotesMain()
{
try
{
Session s = getSession();
AgentContext ac = s.getAgentContext();
Document doc = ac.getDocumentContext();
if (doc != null)
{
Vector v = doc.getItemValue("Text");
System.out.println
("Value of 'Text' in document is "
+ v.toString());
}
else System.out.println("No document context");
}
catch (Exception e)
{
e.printStackTrace();
}
}
}