Friday, January 29, 2010

Show Single Category (double Category) Lookup in Xpages Views

If we need to do a show single categories in XPages it is easy to do. The "CategoryFilter" in the data session will help to do that. But to make a double filter we need to do a little tweek with Search.

Single category(Category Filter) in Xpages:
  • Create a view with first column "sorted"(let me call the view as "xview")
  • Create an Xpage

  • Create a combo box in the Xpage and write the code to get the value of 1st column of the created view(xview)
  • Create a view control and map the newly created view (xview)
  • Neglect the 1st column in the displaying of view, since we don't need that.
  • Select the "CategoryFilter" Property and give the code "sessionScope.get("urchoice");" //This line of code is getting the value of the session scope variable and set the views property inorder to show the Single Category value from view.


  • Now write the code in the "combobox" in the onclick / on change and code the script "sessionScope.set("urchoice",getComponent("comboBox1").getValue()); //This line will get the selected value of the combobox and set in the sessionscope variable.
  • Now run the Xpages and see the "ShowSingleCategory" in the Xpages.

How can we create a Double Category that means filtering the view with Two Field values:


  • Remember to  index the database first
  • Create a view with first and second column "sorted"(let me call the view as "xview")
  • Create an Xpage
  • Create two combo box(s) in the Xpage and write the code to get the value of 1st column in the first combobox and 2nd in the second combobox of the created view(xview)
  • Create a view control and map the newly created view (xview)
  • Neglect the 1st 2 columns in displaying of view, since we don't need that.
  • Now create a Button in the Xpage called "Go" or "Submit", change the Button type to "Submit" (from properties)
  • Tie up the combobox value with the session scope and give the variable name (need to do for both combobox)


  • Select the view and select the "Search" (from properties) and write the code to get the correct documents in the view

This is a workaround for the double Filtering in the Xpage. This is a solution for the search also in Xpages.

Best way to handle ?ReadViewEntries for Lookup

?ReadViewEntries allows a view to be represented purely as XML.
Think about the a view contain more that 10k documents, it will be difficult to get the return value in for the use of Ajax DbLookup. This will sometime return you only specific values not all the values as you expect if you give the "count" parameter as well. As a work around rather than using the &Count parameters use, get the value you need to lookup and pass "&StartKey=valuetolookup&StartType=text", this will result you a faster search with only needed value(s).

The other optional parameters for the ?ReadViewEntries are

Collapse=n

CollapseView

Count=n

Expand=n

ExpandView

KeyType=text|time

ResortAscending=column number

ResortDecending=column number

RestrictToCategory=category

Start=n

StartKey=string

UntilKey=string

Thursday, October 1, 2009

Prayer's for Thekkady boat mishap

This is shocking news for all. The people who went to enjoy there vacations are in deep trouble due to the boat capsizes. This is not the time for the debate or to get in to talks, it time to rescue the people and to Pray for there families who lost there lives..... Let’s take some time in our silent prayers for them...



Afterwards the Govt can really think about the measures can take for the security purpose.
First let us PRAY for there family.

Wednesday, September 23, 2009

Ambulance fact

While I was driving last morning through the city, suddenly heard the sound of an Ambulance, It was nearing a manual signal. I turned back and saw that it is struggling to overcome the traffic in other lane, Most of the vehicles are giving side to the ambulance vehicle as they can and attempting to make sure that the vehicle keeps moving, suddenly I saw one of the MTC bus is not at all giving respect to the emergency. I felt really guilty on that time about our society commitment.

I remembering an article named "Yoga Classes for MTC drivers" from the news paper last day, let us see in the future will the "Yoga classes" help to improve the MTC's commitment. Don't think that all the drivers are like that, but very less are, this is a reality.

Saturday, September 19, 2009

Another good poem I found - Love's Vortex

Where would I be, my lovely one,


If you were no longer here,

With your tinkling laugh,

Like shards of bright coloured glass,

Tumbling through life's stormy winds.

Where would I be, without your love,

Given so freely and true,

A love that has brightened my life,

Through all, thick and thin,

Like a sun rise, across the sea.

Since the moment we met,

My love has held true,

Even now it burns deep within.

As if some heavenly flame,

Had ignited my heart,

The day I first saw you,

And knew that our love would begin.

My one greatest wish, is to be with you,

Forever, sharing our love,

With our highest emotions,

Like a bird on the wing,

Flying so high and so free.

I will always be yours' alone,

As long as you still want me.

What man could ever wish for more,

Than to be by your side, with the warmth of your love,

As through the vortex of life we soar.
 
----------------------
 
This is a good poem that I have seen. By JOHN Roberts

Tuesday, June 23, 2009

Symphony 1.3 Vs X format of MS (DOCX)

Office 2007 Makes life easy for people who has 2007 package installed in there computers, People who sends the document will send as DOCX file format and that will kill opening the document in word 2003. I agree there are some good features available in the computer.Lotus Symphony 1.3 came with the capability of opening the DOCX format. Since it is free from IBM now every one can read if your friend send a document in DOCX format. Lotus symphony is cool as IBM ;)

Wednesday, May 20, 2009

Touching Rain ;)

After a long time, the rain come down to the town. It was very happy to see the showers of rain. Riding in rain is excellent, the drops are hitting like stones on the body, really a cooling effect for the mind. Driving through the rain is really bad for health, I know, but the unexpected rain allows me to do that and that makes the day very happy. Really a touching one ...

Tuesday, May 5, 2009

Error Notification in Lotus Designer (8.5)



I was quite surprised with the icon of the application displayed in the lotus notes designer 8.5. But it was interesting and simple. With the database icon I got addition red error symbol, (same as error in a Eclipse project). If you see that please go and check in the problems view that is available in the designer.

Monday, May 4, 2009

Notes Exception

Last day I got into a Exception "Notes Exception : The document is already exist in the collection".
This was a unfamiliar exception for me, and I am happy that google didn't give me answer for that.

LotusNotes usually give a loot of exception, but this was different from that. The problem was with NotesViewEntryCollection and NotesDocumentCollection. One of the Program was trying to convert NotesViewEntryCollection to NotesDocumentCollection directly by getting the viewentry and using the method .add() to NotesDocumentCollection. I dont know why that result the above error, may the problem of the implementation as well.

I believe that Direct casting(Convertion) of Domino objects are not so efficient as Java

Saturday, April 25, 2009

Why posts are less

I am thinking last day why my blog has no posts, I thought becuase my dear friend asked me "Hey, Why are you not writing anything in your blog?", the silent answer was No time to write (utter nonsense), the original reason was lazy,

Let me start with this post and redesigning of the my blog ..