(Continuation of "Getting Married Part-V")
“So, when are you getting married?” asks Bhavana.
“Do I have to?” I reply.
I look at the expression of disbelief and shock in her eyes.
“How can you talk like this?” she asks, “Is it a case of love-failure?”
Now it was my turn to be shocked.
“Does it have to be a love-failure, when a person decides not to marry?” I retort back.
“Well, that’s what happens in most of the cases.”
“I don’t agree with you.”
“Then tell me the reason why you don’t want to get married,” she starts pulling my leg.
Instead of answering her, I ask, “Why do I need to give you an explanation?”
Before we could argue any further, I get a call on my extension and Bhavana gets back to her cubicle.
“Hello?” says a very familiar voice.
“Yes Radhika.”
Why do I not show my anger on her? She ditched me, her childhood mate, for her 6-months old fiancé; yet I don’t scream and shout at her. Why?
“Are you busy sweetheart?” she asks with a hesitation in her voice.
I am reminded of the time when she wanted to borrow my skirt for a fancy-dress competition, when we were in our primary school. There was the same hesitation, the same quivering in her voice. We were such close pals that everyone in our class would wonder why their friends were not that understanding. All my anger melts away and all that I remember is the shy smile of a sweet girl of five.
“I am in the office, Radhika,” I reply, “How are you?”
“I… I am fine,” she says and then words tumble out in a flood, “Could you… Could you do me a favour?”
“Of course dear!”
“There is absolutely no balance in my cell phone. I was wondering if you could go out and buy a re-charge card for me and sms me the 10-digit code number.”
“Where are you?”
“I’m in a bus traveling from my aunt’s place to home.”
“Is it that urgent?”
“Hmm… I just checked my balance; it’s just ten rupees. It’s will take me an hour to reach home. Meanwhile I thought I could talk with Siddhu…”
The mere mention of her fiancé makes me feel frustrated. I want to end the call as soon as possible.
“Why don’t you ask him to get a recharge card for you?” I ask
“No… No… How can I do that?”
“He’s after all, your fiancé.”
“I can’t do that,” she exclaims, “What will he think of me?”
“Oh come on! You are going to spend the rest of your life with him.”
“You will not understand!” she shouted and cut the connection.
I wonder what I will not understand. Radhika stopped finding time to be with me since so many days and now when I thought she had called to talk with me, all I get to hear is: Another help required! Am I a departmental store or a personal assistant to get things done for anyone? I also have feelings. Just because I don’t call her, it does not mean that I don’t have any feelings for her. It hurts not to be with her, not to share my thoughts with her, not to talk with her… But all that she is bothered about is her Siddhu!
He is going to be her husband; yet she is uncomfortable asking him for a small help. Is she mad? Why does she need to keep pretences with her closed one? She did not bat an eyelid before she called me to ask. How mean of her! Why do people take others for granted! Why do they not realize that even others need love and affection? They feel terrible when someone uses them and then forgets all about them…
A voice cuts into my thoughts.
“Back to your dreamland?” asks Bhavana giggling, “It’s lunchtime.”
“Give me a minute,” I cry, “I need to rush the restroom!”
While I hurry, she calls me back saying, “I am still eagerly waiting to know why you don’t want to marry.”
(To be continued in "Getting Married Part-VII")
Search
Monday, April 28, 2008
Sunday, April 27, 2008
Bundled Messages in OA page, the solution
Thanks to Manoj.. Or Should I say, Lalith :-)
I found the solution to the problem.
The Solution:
1) Import the following Java classes
import com.sun.java.util.collections.ArrayList;
import oracle.apps.fnd.framework.OAException;
2) Create the following methods in the AMImpl.java file:
private void addToBundle(Exception ex)
{
ArrayList a = (ArrayList)getOADBTransaction().getTransientValue("BUNDLEDEXCEPTION");
if (a == null)
a = new ArrayList();
a.add(ex);
getOADBTransaction().putTransientValue("BUNDLEDEXCEPTION",a);
}
public void showBundledMsg()
{
ArrayList a = (ArrayList)getOADBTransaction().getTransientValue("BUNDLEDEXCEPTION");
getOADBTransaction().putTransientValue("BUNDLEDEXCEPTION",null);
if( a != null)
{
throw OAException.getBundledOAException(a);
}
}
3) Usage in AM methods:
Whenever there is a validation error, instead of doing a "throw new OAException()", do a "addToBundle(new OAException());". Also use a boolean flag say "showMsg" and set it to true whenever a validation error occurs.
if(SomeValidationError)
{
OAException msg = new OAException("XXTMG", "XXTMG_PV_VALID_FULLSKIDQTY", null,OAException.ERROR,null);
addToBundle(msg);
showMsg=true;
}
Finally when all the checking for validations is done, cheack the value of "showMsg". If it is true, call the "showBundledMsg" AM method
if(showMsg)//Some of the values entered into the OA page are incorrect
{
showBundledMsg();
showMsg=false;
}
Well, that solves our problem! :-)
I found the solution to the problem.
The Solution:
1) Import the following Java classes
import com.sun.java.util.collections.ArrayList;
import oracle.apps.fnd.framework.OAException;
2) Create the following methods in the AMImpl.java file:
private void addToBundle(Exception ex)
{
ArrayList a = (ArrayList)getOADBTransaction().getTransientValue("BUNDLEDEXCEPTION");
if (a == null)
a = new ArrayList();
a.add(ex);
getOADBTransaction().putTransientValue("BUNDLEDEXCEPTION",a);
}
public void showBundledMsg()
{
ArrayList a = (ArrayList)getOADBTransaction().getTransientValue("BUNDLEDEXCEPTION");
getOADBTransaction().putTransientValue("BUNDLEDEXCEPTION",null);
if( a != null)
{
throw OAException.getBundledOAException(a);
}
}
3) Usage in AM methods:
Whenever there is a validation error, instead of doing a "throw new OAException()", do a "addToBundle(new OAException());". Also use a boolean flag say "showMsg" and set it to true whenever a validation error occurs.
if(SomeValidationError)
{
OAException msg = new OAException("XXTMG", "XXTMG_PV_VALID_FULLSKIDQTY", null,OAException.ERROR,null);
addToBundle(msg);
showMsg=true;
}
Finally when all the checking for validations is done, cheack the value of "showMsg". If it is true, call the "showBundledMsg" AM method
if(showMsg)//Some of the values entered into the OA page are incorrect
{
showBundledMsg();
showMsg=false;
}
Well, that solves our problem! :-)
Friday, April 25, 2008
Bundled Messages in OA page
Problem:
Suppose an OA page has three fields:RollNo, Name, Rank and a Submit button.
The form requires the following validations:
1) RollNo should be an integer
2) Name should be a string
3) Rank should be an integer.
When Submit button is clicked, the code in the controller is called. Here we first check the value in RollNo field, throw an Exception if it has an invalid value. Then we verify the Name field and throw an OAException, if an invalid Name is entered and lastly we validate the Rank field for invalid entry.
Suppose the user has entered wrong value into all of the fields. When he/she clicks on Submit button, then first the error message related to the RollNo field is displayed ("RollNo has to be an integer. Please enter an integer in the RollNo field.") The user enters an integer to the RollNo field and hits on Submit.
Again he sees the error related to the name field ("Name has to be a valid String. Please enter characters only into the Name field") He does accordingly and hit submit for another time.
Another error message is displayed. This time, it is related to the Rank field on the OA page.
Instead of making the user hit Submit three times, is there a way in which we can display all the error messages in one go?!
Solution:
Thanks to Manoj.. Or Should I say, Lalith :-)
I found the solution to the problem.Will post it soon! :-)
Suppose an OA page has three fields:RollNo, Name, Rank and a Submit button.
The form requires the following validations:
1) RollNo should be an integer
2) Name should be a string
3) Rank should be an integer.
When Submit button is clicked, the code in the controller is called. Here we first check the value in RollNo field, throw an Exception if it has an invalid value. Then we verify the Name field and throw an OAException, if an invalid Name is entered and lastly we validate the Rank field for invalid entry.
Suppose the user has entered wrong value into all of the fields. When he/she clicks on Submit button, then first the error message related to the RollNo field is displayed ("RollNo has to be an integer. Please enter an integer in the RollNo field.") The user enters an integer to the RollNo field and hits on Submit.
Again he sees the error related to the name field ("Name has to be a valid String. Please enter characters only into the Name field") He does accordingly and hit submit for another time.
Another error message is displayed. This time, it is related to the Rank field on the OA page.
Instead of making the user hit Submit three times, is there a way in which we can display all the error messages in one go?!
Solution:
Thanks to Manoj.. Or Should I say, Lalith :-)
I found the solution to the problem.Will post it soon! :-)
Thursday, April 24, 2008
Quoting John le Carre
Coming home from very lonely places, all of us go a little mad:
whether
from great personal success,
or just an all-night drive,
we are the sole
survivors of a world
no one else has ever seen.
- John le Carre
Wednesday, April 23, 2008
How to check if the user has entered an integer or a float value using Java?
I realized that Java does not provide any standard library method like isInteger() for the verification.
I came upon two good methods for checking if the user has entered an integer value or float value.
Solution 1:
--------------------------------------------------------------
String enteredNumber = "6.234";
double d=double.parseInt(enteredNumber);
if (Math.floor(d)==d) {
// d is an integer
}
else
{
// d's not an integer
}
--------------------------------------------------------------
Solution 2:
--------------------------------------------------------------
String enteredNumber = "6.234";
try {
int v = Integer.parseInt(enteredNumber);
valid = true;
// it's an integer
} catch(NumberFormatException e) {
valid = false;
//it's not an integer
}
--------------------------------------------------------------
I came upon two good methods for checking if the user has entered an integer value or float value.
Solution 1:
--------------------------------------------------------------
String enteredNumber = "6.234";
double d=double.parseInt(enteredNumber);
if (Math.floor(d)==d) {
// d is an integer
}
else
{
// d's not an integer
}
--------------------------------------------------------------
Solution 2:
--------------------------------------------------------------
String enteredNumber = "6.234";
try {
int v = Integer.parseInt(enteredNumber);
valid = true;
// it's an integer
} catch(NumberFormatException e) {
valid = false;
//it's not an integer
}
--------------------------------------------------------------
To get the fractional portion of a number in Java
Problem:How do to get the fractional portion of a number in Java?
Suppose we have a number 4.56.
We need to get 0.56(fractional part) of it.
Solution:
double fraction(double d) {
if (d >= 0)
return d-Math.floor(d);
return d-Math.ceil(d);
}
Thanks to this link:
http://forum.java.sun.com/thread.jspa?threadID=752735&messageID=4301382
Suppose we have a number 4.56.
We need to get 0.56(fractional part) of it.
Solution:
double fraction(double d) {
if (d >= 0)
return d-Math.floor(d);
return d-Math.ceil(d);
}
Thanks to this link:
http://forum.java.sun.com/thread.jspa?threadID=752735&messageID=4301382
Tuesday, March 25, 2008
Farewell to S10
For the past 2 years, S10 has been my second home. I think I must have spent more here rather than at my home. :-)
As all things are prone to changes, so is my location. Our project has been shifted to Campus and from tomorrow, we will be working from Campus.
This sudden change is making me feel very insecure and restless, I don't know why.
For the past two years, S10-4F10 has been the adda for most of our NCG-10 ppl... For the guys working in non-S10 locations, this location has been the baggage counter(cloak room).. By 6PM, my desk has been decorated with your bags, jerkins, helmets etc. etc. Most of you have used my system at some point or the other, for sending mails or to play games or to copy photos using USB ;-)
But from now on, this desk, this location will be used by someone else. S10-4F10 has been my location but now I will have to leave it for someone else to occupy.
My desk drawers have been home to all the sauce sachets from McD, for snacks that would come in handy during late-night treats and also for paper-plates, butter-knife, spoons etc. etc... It was also a stationery unit where one could find staplers, pins and other knick-knacks... I have emptied the drawers now, for I have to submit the desk keys to the facilities... I have never seen my desk, this empty..
Whoever gets a call from 6405 will say, "Haan Arathi.. Enti? Cheppu..." (even when it's Spoo or Shank who is making the call.. ) The number 6405 has been an permanent extn number for me.. But from tomorrow, the calls to this number will not be picked up by me... :-(
You must be thinking, what an emotional fool, I am... But guys, this is what I feel right now.
As all things are prone to changes, so is my location. Our project has been shifted to Campus and from tomorrow, we will be working from Campus.
This sudden change is making me feel very insecure and restless, I don't know why.
For the past two years, S10-4F10 has been the adda for most of our NCG-10 ppl... For the guys working in non-S10 locations, this location has been the baggage counter(cloak room).. By 6PM, my desk has been decorated with your bags, jerkins, helmets etc. etc. Most of you have used my system at some point or the other, for sending mails or to play games or to copy photos using USB ;-)
But from now on, this desk, this location will be used by someone else. S10-4F10 has been my location but now I will have to leave it for someone else to occupy.
My desk drawers have been home to all the sauce sachets from McD, for snacks that would come in handy during late-night treats and also for paper-plates, butter-knife, spoons etc. etc... It was also a stationery unit where one could find staplers, pins and other knick-knacks... I have emptied the drawers now, for I have to submit the desk keys to the facilities... I have never seen my desk, this empty..
Whoever gets a call from 6405 will say, "Haan Arathi.. Enti? Cheppu..." (even when it's Spoo or Shank who is making the call.. ) The number 6405 has been an permanent extn number for me.. But from tomorrow, the calls to this number will not be picked up by me... :-(
You must be thinking, what an emotional fool, I am... But guys, this is what I feel right now.
Thursday, March 20, 2008
Getting Married, Part-V
(Continuation of "Getting Married Part-IV")
A girl leaves her home to spend the rest of her life with a completely different/new family. She adjusts her life style, her dressing, her working hours etc. to suit her new home. Yet she is not the bakra here! Only the guy is bakra!
She has to forgo her professional career if they decide to have a baby. Yet the guy is the bakra!
After marriage is there any change in the way a man lives? Not much, in fact the change is almost negligible! He still continues to get up at seven… gets a ready cup of coffee and breakfast once he gets ready… His clothes are readily pressed for him as always… Even after he returns from office, he gets to watch his favorite TV programs…
How about the girl? She is expected to cook, wash and clean and take care of the family… She is asked to do things that she has never done before. She has to manage home and office… Yet the guy is the bakra! How mean! Why is life so partial!
******************
Bhavana and I are having our lunch together when I see the wedding card of her friends. It says: “Sanjay weds Sarika(alias Gautami)”
“What’s Sarika doing?”
“Who’s Sarika?”
“Sanjay’s fiancée.”
“Oh! You mean Gautami?” she says, “She’s a school teacher. Actually, her name is Gautami only. But according to Sanjay’s horoscope, he should marry a girl whose name starts with an S. Only then he will be wealthy.”
“So? So, she has changed her name for him?” I ask.
“Oh no! He has asked her to change it to Sarika,” she replies and adds, “In fact, she did not want to change her name at all. But her parents insisted that she will never get a better marriage proposal; so she had to change her name.”
“Bad! Very bad!” I exclaim and add, “Very sad too!”
In general the girl’s surname changes after her marriage. In fact, after her marriage, Bhavana prefers to be called as Bhavana Dubey, rather than Bhavana Sharma. One day, I asked her, “Why did you change your name after marriage?”
“That is our India tradition, dear,” she said and continued, “One day, even you will change your name.”
“Do you like being called Ms. Dubey rather than Ms. Sharma?”
“Yes, of course!””Is your husband called Mr. Sharma?”
“No,” she replied in a shock, “Why will Vinod be called a Sharma? He was born in the Dubey family.”
“But you were also born in a Varma family not a Dubey family,” I argued.
“You don’t seem to value Indian traditions.”
“It’s not like that. People do not wish to change something that has been continued for ages. They don’t want to see a change. They don’t want to be singled out and pointed out. Or sometimes, they have been brainwashed to such a extent that they accept all the norms of the society without any question. If someone goes against these general norms, he/she is called arrogant.”
I got so angry that day that I stormed out of her cubicle. But now, changing of surname seemed so small when compared to changing a person’s name. We have been called by a name since our birth, it is the same name that we see in all our school certificates and ID cards, and now all at once, it is printed differently in our wedding card. It’s so sad! Why are we forced to change for someone else? If Gautami was interested in changing her name, it would be fine, but this change has been against her wishes. I pity at the plight of most of the girls in the society.
(To be Continued in "Getting Married Part-VI")
A girl leaves her home to spend the rest of her life with a completely different/new family. She adjusts her life style, her dressing, her working hours etc. to suit her new home. Yet she is not the bakra here! Only the guy is bakra!
She has to forgo her professional career if they decide to have a baby. Yet the guy is the bakra!
After marriage is there any change in the way a man lives? Not much, in fact the change is almost negligible! He still continues to get up at seven… gets a ready cup of coffee and breakfast once he gets ready… His clothes are readily pressed for him as always… Even after he returns from office, he gets to watch his favorite TV programs…
How about the girl? She is expected to cook, wash and clean and take care of the family… She is asked to do things that she has never done before. She has to manage home and office… Yet the guy is the bakra! How mean! Why is life so partial!
******************
Bhavana and I are having our lunch together when I see the wedding card of her friends. It says: “Sanjay weds Sarika(alias Gautami)”
“What’s Sarika doing?”
“Who’s Sarika?”
“Sanjay’s fiancée.”
“Oh! You mean Gautami?” she says, “She’s a school teacher. Actually, her name is Gautami only. But according to Sanjay’s horoscope, he should marry a girl whose name starts with an S. Only then he will be wealthy.”
“So? So, she has changed her name for him?” I ask.
“Oh no! He has asked her to change it to Sarika,” she replies and adds, “In fact, she did not want to change her name at all. But her parents insisted that she will never get a better marriage proposal; so she had to change her name.”
“Bad! Very bad!” I exclaim and add, “Very sad too!”
In general the girl’s surname changes after her marriage. In fact, after her marriage, Bhavana prefers to be called as Bhavana Dubey, rather than Bhavana Sharma. One day, I asked her, “Why did you change your name after marriage?”
“That is our India tradition, dear,” she said and continued, “One day, even you will change your name.”
“Do you like being called Ms. Dubey rather than Ms. Sharma?”
“Yes, of course!””Is your husband called Mr. Sharma?”
“No,” she replied in a shock, “Why will Vinod be called a Sharma? He was born in the Dubey family.”
“But you were also born in a Varma family not a Dubey family,” I argued.
“You don’t seem to value Indian traditions.”
“It’s not like that. People do not wish to change something that has been continued for ages. They don’t want to see a change. They don’t want to be singled out and pointed out. Or sometimes, they have been brainwashed to such a extent that they accept all the norms of the society without any question. If someone goes against these general norms, he/she is called arrogant.”
I got so angry that day that I stormed out of her cubicle. But now, changing of surname seemed so small when compared to changing a person’s name. We have been called by a name since our birth, it is the same name that we see in all our school certificates and ID cards, and now all at once, it is printed differently in our wedding card. It’s so sad! Why are we forced to change for someone else? If Gautami was interested in changing her name, it would be fine, but this change has been against her wishes. I pity at the plight of most of the girls in the society.
(To be Continued in "Getting Married Part-VI")
Subscribe to:
Posts (Atom)