Showing posts with label Xpages. Show all posts
Showing posts with label Xpages. Show all posts

Tuesday, February 2, 2010

Xpages - Data palette issue


When I try to bind an existing form as a data source in the xpage, almost none of the existing forms will display their list of fields in the data palette.

The execution environment is my laptop configured with the domino 8.5 and the client side is Notes 8.5.1 running on Windows xp professional













I am using a copy of the names database.
I have removed all the alias names (Contact | Company | Person) of the form . I kept to single name as "Person". Then I populated the data in the Xpage, By doing this amazing my data pallette is populated with all the form fields. Now I am able to wrap the fields into the Xpage. ( This I have done in 8.5 server and 8.5.1 client ).

Possible causes :

The happens due to because of conflicting of the form names or aliases with other form names or aliases in the database .


- Narasimha Reddy , Lomadi

Monday, December 21, 2009

Sorting a Notes Document Collection in Java

As I searched in net and could not find a sorted document collection in Java, basically it is available in lotus script. So I rewritten the same in Java.

I written a class by name sortCollection with methods on this like

GetEmptyDocumentCollection,
SortDocumentCollection ( the function takes a document collection as its argument and returns a sorted document collection in assending order).

class SortCollection {
Session session;
AgentContext agentContext;
Database currentDB;
SortCollection() throws NotesException
{
try {
session = NotesFactory.createSession();
agentContext = session.getAgentContext();
currentDB = agentContext.getCurrentDatabase();
} catch( NotesException e) {
throw e;
}
}
// gets an empty notes document collection

public DocumentCollection GetEmptyDocumentCollection() throws NotesException
{
DocumentCollection dc = currentDB.getProfileDocCollection("xxxxxxx");
try
{ if(dc.getCount() > 0 )
dc.removeAll(true);
return dc;
} catch( NotesException e) {
throw e;
}
}
// this method takes a unsorted notes document collection and returns a sorted collection.
public DocumentCollection SortDocumentCollection (DocumentCollection dc ) throws NotesException
{
System.out.println("SortDocumentCollection process Started");
try
{ int count;
count = dc.getCount();
if( count <= 1)
return dc;
Document docs[] = new Document[count];
Document loopDoc;
loopDoc = dc.getFirstDocument();
int i = 0;
while (loopDoc != null)
{
docs[i] = loopDoc;
loopDoc = dc.getNextDocument(loopDoc);
i= i+1;
}
Document outerLoopDoc;
Document innerLoopDoc;
DateTime outerLoopDocLastModDate;
DateTime innerLoopDocLastModDate;
for( int j=0; j <>
{
outerLoopDoc = docs[j];
for(int k=0; k <>
{
innerLoopDoc = docs[k];
innerLoopDocLastModDate = innerLoopDoc.getLastModified();
outerLoopDocLastModDate = outerLoopDoc.getLastAccessed();
if( innerLoopDocLastModDate.timeDifference(outerLoopDocLastModDate) > 0 )
{
Document tempDoc;
tempDoc = docs[j];
docs[j]= docs[k];
docs[k] = tempDoc ;
}
}
}
DocumentCollection returnDocColl;
returnDocColl = GetEmptyDocumentCollection();
for(int j=0; j
returnDocColl.addDocument(docs[j]);
System.out.println("SortDocumentCollection process Finished");
return returnDocColl;
} catch( NotesException e)
{ throw e;
}

}
}
- Narasimha Reddy, Lomadi

Generating a CSR with Java keytool , deploying the certificates in keystore and configuring the same in the tomEE server.

  Deploying security certificates is a three-step process in general 1. CSR Generation 2. Importing the certificatates into the keystore 3. ...