Java Double summation is not working properly

public class Test {
     public static void main(String[] args) {
          double d = 0.6+4.6;
          System.out.println(d);
          /*float d2 = (float)(0.6d+4.6f);
          System.out.println(d2*1.0f);*/
This is printing 5.199999999999999.
I am using Java 1.6. Please suggest me how to do these type of double operations.

>
If d was as defined in the original post you don't get the expected result
>
That statement is not quite correct. Of course you get the expected result.
Perhaps you meant to say 'you don't get the OP's expected result'?
And I did read it all before I answered but it seems you misread Kayaman's response.
Kayaman said
>
. . .you can't just do
if(d == 5.2)
with floating point numbers.
>
and, as I showed, that is clearly incorrect. You not only can do that but that is how you would check for equality with a particular value.
The OP concluded
>
if the program is like this, false is printing. But the answer should be true.
>
I think we all agree that the OP is wrong that the answer should be true.
But he is not wrong because you can't do 'd == 5.2' with floating point numbers.
OP is wrong because comparing two numbers like 'd' and '5.2' that have any significant digits that differ will not result in equality.
And neither Kayman nor you gave the OP that real reason why the code took a different branch than what the OP expected.
My statement
>
The OP used 5.199999999999999 and that isn't equal to 5.2 so you take the FALSE branch.
>
is EXACTLY the explanation for why the OP's assumtion is wrong.
The reason has nothing to do with the Java syntax.

Similar Messages

  • Java Parser 2 DOMSample not working properly

    Hi
    I downloaded the parser (v2) and am running the DOMSample.java
    with the sample file empl.xml as the input. The program
    successfully finds the tree and writes out the nodes correctly,
    but it never finds the node values (I made sure that there is a
    call to getNodeValue()). For example, The following
    XML file:
    <?xml version = "1.0"?>
    <!DOCTYPE parent [
    <!ELEMENT parent (child)>
    <!ELEMENT child (#PCDATA)>
    ]>
    <parent>
    <child>Murthy</child>
    </parent>
    The getNodeValue() always returns null, even though the <child>
    tag has a value.
    What am I missing?
    Thanks in advance
    Murthy.
    null

    You have to get the TEXT children of an element and then use the
    getNodeValue() method on the text nodes.
    Oracle XML Team
    James Lee (guest) wrote:
    : How do u do that? when i tried to pass it into a text node, the
    : runtime error says that there is a classcastexception.
    : James
    : Oracle XML Team wrote:
    : : As per the W3C DOM spec, getNodeValue() of an element is
    : always
    : : null. You need to pass it the text node to get the actual
    text.
    : : Oracle XML Team
    : : http://technet.oracle.com
    : : Oracle Technology Network
    : : Murthy Jarugumilli (guest) wrote:
    : : : Hi
    : : : I downloaded the parser (v2) and am running the
    : DOMSample.java
    : : : with the sample file empl.xml as the input. The program
    : : : successfully finds the tree and writes out the nodes
    : : correctly,
    : : : but it never finds the node values (I made sure that there
    : is
    : : a
    : : : call to getNodeValue()). For example, The following
    : : : XML file:
    : : : <?xml version = "1.0"?>
    : : : <!DOCTYPE parent [
    : : : <!ELEMENT parent (child)>
    : : : <!ELEMENT child (#PCDATA)>
    : : : ]>
    : : : <parent>
    : : : <child>Murthy</child>
    : : : </parent>
    : : : The getNodeValue() always returns null, even though the
    : : <child>
    : : : tag has a value.
    : : : What am I missing?
    : : : Thanks in advance
    : : : Murthy.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • Z2 double tap to wake up the screen is not working properly when taking it out of pocket

    when i take my phone out of my pocket, the double tap function is not working properly, sometimes i have to  tap over and over to wake up the screen. 
    do you know why? does same thing happen to yours ? 
    and please dont tell me not to use it. i have paid 700$ and i have right to use my phone fully functioning.  
    any advice ?

    Actually it needs some practice, you need two gentle taps on the upper third of the phone (around the place where the clock shows on lock screen), tapping too hard or tapping on the lower part of the phone will require repeating the tapping more than one time. This is from my personal experience.
    A proud Sony User since 2002
    If I was helpful to you, thank me by Kudos

  • HT4623 I did the latest update to my i pad 2 and now Safari does not work properly . I get messages that the java script needs to be turned on which I did. How do I get this all back after this update?

    I did the latest update to my I pad 2 and lost Safari . I was instructed to switch the Java script on which I did but Safari is still not working properly . how do I get everything back after this software update.

    Try a reset: hold down the home button along with the power button until you see the Apple, then let go.

  • My trackpad in Macbook is not working properly. The tap and double tap is not working but other gestures are working. Please help me..thanks

    My trackpad in Macbook is not working properly. The tap and double tap is not working but other gestures are working. Please help me..thanks

    Portables and Magic Trackpad: Jumpy or erratic trackpad operation
    Might be something from that link that will help.

  • HT1338 i think my java is not working properly what do i do

    i think my java is not working properly what do i do

    Java 7 updated  for 10.7-10.8
    Released Feb 1, 2013,  fixes 50+ security flaws
    http://www.esecurityplanet.com/patches/oracle-responds-to-java-security-flaws-wi th-50-fixes.html
    Download and install
    https://www.java.com/en/download/faq/java_mac.xml
    For Java versions 6 and below OS X 10.5-10.6 machines
    Apple supplies their own version of Java. For Mac OS X 10.6 and below, use the Software Update feature available under the Apple menu to check that you have the most up-to-date version of Java 6 for your Mac.
    https://www.java.com/en/download/faq/java_6.xml
    Java SE 6 End of Public Updates
    After February 2013, Oracle will no longer post updates of Java SE 6 to its public download sites. We highly recommend downloading and installing Java 7.
    If your considering upgrading OS X from 10.6.8 to 10.8 via AppStore to run Java 7
    Be forewarned no PowerPC based programs or driver software will run any longer.
    Check here BEFORE you upgrade OS X!
    http://roaringapps.com/apps:table
    Alternatives if you must run Java 7
    If Apple disabled Java 6 in 10.6, and you can't upgrade OS X to 10.8, then your pretty much done with Java in OS X because Oracle won't issue updates for Java 6 anymore.
    However you can install Windows 7 and continue to use Java 7+ there until support for Windows 7 ends in 2020.
    Windows in BootCamp or Virtual Machine?
    If your on 10.6, I very highly recommend the free Virtualbox for the virtual machine software as it gets updates, VMFusion and Parallels have moved on with only 10.7+

  • Java Script Code not working properly for visios in sharepoint 2013

    Hi all ,
                 I have few visios and I am using the visio web part to display and to redirect from one visio to other visio I am using the java script code through content editor web part . 
    In share point 2010 it's working fine , I was able to redirect to all the visios and code is working fine .
    In share point 2013 its not the same , Its not working properly . only for the first time the code is working fine . once it goes to next visio the code stops working . 
    For example if i click in visio A it gets redirect to Visio B and its stops working , it wont allow to do any other steps . 
    I have checked with the URL its correct , I am not able to find any error also .
    Indresh

    This will be likely caused by the Minimal Download Strategy not registering the Javascript on the page reload. You can turn off the MDS feature to test this.
    You can either turn off MDS in your site, or register your Javascript functions with MDS to ensure they are called. To do this, you'll need all of your code to be wrapped in a javascript file (Embed this on the page using a <script> tag and
    inside that file in a function, which you then register with MDS as follows (I usually do this in the first line of the javascript file):-
    RegisterModuleInit("/SiteAssets/YourJavaScriptFile.js", NameOfYourFunction);
    Regards
    Paul.
    Please ensure that you mark a question as Answered once you receive a satisfactory response. This helps people in future when searching and helps prevent the same questions being asked multiple times.

  • HT1338 java 7 will not work properly with Lion.  In military and need to access DTS.

    JAVA not working properly.  Tried all found recomended solutions. Java test shows that Java is blocked but it is enabled in Safari.

    apple has blocked it: http://thenextweb.com/apple/2013/01/31/for-the-second-time-this-month-apple-bloc ks-java-7-on-os-x-10-6-and-up-to-protect-mac-users/

  • WRT1900 AC V1 - Linksys is aware that the router is not working properly. Help spread the word.

    I just had a conversation with Linksys' Customer Service via chat: Daphne L. J: Hello Fernando Paramo. My name is Daphne L..
    Daphne L. J: Welcome to Linksys Global Chat. Is this your initial contact or do you have a case number?
    You: Case number is 04971062
    Daphne L. J: Please give me 3-5 minutes to pull up and review your case.
    You: OK
    Daphne L. J: Thank you.
    You: I have a WRT1900 AC, V1. The router is not working properly. I have disconnections every few minutes.I already installed the new firmware version and I still have the same issues. I already reset the router to factory defaults and same issues. I have changed the settings back to my personal preferences: Changed the SSID, changed the wireless security settings, changed the DNS and deactivate WPS. That's it.I'm using 5 Ghz mode with my laptops (5 Ghz adapters) and 2-4 Ghz with a few devices (Chromecast, Nintendo 3DS).
    Daphne L. J: Thank you for waiting.
    Daphne L. J: Please confirm if the following information is correct:
    Name : Fernando Paramo
    Phone Number :
    E-Mail Address : 
    Model Number : WRT1900AC
    Serial Number : 13J10609406280
    Country : United States
    You: That's correct.
    Daphne L. J: Okay. Were you able to check if the devices have stable connection wired to the router?
    You: No. I do not have devices with Ethernet ports. Well, only the cable modem.
    You: But the modem is fine. No disconnections from my ISP.
    You: It is the router.
    Daphne L. J: Alright. What is the current firmware version of your router?
    You: I tried to return the router to Wal-Mart yesterday with no luck. This is a useless device. And I have been reading comments on the community forums and a lot of people are having problems.
    Daphne L. J: We are actually aware of the issue and are working on a resolution. What is the current firmware version of your router?
    You: Ver. 1.1.10.167514
    You: Latest one.
    Daphne L. J: Yes, so you reflashed the firmware, reset and then manually reconfigure it after, not using backup configuration, is that right?
    You: That's correct.
    Daphne L. J: And it is intermittent on all devices connected to both 2.4 and 5 Ghz networks, is that right?
    You: That's correct.
    Daphne L. J: Thank you for the information. Please give ,e 3-5 minutes to verify this with my superior.
    Daphne L. J: Thank you for waiting.
    You: I want to send you my WRT1900 AC and get a V2 or I want a EA8500 and pay the difference myseld.
    You: I do not want my current hardware.
    You: It is useless for my needs.
    You: I can't believe I had an older E3000 that didn't give me any problems.
    Daphne L. J: We have already exhausted all possible troubleshooting steps for your concern. As verified with my Supervisor, we will forward your case to our Customer Assurance Team. They are highly technical and knowledgeable when it comes to advanced troubleshooting. They will contact you in the next 24 to 48 hours. By the way, who is your Internet Service Provider? And do you Cable or DSL connection?
    You: Cable connection.
    Daphne L. J: Who is your Internet Service Provider?
    You: A company called .
    You: How are they going to contact me?
    Daphne L. J: Alright. By the way, on the device itself, on its FCC ID, please check if you have WRT1900AC or WRT1900AC v2.
    You: Are you paying attention to me?
    You: I already told you it's V1.
    Daphne L. J: They will call or email you. Please double check if these informations are correct:
    Name :
    Phone Number :
    E-Mail Address :
    You: I told you I want to send you my WRT1900 AC and get a V2 or I want a EA8500 and pay the difference myself.
    You: I want them to contact me to my email. I can't answer the phone during work hours.
    Daphne L. J: We can't assure you if we will be able to replace it with Version 2 or if you are allowed to have the EA8500 instead.
    Daphne L. J: Just in case, do you also have an alternate number?
    Daphne L. J: Also, what time zone are you in? And what is your preferred time and day for them to contact you?
    You: I have the one from my office in Mexico. Central Time. Any time is good.
    Daphne L. J: So, you are currently in Mexico?
    You: I work in Mexico but I have the house in USA. I live in the border.
    Daphne L. J: I see. Do you have any other questions or clarifications?
    You: I live 10 minutes away from the International Bridge. But that's not an issue. I bought the router at Walmart in Laredo, TX.
    Daphne L. J: Thank you for the information. Would that be all for now?
    You: I want a clarification: Do you realize that there is an issue with the current WRT1900 AC? Are you aware of that?
    You: Because this is a very expensive router that is not working as it should be.
    Daphne L. J: Yes, we are aware of the issue and are working on a resolution.
    Daphne L. J: Would there be anything else you need?
    You: That would be it. I will wait for you to contact me.
    You: Thanks.
    Daphne L. J: Alright. Thank you for giving us an opportunity to serve you through Linksys Live Chat. You may also visit our support site at www.linksys.com. For your reference, your case number is 04980394. Thank you for choosing Linksys and have a great day! We paid $250 for this piece of equipment. That's a lot of money for a device that doesn't work. I just want to get a V2 replacement, or better yet, an exchange for a EA8500. We should all demand this. It is not fair for us. The current WRT1900 AC is a useless device. They even should do a recall of the product. I will wait for them to contact me, but I'm thinking if I should send the information to The Consumerist or someone else. What to do?

    FernandoRocker wrote:
    Well... instead of looking into this with Engineering, I would prefer you to talk about this with the Sales department and exchange my WRT1900AC for an EA8500 (I will pay the difference if needed).  Seriously. The device is useless. Not just a paperweigt... an expensive paperweight.Actually I looking into the swap for you because I think that would be best in your case. Keep this in perspective. There is laterally millions of WRT1900AC V1 out there with very few issues with latest firmwares and of course the odd exception. In your case it could be a defective WRT1900AC.

  • WRT1900AC V1 - Linksys is aware that the router is not working properly. Help spread the word.

    I just had a conversation with Linksys' Customer Service via chat: Daphne L. J: Hello Fernando Paramo. My name is Daphne L..
    Daphne L. J: Welcome to Linksys Global Chat. Is this your initial contact or do you have a case number?
    You: Case number is 04971062
    Daphne L. J: Please give me 3-5 minutes to pull up and review your case.
    You: OK
    Daphne L. J: Thank you.
    You: I have a WRT1900AC, V1. The router is not working properly. I have disconnections every few minutes.I already installed the new firmware version and I still have the same issues. I already reset the router to factory defaults and same issues. I have changed the settings back to my personal preferences: Changed the SSID, changed the wireless security settings, changed the DNS and deactivate WPS. That's it.I'm using 5 Ghz mode with my laptops (5 Ghz adapters) and 2-4 Ghz with a few devices (Chromecast, Nintendo 3DS).
    Daphne L. J: Thank you for waiting.
    Daphne L. J: Please confirm if the following information is correct:
    Name : Fernando Paramo
    Phone Number :
    E-Mail Address : 
    Model Number : WRT1900AC
    Serial Number : 13J10609406280
    Country : United States
    You: That's correct.
    Daphne L. J: Okay. Were you able to check if the devices have stable connection wired to the router?
    You: No. I do not have devices with Ethernet ports. Well, only the cable modem.
    You: But the modem is fine. No disconnections from my ISP.
    You: It is the router.
    Daphne L. J: Alright. What is the current firmware version of your router?
    You: I tried to return the router to Wal-Mart yesterday with no luck. This is a useless device. And I have been reading comments on the community forums and a lot of people are having problems.
    Daphne L. J: We are actually aware of the issue and are working on a resolution. What is the current firmware version of your router?
    You: Ver. 1.1.10.167514
    You: Latest one.
    Daphne L. J: Yes, so you reflashed the firmware, reset and then manually reconfigure it after, not using backup configuration, is that right?
    You: That's correct.
    Daphne L. J: And it is intermittent on all devices connected to both 2.4 and 5 Ghz networks, is that right?
    You: That's correct.
    Daphne L. J: Thank you for the information. Please give ,e 3-5 minutes to verify this with my superior.
    Daphne L. J: Thank you for waiting.
    You: I want to send you my WRT1900AC and get a V2 or I want a EA8500 and pay the difference myseld.
    You: I do not want my current hardware.
    You: It is useless for my needs.
    You: I can't believe I had an older E3000 that didn't give me any problems.
    Daphne L. J: We have already exhausted all possible troubleshooting steps for your concern. As verified with my Supervisor, we will forward your case to our Customer Assurance Team. They are highly technical and knowledgeable when it comes to advanced troubleshooting. They will contact you in the next 24 to 48 hours. By the way, who is your Internet Service Provider? And do you Cable or DSL connection?
    You: Cable connection.
    Daphne L. J: Who is your Internet Service Provider?
    You: A company called .
    You: How are they going to contact me?
    Daphne L. J: Alright. By the way, on the device itself, on its FCC ID, please check if you have WRT1900AC or WRT1900AC v2.
    You: Are you paying attention to me?
    You: I already told you it's V1.
    Daphne L. J: They will call or email you. Please double check if these informations are correct:
    Name :
    Phone Number :
    E-Mail Address :
    You: I told you I want to send you my WRT1900AC and get a V2 or I want a EA8500 and pay the difference myself.
    You: I want them to contact me to my email. I can't answer the phone during work hours.
    Daphne L. J: We can't assure you if we will be able to replace it with Version 2 or if you are allowed to have the EA8500 instead.
    Daphne L. J: Just in case, do you also have an alternate number?
    Daphne L. J: Also, what time zone are you in? And what is your preferred time and day for them to contact you?
    You: I have the one from my office in Mexico. Central Time. Any time is good.
    Daphne L. J: So, you are currently in Mexico?
    You: I work in Mexico but I have the house in USA. I live in the border.
    Daphne L. J: I see. Do you have any other questions or clarifications?
    You: I live 10 minutes away from the International Bridge. But that's not an issue. I bought the router at Walmart in Laredo, TX.
    Daphne L. J: Thank you for the information. Would that be all for now?
    You: I want a clarification: Do you realize that there is an issue with the current WRT1900AC? Are you aware of that?
    You: Because this is a very expensive router that is not working as it should be.
    Daphne L. J: Yes, we are aware of the issue and are working on a resolution.
    Daphne L. J: Would there be anything else you need?
    You: That would be it. I will wait for you to contact me.
    You: Thanks.
    Daphne L. J: Alright. Thank you for giving us an opportunity to serve you through Linksys Live Chat. You may also visit our support site at www.linksys.com. For your reference, your case number is 04980394. Thank you for choosing Linksys and have a great day! We paid $250 for this piece of equipment. That's a lot of money for a device that doesn't work. I just want to get a V2 replacement, or better yet, an exchange for a EA8500. We should all demand this. It is not fair for us. The current WRT1900AC is a useless device. They even should do a recall of the product. I will wait for them to contact me, but I'm thinking if I should send the information to The Consumerist or someone else. What to do?

    Hello. I sent my WRT1900AC V1 to Linksys four days ago (Monday) via UPS with a RMA. Linksys paid the shipping and everything. The router is still in route, and it should arrive to their offices tomorrow. Once they receive the WRT1900 AC V1, they are going to send me an EA8500 as a replacement. But I have been reading the comments about the EA8500 here in the forum and it seems to have the same problems. I guess the firmware is extremely flawed in both routers (maybe it is almost the same code?). Anyway, I will try the EA8500 and I hope it works. I bought a temporary router from Walmart and I paid $35 for it. It is a Belink N600 DB. I can't believe that a $35 router is working a lot, lot, lot better than my previous $250 WRT1900AC router. Unbelievable. If the EA8500 doesn't work, I'm going to try and get my money back from Linksys, or contact The Consumerist or someone to get my money back and get a Nighthawk instead.

  • Jms is not working properly in clustered environment

    Hi all,
    i am using the application server oc4j 10.1.3.1.0 enterprise edition . my application is standalone application(thick client)
    we are using the jndi.properties as follows ...
    java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactory
    java.naming.provider.url=opmn:ormi://172.16.1.38:6005:group/Security,opmn:ormi://172.16.1.38:6006:deceval_group/Security
    java.naming.security.principal=oc4juser
    java.naming.security.credentials=oc4juser
    oracle.j2ee.rmi.loadBalance=lookup
    we have two application servers in cluster topology as u can see above we have used one instance from one application server and one from another.
    i have seen that for every instance there one jms server. at runtime it is taking one application servers services
    say opmn port 6005 but when the application is connecting to the another application server say opmn 6006
    here jms is not working properly when i send message
    As we have clustered environment message must be propagated all the applications who use above jndi.properties.
    if i keep use only one application server opmn say
    java.naming.provider.url=opmn:ormi://172.16.1.38:6005:group/Security
    then its is working excellently
    please can u provide any solution ASAP
    thanks in advance
    Manu

    Dear Aravindth
      (.*?) means -> Select all contents from where you start and end,
    For Ex. <month>(.*?)</month> then Select for start <month> and end last </month> tag.
    (?) Match zero or one occurrences. Equivalent to {0,1}.
    (*) Match zero or more occurrences. Equivalent to {0,}.
    (+) Match one or more occurrences. Equivalent to {1,}.
    (.) (Dot). Match any character except newline or another Unicode line terminator.
    (.*?) means -> Zero or more times Match any character except newline or another Unicode line terminator + Match zero or more occurrences. Equivalent to {0,}.+Match zero or one occurrences. Equivalent to {0,1}.
    Could you please refere the below cite :
    http://www.javascriptkit.com/jsref/regexp.shtml
    Thanks & Regards
    T.R.Harihara SudhaN

  • Ive just upgraded my late 2009 macbook, and things are not working properly. First of all, when I started the computer first time after installing Mountain Lion, some message advised me that some files were impossible to install.

    Ive just upgraded my late 2009 macbook, and things are not working properly. First of all, when I started the computer first time after installing Mountain Lion, some message advised me that some files were impossible to install. Once I wrote my password, and for now on, everytime I start the session, another window advise me that "Java SE 6" is missing, due that, the computer can't run some "CS5Service Manager". If I try to install it, the download ends with an error. If finally, you skip the istallation, you arrive to the dock, but the menu bar at the top of the screen doesn't show up.
    In addition, my trackpad doesn't works either. I can move the arrow but i can't click anywhere, probably because the option of clicking by touching is disabeled and I can't performance a regular click.
    I'll be very glad if someone know what the heck is happening with my computer. Anyway, I'm going to the genius bar next Saturday. Thx!

    We're sorry.
    We can't find the article you're looking for.
    Please return to the Apple Support homepage.
    Sigh.

  • Pick List Value Not Working Properly

    Hi Oracle Framework Gurus,
    I have a strange Issue in which one of my cusom page is working properly in Jdev and not working Properly when deployed in the apps instance.
    There are two custom pages with the same VO.
    What I do is have a picklist from one of the custom page and depending on the value of the picklist and I navigate to the other custom page.
    This is working properly in the JDev,But for some reasons it works properly in apps instance, when I try to run the first time(ie) when I run page A and pick 'X' from the picklist the Page 'B' is coming properly as per the controller code and when i pick 'Y' from the picklist in Page B, it is navigating to Page A as per the controller code.
    This works fine for the first time,But when i again select 'X' from the picklist the proper value from the Picklist is not getting selected and passed to the custom package and so I get wrong values in Page 'B'
    What could be the reason for it as it working fine in Jdev,I can navigate from Page A to Page B and Page B to Page A as many times possible.

    Hi Anand,
    Controller1 :
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    //int intPersonId = pageContext.getEmployeeId();
    int intPersonId; // = pageContext.getEmployeeId();
    String strPersonId = Integer.toString(277671);
    //String strPersonId = Integer.toString(intPersonId);
    java.util.Date sysdate = pageContext.getCurrentUserDate();
    String convSysDate = pageContext.getOANLSServices().dateToString(sysdate);
    // Date testdate = (Date)sysdate.dateValue();
    // get the Application Module
    OAApplicationModule oaAM = pageContext.getApplicationModule(webBean);
    Serializable parameters[] = { strPersonId,convSysDate };
    Serializable param[] = { strPersonId };
    System.out.println("The Sysdate PF "+convSysDate);
    //pass parameters to Application Module
    oaAM.invokeMethod("insertLovRow", param);
    if ((String)pageContext.getSessionValue("PFlag1") != null)
    String PFlag1 =(String)pageContext.getSessionValue("PFlag1");
    String SDate1 =(String)pageContext.getSessionValue("SDateSession1");
    Serializable param1[] = { SDate1 };
    oaAM.invokeMethod("insertLovRow", param);
    oaAM.invokeMethod("initEmpLovQuery1",param1);
    oaAM.invokeMethod("initEmpTransLovQuery1");
    OAMessageChoiceBean orgMesgChoiceBean = (OAMessageChoiceBean)webBean.findChildRecursive("Year");
    orgMesgChoiceBean.setPickListViewObjectDefinitionName("EmployeeTest.oracle.apps.per.server.EmpTransDateLov");
    orgMesgChoiceBean.setListValueAttribute("StartDate");
    orgMesgChoiceBean.setListDisplayAttribute("DateRange" );
    orgMesgChoiceBean.setPickListCacheEnabled(false);
    else
    oaAM.invokeMethod("insertRow", parameters);
    oaAM.invokeMethod("initQuery", param);
    oaAM.invokeMethod("execQuery");
    oaAM.invokeMethod("totexecQuery");
    OAMessageChoiceBean orgMesgChoiceBean = (OAMessageChoiceBean)webBean.findChildRecursive("Year");
    orgMesgChoiceBean.setPickListViewObjectDefinitionName("EmployeeTest.oracle.apps.per.server.EmployeeDateLovVO");
    orgMesgChoiceBean.setListValueAttribute("StartDate");
    orgMesgChoiceBean.setListDisplayAttribute("DateRange" );
    orgMesgChoiceBean.setPickListCacheEnabled(false);
    oaAM.invokeMethod("initEmpLovQuery");
    OAViewObject oaviewobject1 =(OAViewObject)oaAM.findViewObject("EmployeeUtilVO1");
    oaviewobject1.reset();
    if (oaviewobject1 != null)
    do
    if(!oaviewobject1.hasNext())
    break;
    oaviewobject1.next();
    OARow row = (OARow)oaviewobject1.getCurrentRow();
    String fullName = (String)row.getAttribute("EmpDep");
    System.out.println("The Name is "+fullName);
    } while(true);
    * Procedure to handle form submissions for form elements in
    * a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    //int intPersonId = pageContext.getEmployeeId();
    //String strPersonId = Integer.toString(intPersonId);
    int intPersonId; // = pageContext.getEmployeeId();
    String strPersonId = Integer.toString(277671);
    OAApplicationModule oaAM = pageContext.getApplicationModule(webBean);
    if (pageContext.getParameter("ViewDetails") != null)
    pageContext.putSessionValue("strPersonId", strPersonId);
    pageContext.setForwardURL("OA.jsp?page=/EmployeeTest/oracle/apps/per/webui/EmployeePanelIB",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true, // Retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES, // Show breadcrumbs
    OAWebBeanConstants.IGNORE_MESSAGES);
    System.out.println("strPersonId "+strPersonId);
    String strEvent= pageContext.getParameter(EVENT_PARAM) ;
    if ( strEvent.equals("update"))
    OAMessageChoiceBean DepStatus1 = (OAMessageChoiceBean) webBean.findIndexedChildRecursive("Year");
    String sDate = DepStatus1.getSelectionValue(pageContext);
    //String sDate = DepStatus1.getValue(pageContext).toString();
    //Serializable parameters[] = { strPersonId,sDate };
    Serializable parameters[] = { strPersonId,sDate };
    Serializable param[] = { strPersonId };
    System.out.println("The PersonId "+strPersonId);
    System.out.println("The Controller Date passed is IBUtil "+sDate);
    oaAM.invokeMethod("insertRow", parameters);
    oaAM.invokeMethod("initQuery", param);
    oaAM.invokeMethod("execQuery");
    String flag = "1";
    //pageContext.putSessionValue("strPersonId", strPersonId);
    pageContext.putSessionValue("PFlag", flag);
    pageContext.putSessionValue("SDateSession", sDate);
    pageContext.setForwardURL("OA.jsp?page=/EmployeeTest/oracle/apps/per/webui/EmpTestPG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true, // Retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES, // Show breadcrumbs
    OAWebBeanConstants.IGNORE_MESSAGES);
    Controller 2:
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    //int intPersonId = pageContext.getEmployeeId();
    int intPersonId; // = pageContext.getEmployeeId();
    String strPersonId = Integer.toString(277671);
    //String strPersonId = Integer.toString(intPersonId);
    java.util.Date sysdate = pageContext.getCurrentUserDate();
    String convSysDate = pageContext.getOANLSServices().dateToString(sysdate);
    // get the Application Module
    OAApplicationModule oaAM = pageContext.getApplicationModule(webBean);
    Serializable parameters[] = { strPersonId,convSysDate };
    Serializable param[] = { strPersonId };
    System.out.println("The Sysdate PF "+convSysDate);
    //pass parameters to Application Module
    oaAM.invokeMethod("insertLovRow", param);
    if ((String)pageContext.getSessionValue("PFlag") != null)
    String PFlag1 =(String)pageContext.getSessionValue("PFlag");
    String SDate1 =(String)pageContext.getSessionValue("SDateSession");
    Serializable param2[] = { strPersonId, SDate1 };
    Serializable param1[] = { SDate1 };
    oaAM.invokeMethod("insertLovRow", param);
    oaAM.invokeMethod("initEmpLovQuery1",param1);
    oaAM.invokeMethod("initEmpTransLovQuery1");
    OAMessageChoiceBean orgMesgChoiceBean = (OAMessageChoiceBean)webBean.findChildRecursive("Year");
    orgMesgChoiceBean.setPickListViewObjectDefinitionName("EmployeeTest.oracle.apps.per.server.EmpTransDateLov");
    orgMesgChoiceBean.setListValueAttribute("StartDate");
    orgMesgChoiceBean.setListDisplayAttribute("DateRange" );
    orgMesgChoiceBean.setPickListCacheEnabled(false);
    else
    oaAM.invokeMethod("insertRow", parameters);
    oaAM.invokeMethod("initQuery", param);
    oaAM.invokeMethod("execQuery");
    oaAM.invokeMethod("totexecQuery");
    OAMessageChoiceBean orgMesgChoiceBean = (OAMessageChoiceBean)webBean.findChildRecursive("Year");
    orgMesgChoiceBean.setPickListViewObjectDefinitionName("EmployeeTest.oracle.apps.per.server.EmployeeDateLovVO");
    orgMesgChoiceBean.setListValueAttribute("StartDate");
    orgMesgChoiceBean.setListDisplayAttribute("DateRange" );
    orgMesgChoiceBean.setPickListCacheEnabled(false);
    oaAM.invokeMethod("initEmpLovQuery");
    OAViewObject oaviewobject1 =(OAViewObject)oaAM.findViewObject("EmployeeUtilVO1");
    oaviewobject1.reset();
    if (oaviewobject1 != null)
    do
    if(!oaviewobject1.hasNext())
    break;
    oaviewobject1.next();
    OARow row = (OARow)oaviewobject1.getCurrentRow();
    String fullName = (String)row.getAttribute("EmpDep");
    System.out.println("The Name is "+fullName);
    } while(true);
    * Procedure to handle form submissions for form elements in
    * a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule oaAM = pageContext.getApplicationModule(webBean);
    //int intPersonId = pageContext.getEmployeeId();
    //String strPersonId = Integer.toString(intPersonId);
    int intPersonId; // = pageContext.getEmployeeId();
    String strPersonId = Integer.toString(277671);
    if (pageContext.getParameter("ViewDetails") != null)
    pageContext.setForwardURL("OA.jsp?page=/EmployeeTest/oracle/apps/per/webui/EmpPanelPG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true, // Retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES, // Show breadcrumbs
    OAWebBeanConstants.IGNORE_MESSAGES);
    pageContext.putSessionValue("strPersonId", strPersonId);
    String strEvent= pageContext.getParameter(EVENT_PARAM) ;
    if ( strEvent.equals("update"))
    OAMessageChoiceBean DepStatus1 = (OAMessageChoiceBean) webBean.findIndexedChildRecursive("Year");
    String sDate = DepStatus1.getSelectionValue(pageContext);
    //String sDate = DepStatus1.getValue(pageContext).toString();
    Serializable parameters[] = { strPersonId,sDate };
    Serializable param[] = { strPersonId };
    System.out.println("The Controller Date passed is CBUtil "+sDate);
    System.out.println("The PersonId "+strPersonId);
    oaAM.invokeMethod("insertRow", parameters);
    oaAM.invokeMethod("initQuery", param);
    oaAM.invokeMethod("execQuery");
    String flag = "2";
    //pageContext.putSessionValue("strPersonId", strPersonId);
    pageContext.putSessionValue("PFlag1", flag);
    pageContext.putSessionValue("SDateSession1", sDate);
    pageContext.setForwardURL("OA.jsp?page=/EmployeeTest/oracle/apps/per/webui/EmpIBUtilPG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true, // Retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES, // Show breadcrumbs
    OAWebBeanConstants.IGNORE_MESSAGES);
    Hi Above two are the controller codes forget the rest of the codes,Concentrate on the PFR code, Just want to know what I am doing is correct or not.
    First time when I select the Picklist value,the value gets passed as a parameter to the custom package and the page gets displayed properly and vice versa,But I am not able to do the same cycle again for some reasons.
    Please get back to me ASAP.
    Regards,
    Magesh.M.K.
    Edited by: user1393742 on Oct 19, 2010 11:58 PM

  • Mouse is not working properly on a one month old HP Pavillion 15-NO28US

    I'm sure it's already been talked about on here, but I haven't found a successful fix or the same exact problem as I'm having. I went thru the latest Windows 8.1 update recently (at least I think it was the update) and when I restarted my computer yesterday the mouse was not working properly. Like a lot of other people who are complaining about it, the two-finger scrolling and other similar features are not working, but what really bothers me is the the mouse is almost acting like it was changed to a left handed mouse. I've checked the settings and it is still set on right-handed, but when I click the left mouse button the small window opens up next to where I clicked, which has the copy, delete and paste options (and other regular options) in it. When I click the right mouse button, nothing happens. Double tapping on the touchpad doesn't do anything either. I downloaded and install the latest synaptic drivers and nothing happened. I even performed a system recovery last night to reset all setting and it's still not working. This really sucks because I've only had this computer for about a month and I've already lost everything I've put on it...most importantly all of my school work and music apps. Is there anything to fix this or can anyone tell me what's going on with this stuff, before I have to call into HP and have a melt down?

    Hi Kevin3047,
    Thank you for your query, I will do my best to assist you!!
    I understand that after updating from Windows 8 to 8.1 your mouse is not performing correctly. You have tried the built in troubleshooter but to no avail.
    You checked the settings and they appear ok, but when you click the left mouse button the small window opens up next to where you  clicked, which has the copy, delete and paste options (and other regular options) in it. When you click the right mouse button, nothing happens. Double tapping on the touchpad doesn't do anything either. I grasp that you did a recovery but it did not help.  You also stated you lost your data once, and that in itself is extremely aggravating, I agree.
    Here is a step that may help.
    Go to the Command Prompt and right click on it to run as Administrator
    type sfc /scannow and press enter.  This will scan for corrupted files and try to repair them.
    Here are links to two documents that may aid with this process.
    Troubleshooting Mouse Problems (Windows 8)
    Using and Troubleshooting the TouchPad or ClickPad (Windows 8)
    Would you also please try a clean boot to see if it persists. Here is  a Windows document to assist you.
    How to perform a clean boot in Windows
    If none of this has alleviated the issue, I suggest you do a  Refresh Your PC to Resolve Problems (Windows 8).
    If the issue still pesists, I would do a recovery again.  You will be prompted during the recovery to backup your personal files to prevent data loss. I would suggest you choose yes, to prevent data loss.
    Performing an HP System Recovery (Windows 8)
    Restoring Files that were Backed Up Using HP Recovery Manager (Windows 8)
    This will take it back to factory. Here is a document on Updating Windows 8 to 8.1 to assist you with doing the update again.
    If you are still experiencing the issue, as @visruth stated I would contact HP support for assistance.  They are able to remotely log onto your system to help with this difficulty.
    Please call HP technical support at 800-474-6836. If you live outside the US/Canada Region, please click the link below to get the support number for your region HP Technical Support Sitemap.
    Good Luck!!
    Sparkles1
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom right to say “Thanks” for helping!

  • Undo,redo not working properly with JPopupMenu

    if i use JButton for undo ,redo it is working fine. but the same code is not
    working properly if i add it in JPopupMenu.
    what could be the problem.
    thanks

    what could be the problem.Your code is different or written incorrectly and since you didn't post any we can't help.
    [url http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html]How to Use Actions
    If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.

Maybe you are looking for

  • Can't put videos in full screen-5th generation

    Cant put music videos in full scree Just bought a iPod 5th gen I transferred all my music and music videos When I play the videos I get a a small video and when I turn the iPod I get the album cover How can I change this and make the view full screen

  • Since upgrading to 10.5.7, network "fades" out

    My trusty old G5 still works great for the tasks I require of it and has faithfully responded to every system upgrade until 10.5.7. When I first boot it up, my account is set to launch Camino (my "second" browser) with a special URL that tracks stats

  • Can't connect over d-link, why? Is airport better?

    i just spent the evening trying to have a PBookG4 connect to the internet over a d-link 1310 wireless router with cable access. The computer sees the router and can configure it, the router is obviously connected to the net. but why can't the mac mak

  • Need help with Apache on OS X Server 10.4.8

    I am unable to get mod_rewrite to work... Additionaly, bonjour is not working at all. I am wondering if there are any known issues (that I could not find) and/or helpful solutions. I was considering doing a recompile based on the instructions found a

  • Dead space in a table

    Thank you for the information. I would like to ask one question regarding spacing between cells I have got rid of the pace in dreamweaver but as soon as I preview it in IE there is a big between the rows and columns. How do I get rid of that dead spa