Clicking on JTabbedPane showConfirmDialog whether to retain the values

I have 2 panel in the jtabbedpane.
Each panel has a jtable and the user able to add rows and do some calculations.
If the user clicks the 1st panel in the JTabbedpane and add few rows and calculations are done.
Then clicking the 2nd panel in the Jtabbedpane, before showing the 2nd panel it should showconfirmdialog OptionPane with Yes or No (You want to retain the values) .
if the user press Yes the value shoule be retained.
if the user press No reset all the values.
Now I have tried with jatabbedpane.addMouseListener();
How to perform this functionality.
Thanks you all.

Consider
JTabbedPane.addChangeListener(ChangeListener l)

Similar Messages

  • Doubt : retaining the value between the calls

    hi,
    Which statement would you use to declare a variable, within a Function Module/Form-routine, so as it will retain the value between the calls?"
    Gaurav

    Dear Gaurav,
    To retain the same value outside a function module, you can define a variable with the same name as the exporting parameter in a function module. However in case of Subroutines you can pass the value by reference as any change in the formal parameters will be reflected in the actual parameters.
    Check the following links for further clarification:
    http://help.sap.com/saphelp_nw70/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db975c35c111d1829f0000e829fbfe/content.htm
    Regards,
    Rajesh K Soman
    <b>Please reward points if found helpful.</b>

  • Retain the values

    hi all,
    I am looping through a ResultSet to set properties of an Class(cl). Then I add each class to the vector(vt) by casting the cl into Object. But when I try to retrieve elements from the vector. I only get one element as though all the elements in the vector are occupied by only one element.
    Tell me how to retain the values(Objects) in the vector?
    Here I set the properties and load the vector
    aud is an Object
    vt_aud is the vector
    while(rs.next())
    aud.setFirstName(rs.getString(1));
    aud.setLastName(rs.getString(2));
    aud.setEmail(rs.getString(3));
    vt_aud.add((Object)aud);
    To retrive
    for(int i=0;i{
    aud = (audience)vt_aud.elementAt(i);
    firstname = aud.getFirstName();
    lastname = aud.getLastName();
    email = aud.getEmail();
    System.out.prinln(firstname);
    The problem is it prints only the last record of the resultSet.
    Thanks for help.

    Hi,
    Java only stores references to objects in collections such as Vector. If you want to store several different objects in the Vector, you need to make sure each one is a separate object, not just the same object re-used each time.
    Try this code:
    Vector vt_aud = new Vector();
    while(rs.next()){ 
    audience aud = new audience();
    aud.setFirstName(rs.getString(1));
    aud.setLastName(rs.getString(2));
    aud.setEmail(rs.getString(3));
    vt_aud.add(aud);}
    or, if you have control over the "audience" class, you can add a constructor and simplify the loop:
    Try this:
    Vector vt_aud = new Vector();
    while(rs.next()){
    vt_aud.add(new audience(rs.getString(1),rs.getString (2),rs.getString(3)));}
    Hope this might help you.
    Anil.
    Developer Technical Support,
    Sun Microsystems, India.
    http://www.sun.com/developers/support

  • Need to retain the values of LOV in Apex

    Hi,
    I had created three lovs namely A,B, and C in which A is the parent of B and C is an independent LOV. For parent child realtionship between the LOVS A and B, I had used the Ajax on demand process.
    Now in my project all the three LOVs are mandatory, so what i want if suppose any user clicks on submit button without selecting any value from LOV C, then it must load to the same page and show an error. My problem is that after the page load, LOVs A and B are not retaining their earlier values and set to default values In my application I want to retain them.
    I hope my problem is clear.
    Please help.
    Thanks
    Saurabh

    OK, now it is a different story.
    First, you don't need to remove the page# from the action section as long as it is NOT in the clear cache attribute.
    Second, You said that you are using AJAX to load the value of B , and I beleive that currently you have a JS that fires OnChange on item A. You need to call the same JS code when loading the page as follows:
    In you page attributes :
    Page HTML Body Attribute>> onLoad="your_function();"
    where your_function is the same function you call when you change A's value to get B's value..
    Hope this helps.
    Sam

  • Multiple print for pdf form retains the value from previous!

    Hello All,
    We have developed Adobe Print Forms for our business requirements.
    When we try to print these forms from the direct transaction, it prints fine. But when we try to select multiple forms to be printed with one transaction, the pdf form generated has data from all the selection!
    Eg: Form printed properly for Delivery Note through transaction VL02N.
    The same form when we try to print for multiple deliveries from transaction VL71, i retains the data and prints one huge form having all delivery data!!
    Please help us out in this issue and let us know what is tha we are missing in this process!
    Thanks a lot for your time and help.
    Gaurav

    Hi ,
    i think that the problems comes form the data you give to the form, do you make a refresh of internal table before populated them ...
    regards

  • Multiple select list not retaining the value for the first time

    Hi,
    I have a 3 select list depends on each other. select_list1 -- > select_list2 --> multiselect3. I have use denes example to create them.
    For the first time when I select values from 1,2,3 and runs a report based on it, it works fine but *does not retain the selected value in multiselect3.
    for the second time submit the process, it retails value in multiselect3. Please tell me if you came across this issue before
    Here is the code.
    function get_select_list_xml_VL(pThis,pSelect,pSelect1,pSelect2){
    var l_Return = null;
    var l_Select = html_GetElement(pSelect);
    var l_Select1 = html_GetElement(pSelect1);
    var l_Select2 = html_GetElement(pSelect2);
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
    'APPLICATION_PROCESS=Cascading_Select_List_VL',0);
    get.add('F660_CASCADING_TEST',l_Select1.value + '_' + pThis.value + '_' + l_Select2.value);
    alert(l_Select1.value + '_' + pThis.value + '_' + l_Select2.value);
    // alert(document.getElementById("F660_CASCADING_TEST").value);
    gReturn = get.get('XML');
    if(gReturn && l_Select ){
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for(var i=0;i<l_Count;i++){
    var l_Opt_Xml = gReturn.getElementsByTagName("option");
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
    l_Opt_Xml.firstChild.nodeValue)
    get = null;
    function appendToSelect(pSelect, pValue, pContent) {
    var l_Opt = document.createElement("option");
    l_Opt.value = pValue;
    if(document.all){
    pSelect.options.add(l_Opt);
    l_Opt.innerText = pContent;
    }else{
    l_Opt.appendChild(document.createTextNode(pContent));
    pSelect.appendChild(l_Opt);

    Please ask any question if you dont understand about the problem.
    Thanks

  • Advance Editor - External Column when I try to set the value and click OK doesn't sets or retains the set value...

    Data Source is OLEDB connecting to AdventrureWorks2012 
    Setting Person.Address table column SpatialLocation to move it's data to Excel File
    Connection Manager created
    Right click on Source and choose Advance Editor 
    External Column SpatialLocation Data Type DT_IMAGE and Output Column DT_BYTES Click OK is fine 
    Destination is Excel Destination
    Connection Manager created
    Right click on Source and choose Advance Editor 
    External Column SpatialLocation Data Type DT_BYTES and Output Column DT_BYTES by default click OK and Advance Editor dialog got closed
    Now I open Advance Editor check the settings found that my settings not accepted instead sets "Unicode string [DT_WSTR]"
    Is there any bug? or any ideas how to make it work to save settings.
    FYI yesterday I carried it was OK worked fine but today it's not working I have no changes to my system.
    If you have a questions please let me know.
    Any help is appreciated.

    Hi Sarojamaly,
    I’m curious about the reason why you need to change the External Column data type in OLE DB Source. As per my understanding, we couldn’t change the External Column data type in OLE DB Source. Because the External Column data type is dependent on the source
    table. We can only change the output column data type via Advance Editor or some transformations, like Data Conversion, Derived Column etc.
    If there are any misunderstanding, please elaborate the issue for further investigation.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Field not retaining the value

    we have a report that we copied from a standard program and made some modifications, when we run that report it provides the list of the accounting documents and the user has the ability to modify the doc and then post it. we are expreiencing a problem now, when user generates the list of the documents and select one and try to make a change to it ... like changing the amount, g/l account.. evrything worked fine but when user tried to change one of the field like order number and hit enter after that... the field is getting cleared out after that.
    Can you please suggets something.

    thnks for the reply... I found that the issue is in SAP std tcode as well.

  • Numbers is not retaining the values of my sorted SUMs in a column.

    I just switched to Numbers 3.0.1
    I have a two tables: Table 1 has a large set of data. Table 2 has various sums of the data from Table 1 (added by using the SUM function). Pretty simple stuff.
    My problem is when I go to sort the data (SUMs from Table 1) in Table 2 using the ascending/descending option all of the data in the column changes and makes no sense.
    Older version of Numbers just sorted the data in the column numerically (ascending or descending).
    Does anyone have a fix for this?

    I find the new way Numbers handles cell references during a sort to be a little odd.  First let's talk your problem then I'll mention another.
    I think for your problem, you need to use "preserve row" on all your cell references.  Otherwise the references become "relative".  For example, if you have =SUM(Table 1::A2:A3) in cell B4 of Table 1 before the sort and it moves to cell B5 after the sort, the formula will become =SUM(Table 1::A3:A4). The formula moved down one row so the cell references also moved down one row.  Seems like a strange result but you can prevent it by using =SUM(Table 1::A$2:A$3)
    For the other problem, let's say you leave Table 2 (the sums) alone and sort Table 1 instead. This also changes all the sums. It makes sense what it is doing but I haven't yet figured out a way to make it do what it used to do.
    If you look at your SUM formulas, they will stay exactly the same after the sort.  If it was =SUM(Table 1::A1:A10) before the sort it will still be exactly that after the sort.  But now you have different numbers in those cells in Table 1 so your sum is different.  In Numbers '09, it would have turned into something like =SUM(A5,A9,A2:A3,A19,.....) as it readjusted to sum up the exact same cells as before. I can''t figure out how to make a SUM or an addition or any other calculation follow a cell around during a sort.

  • Need to retain the screen input after user clicks BACK

    Hi,
    I have a report program in HR, using LDB "PNP" and Report category : PSSPCDOC.
    After the program is executed and the report is displayed on screen, if the user clicks the BACK button (F3), the selection screen is displayed with initial values. The input values provided by the user previously get lost.
    I debugged and it seems that the memory gets cleared everytime the BACK button is clicked.
    But i want to retain the user inputs on the selection screen if the user clicks the BACK button because the user wants to change some selection inputs not all.
    I am new to HR module, please let me know how to solve this issue.

    Hi,
    In your screen in the application bar,the right most button  is a coloured monitor kind of icon, next to the Help icon (which is a white question mark in a yellow circle) ,click on this monitor icon ,then under the  Local Data tab there is a History Block, select radio button History ON.
    I hope it helps.
    Regards,
    Shraddha

  • Breadcrumb doesn't retain the previous page values

    I have the following hierarchy in my pages. home > search > summary > details.
    The user goes to the search page gives a criteria and the summary page shows all the required matching results. Now the summary results is a table of name, id, date etc. The id field is a hyper link which when clicked takes to the details page.
    My problem is that when I am on the details page and I click on the "summary" breadcrumb it works fine and navigates to the summary page but doesn't show the results that it previously showed. So the breadcrumb forgets the values.
    Also I have another problem: Say a user enters a search criteria and there are no results found and the user is now in the summary page. Then if the user clicks on the search breadcrumb the search page opens. It works fine till here. But this is what is required. In the text fields the value with which the search was performed should be present.
    Can anyone help please ?
    Thanks in advance.

    Any one with any ideas as to how to go about implementing this ?
    Bread Crumbs is working fine but it doesn't retain the values !!!!!!!
    Thanks in advance.

  • How to retain the presentation variable values for Dashboard Prompt

    I've a dashboard prompt with date and two other drop down field, with default value as yesterday's date set for date and All Values set for other two drop down list. Presentation Variables are D1, P1 and P2 respectivilly
    I'm using GO URL from "Report A" and passing presentation variable to navigate to other report (Report B) that works fine. eg:
    '<a href = saw.dll?GO&path=/shared/Reports/ABC/ReportB&Action=Navigate&p0=1&p1=eq&p2="-%20Time"."Next%20Day"&p3=@{d1}>Test</a>'
    From Report B I'm using Dashoard URL to go back to Previous Report like:
    <div class="XUIPromptEntry minibuttonOn">
    Return to Previous Screen</div>
    This also works fine.
    My problem is that, when users selects different values in the Main dashboard prompt for date and other other two drop down and navigates to other report (Report B), and from Report B, when user returns to previous screen (Main Dashboard), Prompts values gets refreshed to original default values.
    Is there any way to retain the values of presentation variable in dashboard Prompt when I return to main dashboard from Report B?
    I'd appreciate your help.
    Thanks

    Change your dashboard url include the column and column value for the date column sample shown below,
    [a href=saw.dll?Dashboard&PortalPath=/shared/sample/_portal&page=pagename&Action=Navigate&col1=Dim.Date&val1=@1>Return to Previous Screen[/a>
    In my second report Date is the first column so I referenced it's value as @1 in the dashboard URL
    note: replace [ with <
    Thanks,
    Vino                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Retain last value in text box

    Hi all,
    I created a html page to the content server. In that page I created a popup. When I call the popup I can write some text in the textbox to do a search on my database. Then, the results are displayed in the popup. However, if I want to do a new search I have to write again in the text box. My question is: How can I retain the last thing that I wrote in text box? (only when the popup is open)
    Like the content server does when we click on Quick Search. It shows the results and retain the value on the search box.
    Thanks in advance,
    Edited by: RRS on 27/Mai/2009 8:12

    Hey RSS,
    Yes correct, you have to change <input type="text" id="designation" name="designation" value="">
    so your line will look like this:
    <input type="text" id="designation" name="designation" value="javascript:document.getElementById('designation');">
    My javascript is a bit rusty so if that doesn't work try: value="javascript:document.getElementById('designation').value;
    (adding a .value at the end)
    Another way of doing it can be by modifying your line <form name="Entities" method="POST" action="<$HttpCgiPath$>"> and say:
    <form name="Entities" method="POST" onclick="document.getElementById('designation').value=
    document.getElementById('designation').value" action="<$HttpCgiPath$>">
    NOTE: for this last one to work u need to have that inside javascript tags, or add "avascript:" at the begining like I did for the input value above.
    Cheers,

  • Retaining a Value in a variable

    Hi,
    I have a sender query (query 1)and a receiver query(query2). The sender query has a user entry variable C on an info object A(of length 18). The receiver query has a customer exit variable D  on an info object B(of length 4).
    The customer exit variable D has to derive the last 4 digits of the user input variable C in query 1.
    I have linked A and B in the assignment details of the RRI using the variable option.
    The problem that i'm facing is that when a jump is performed the variable D has to derive its value from the variable C but when query 2 is triggered by the jump that value in variable C is lost and hence D cannot be populated. Is it possible to retain the value of variable C even after i run the second query so that i can derive D from C.
    Help would be highly appreciated

    Hi,
    why not trying th efollowing:
    Assign B as NAV-Attribute to A, containing the last 4 digits of the 18 digits string.
    assign B to BOTH queries and use it in the assignment details "generic".
    ANother way: assign A to Query2 with variable E, type replacementpath, filled by values out of query 1.
    Derive Value for D in step 2 of the var E.
    Actually, the first way seems to be easier ... to me ...
    hth
    cheers
    sven

  • Changing the value of a row from bean code.

    Hello,
    I apologies for my bad English, and my bad knowledge of jdeveloper...
    I had never work with Oracle, jdeveloper, adf... before this Month, but I have to migrate one "window" from forms to jdeveloper 11g r2 for my Internship...
    The problem I am encountering:
    This in the "window": http://imageshack.us/f/268/configp.png/
    There is a master detail link between the top form, and the center table Table1.
    When i click on a row of Table1, the layout at the right (at the top of the picture) will display an inputText, a slider, ... or a Table, depending of the row selected in Table1.
    When it displays a table (Table2), i want, when i doubleClick on a line of Table2 , that it retrieves the value "VoarArtiCode" of the selected line, to the column OvpdOvprCode of the selected line od Table1.
    I tried this:
    public void DoucleClickTable2((ClientEvent clientEvent))
    System.out.println("DoucleClickTable2 START");
    //Affect the value needed to voarArtiCode
    JUCtrlHierNodeBinding nodeBinding = this.getSelectedColumnOfTable((RichTable)clientEvent.getComponent());
    String voarArtiCode = (String)nodeBinding.getAttribute("VoarArtiCode");
    //Set the new value
    AttributeBinding ovpdOvprCode = (AttributeBinding)getBindings().getControlBinding("OvpdOvprCode");
    ovpdOvprCode.setInputValue(voarArtiCode);
    System.out.println("DoucleClickTable2 END");
    Or this
    public void DoucleClickTable2((ClientEvent clientEvent))
    System.out.println("DoucleClickTable2 START");
    JUCtrlHierNodeBinding nodeBinding = this.getSelectedColumnOfTable((RichTable)clientEvent.getComponent());
    String voarArtiCode = (String)nodeBinding.getAttribute("VoarArtiCode");
    getQuestionSelectedRow().setAttribute("OvpdOvprCode", voarArtiCode);
    System.out.println("DoucleClickTable2 END");
    But that DIDN'T WORK :S
    The row in my Table1 didn't change...
    So I created the classe Table1ViewRowImpl.java
    Put a print in this method:
    public void setOvpdOvprCode(String value) {
    System.out.println("setOvpdOvprCode(): value= " + value);
    setAttributeInternal(OVPDOVPRCODE, value);
    And when i double click on a row of Table2 with the value "1" in VoarArtiCode in the Table2 and the value "2" on OvpdOvprCOde in the Table 1 get :
    DoucleClickTable2 START
    setOvpdOvprCode(): value= 1
    DoucleClickTable2 END
    setOvpdOvprCode(): value= 2
    The value is reset to the original value 2, automatically ...
    I tried lots of things, but none works...
    To sum up:
    How can i change a current data Binding attributeValue from java ?
    Someone have a solution for me ?
    Thank you in advance
    Julien
    Edited by: 870381 on 5 juil. 2011 16:23
    Edited by: 870381 on 5 juil. 2011 16:25

    You should try to avoid traversing the tree especially in the case that you have selected rows. I think what you should try to first is ensure that your current row on the detail is updated on-select of the master. After you have that figured out, an attributeBinding will directly represent your selected row on that iterator.
    With that, it's as easy as using ControlBindings to update your value.
    => It is well updated
    So, basically, you should try to simplify your usecase to the point where you're working in one record at a time, if you have a table then its much better that you configure all the time (which is by default it already does that) the currentRow, then use attributeBindings.
    Ok I did this:
    DCIteratorBinding iteratorBinding = (DCIteratorBinding) getBindings().get("Table1View1Iterator");
    iteratorBinding.getCurrentRow().setAttribute("OvpdOvprCode", "test");
    But that still don't work !!
    It is like that the value that i change is automatically reset to the original...
    Is it caused by the master-detail link ?
    Haaaaa my 2nd day of work on that "little" problem :'(

Maybe you are looking for