How to prevent action (lead selection change) with popup (confirmation)?

Hello all,
I have an application where I want the user to confirm when he selects a new line in a table. When the user selects a new line in the table an other used component reloads its data based on the new line selected. If the user has not pressed the save button before selecting a new line, any changes in the used component will be lost.
Currently I use onLeadSelect action on the table to call the load_data method(id=xxx) on the used component in order to display data relevant for id=xxx based the new line.
I can open a popup to confirm from the onLeadSelect-action or the WDDoBeforeAction, but the action still happens; it doesn't wait for the user to respond. And then any changes are lost...
I may have to store the parameters sent to the onLeadSelect method in context and continue when the button action from the pop-up returns via subscribed method, but I think this is an unelegant way of doing this.
There must be a better way...? Any ideas?
Regards,
Christian Frier

on the lead select event handler you can show the popup and no other logic. Move your logic to the ok and cancel button handlers of the pop up.

Similar Messages

  • How to Disable the Lead selection Action on aTable n How to Refreh a Page

    HI....
    1)How to Disable the Lead selection Action on aTable n How to Refreh a Page r web dynpro application.
    In my case i have a table n user enters data on multiple rows in table , n i have some input fields outside of table for those Inputs fields am settiing the data  at the screen initilization(in Init() moethod by hard code).the problem is whenever the is clicking in th 2nd row of a table the Lead Selection is triggerig and the data in the Input Fields outside the table is not displayinig.
    So by removing the lead Selection Action of a table i thought i can reslove this,
    2) How to refresha page(like we click F5 on key board),is it can be done thru code in web dynpro application
    Regards
    Rajesh

    Hi,
    You did not explained what is your functionality or coding in leadselection. Is that action on leadselection is necessary for you?.
    1)If you just want to remove the action then go to table properties and remove the action for leadselection.
    2)If you still want to continue with your leadselect action, then what you can do is.. write the code in leadselection action to again set the input fields which are out from table.  That is what you did in your init method.
    Page Refreshing
    3) What do you mean by page refreshing? is that refreshing your table only or both the table and input fields. 
         What I understood is you are allowing the user to enter values in table and soon after pressing a button the values should be saved and the data in input fields shld be deleted.  For this if you only invalidate the node then the user entered data will be lost. 
    So what you do is after getting the input data from the user add it to a ArrayList and then invalidate the node which clears the data in input field. Finally bind the Arraylist to your node.  see the following code. This is a concept make changes according to your requirement
    ArrayList list1=new ArrayList();
    wdContext.nodeAbc().bind(list1);
    IPrivateExcelviw.IAbcElement ele = wdContext.createAbcElement();
      ele.setNo(wdContext.currentAbcElement().getNo());
      ele.setName(wdContext.currentAbcElement().getName());
      ele.setMarks(wdContext.currentAbcElement().getMarks());
      list1.add(ele);
      wdContext.nodeAbc().invalidate();
    wdContext.nodeAbc().bind(list1);
    Revert me if you have any doubts
    Regards
    Raghu
    Edited by: Raghunandan Madarikuruva on Oct 16, 2008 8:07 AM

  • How to read the Lead Selection in Search UIBB

    Hello,
    I have a Search UIBB implementation with the list from Search UIBB.
    When the user double click any line in the List we want to call another program.  Not sure how to read the Lead selection. I see the event ID FPM_RESULT_LEAD_SEL  in Process_Event method and GET_DATA method but not sure how to get the actual line.
    Thanks in advance for any help.
    Regards,
    PK

    Hi ,
    method IF_FPM_GUIBB_SEARCH~PROCESS_EVENT.
    CASE IO_EVENT->MV_EVENT_ID.
    WHEN  IF_FPM_GUIBB_SEARCH=>FPM_RESULT_LEAD_SEL.
      READ TABLE   IT_RESULT_LIST  into  IS_RESULT_LIST index IV_LEAD_INDEX.
    ENDCASE.
    Where  IT_RESULT_LIST -> is the internal table of   ET_RESULT_LIST( This can be declared in attributes section and assigned value in GET_DATA method )
      IS_RESULT_LIST-> is a structure of type  table  IT_RESULT_LIST.
    IV_LEAD_INDEX has to be created at attributes section and the value of the selected row of type I can be assigned in IF_FPM_GUIBB_SEARCH~FLUSH method for the same event.
    Regards,
    Harsha

  • How to retrive data from selected checkboxes with fieldnames

    hi experts,
    how to retrive data from selected checkboxes with fieldnames into another alv grid report.(here the fieldnames selected from  table names is dynamically).
    thankx in advance
    rani.k.

    Hi,
    Use user_command in the alv grid and then
    do the follwoing code
    FORM user_command1 USING lv_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    Declaration of local Variables
      DATA : lv_ref1 TYPE REF TO cl_gui_alv_grid.
      DATA lv_cnt TYPE i.                                    "+INS SUHESH 12.07.2008
    Check function code
      CASE lv_ucomm.
        WHEN 'ONLI'.
          CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
            IMPORTING
              e_grid = lv_ref1.
          CALL METHOD lv_ref1->check_changed_data.
    now loop ur final internal table where check = 'X'.
    now pass data to other internal table..Now the internal table will be having values that the user selcetd on the screen.
    Hope this helps.
    Regards,
    Nagaraj

  • How to block lead selection change in a tree ?

    Hi Guys,
    <u>Scenario</u>
    I have MasterTree - DetailEditor pair. <i>MasterTree</i> is used to visit some tree-structured data and <i>DetailEditor</i> is used to edit currently selected tree node.
    <u>Requirement</u>
    If currently selected node data is updated through <i>DetailEditor</i> and needs to be saved, than on a subsequent tree selection change the user should be warned about unsaved data.
    <u>Implementation</u>
    In <b>onAction</b> event handler of <i>MasterTree</i> I check whether last selected node data is updated and needs to be saved and if this is the case rollback <i>treeSelection</i> to that node. On the time <b>onAction</b> event handler is called the tree selection is changed from the node that needs save to the newly selected node. In order to rollback <i>treeSelection</i> I need to introduce variable referencing last selected tree node.
    <u>Question</u>
    Is there any other technique to implement above scenario without using additional variable and manually rollback <i>treeSelection</i> ? For example, to plug in WDP framework on validation step just before lead selection is changed.
    Thanks in advance

    Alex,
    Here is a link to the phase model of WD:
    http://help.sap.com/saphelp_nw04/helpdata/en/b8/cd96edb9c8794aa362e6e8b4236a1f/frameset.htm
    There aren't any hooks provided prior to the event handlers being called. As far as I can tell, the way you are handling it is the only way that will work.
    -Cindy

  • Automatic lead selection change line in WD table

    Hi all,
    In footer of WD table, there is an input field, where user can specify number of record, which will be shown in first visible line.   
    I need to automatically select this line as lead selection. How can I achieve this behaviour? ( I'm using NW 2004 SP 19)
    Thanks for any answer.
    Regards,
    Juraj

    Hi Juraj,
    Assuming that when first time the view containing the table is loaded their is no changes required.
    Only when you enter some value in the input field then that record should be shown as first visible row ans should be lead selected.
    Now,
    1. Create a context attribute ctx_rowinput.Bind this context to the input field.
    2. Create a action say onInputShow and associate this with the input field.
        Either use a button and associate the action to the button or OnEnter event of input field.
    3. In your action onInputShow();
      public void onActionInputShow(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        int i = wdContext.currentContextElement().getctx_rowinput();
        wdContext.node<table node>().setLeadSelection(i);
    4. In your wdDoModifyView add the following code
      public static void wdDoModifyView(IPrivateTest_Table_View wdThis, IPrivateTest_Table_View.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
        //@@begin wdDoModifyView
        if(!firstTime)
              IWDTable table =(IWDTable)view.getElement("Table");
              table.setFirstVisibleRow(wdContext.currentContextElement().getctx_rowinput());
        //@@end
    <b>Note: If you enter 3 in the input field it will show 2 record as the node index
    starts from 0.And also before setting the leadselection and visible row check if
    the input value exceeds the nuber of rows in the table.</b>
    This has worked for me.

  • How to prevent user from selecting a specific printer?

    Hi there
    I have a MailFolder which has an ArrayList of Email objects inside it. Each MailFolder has an attribute called folderFile which is a reference to a folder in the operating system. Each Email has an attribute called parentFile which is a reference to a file in the operating system.
    Now, I am trying to put printing into my application.
    When I print using a normal printer like my HP Deskjet or the likes - an actual physical printer - everything works fine. But when I print using the Microsoft Office Document Image Writer, things go wierd. The following things happen;
    I call myMailFolder.getFolderFile().exists() and this = false. But if I (in the debugger) make a new file pointing to the same path, .exists() = true. Also if I look in the OS, the file exists. So somehow in the job.print() this Document Image writer seems to be messing up this file reference. The same thing happens to the myEmail.getParentFile().
    So to fix this, can anyone tell me how to prevent the user from selecting this printer, or can anyone tell me why this is happening only with the Document Image Writer?
    Many thanks!
    Rachel

    I have similar problem with our printing program. I am printing Java Tables, zoom in every column in a landscape page accross multiple pages.
    There are two fatal problems:
    1. On Dell Latitude laptop, the HP5100 printer didn't work; I have to change the code to draw the table header with 2D graphics.
    2. Crash when printing on MS document image writer, but on some computers
    it works perfectly.
    Any one have a good solution/same result for topic 2?
    Thanks,

  • How to listen for cell selection changes within a JTable

    Problem: my table has 8 columns, with 4 of them containing very large text (up to 1000 chars). Solution is to set the initial size these columns so that the 1st 20 chars are visible, and if one of these columns gains focus/selection via mouse-clicking/tabbing/arrow keys, the entire text is shown in a JTextArea below the table.
    I added a ListSelectionListener to the table, but this only informs me when the row selection has changed.
    I added a FocusListener to the table, but this only informs me when the table gains/loses focus, not when it's been changed within.
    I added a TableColumnModelListener to the TableColumnModel, but this only informs me when the column selection has changed.
    I didn't bother with MouseListener as this won't handle change of selection via tabbing.
    The LSL got me half way there, and the TCML got me the other half. Any ideas on how to combine?
    Or is there something obvious that I'm missing?

    Walter Laan wrote:
    Use both and call the same method which updates the text area based on the current selected (or focused == lead selection index) cell.Yeah - that's what I figured. I just didn't know if there was a magic bullet (i.e., a single listener) out there that I was missing.
    While you are at it, also add a table model listener which calls the same method if the selected cell is updated.I'll keep that in mind, but it's not necessary in this particular case. The table cells in question will be uneditable. The text area will have supporting Edit/Save/Cancel buttons.

  • How to replace the existing selection screen with new selection screen

    Hi,
    I have first selection screen with parametre as a table name, then I have created dynamic selection screen as 2nd selection screen with different fields of that table as select options. This is done using genaration of dynamic report. Now If I click on button on this 2nd selction screen , then I want to replace this 2nd dynamic selection screen , with the other selection screen fields.
    Can anybody guide me, How to do replace one slection screen with different selection screen.
    and one imp thing is this selction screen is populating with dynamic fields on it.
    Regards,
    Mrunal

    As I can understand you want to make some of the screen field to disable or visible on screen  depending upon the interaction of user with screen 1.
    You may use this example code in PBO of screen 2.
    LOOP AT SCREEN.
        " action has been taken to modify the area office screen as per the option chosen at screen 99.
        CASE ACTION.
            " if the user has taken up the option of UPLOAD
          WHEN 'UP'.     " screen processing while we upload the plan
            " during upload we will make dates as output fields only
            IF SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_TO' OR SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_FRM'.
              SCREEN-INPUT = 0.
              MODIFY SCREEN.
            ENDIF.
            " also make 2 buttons disabled
            IF SCREEN-NAME = 'AO_DO' OR SCREEN-NAME = 'AO_VE'.
              SCREEN-ACTIVE = 0.
              MODIFY SCREEN.
            ENDIF.
          WHEN 'DN'.      " screen processing while we upload the approved plan
            " during upload we will make dates as output fields only
            IF SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_TO' OR SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_FRM'.
              SCREEN-INPUT = 0.
              MODIFY SCREEN.
            ENDIF.
            " also make 2 buttons disabled
            IF SCREEN-NAME = 'AO_UP' OR SCREEN-NAME = 'AO_VE'.
              SCREEN-ACTIVE = 0.
              MODIFY SCREEN.
            ENDIF.
          WHEN 'VW'.      " screen processing while we view the plan
            " during upload we will make dates as output fields only
            IF SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_TO' OR SCREEN-NAME = 'ZSDTPLANVRSIO-DAT_FRM'.
              SCREEN-INPUT = 0.
              MODIFY SCREEN.
            ENDIF.
            " also make 2 buttons disabled
            IF SCREEN-NAME = 'RLGRAP-FILENAME' OR SCREEN-NAME = 'FNAME'.
              SCREEN-ACTIVE = 0.
              MODIFY SCREEN.
            ENDIF.
            " and hide the file input field
            IF SCREEN-NAME = 'AO_DO' OR SCREEN-NAME = 'AO_UP'.
              SCREEN-ACTIVE = 0.
              MODIFY SCREEN.
            ENDIF.
        ENDCASE.
      ENDLOOP.

  • How to veto a JComboBox selection change in ItemListener

    I have a JComboBox whose current value is tied to some data cached in my application. I want to be able to examine the selection in an ItemListener attached to the JComboBox, and if the value is different than what I have cached, I want to ask the user if they really want to change because the change will render some other data as no longer valid. If the user wants to abandon the change, then I want to "abandon" or "veto" the selection change and reset it to the old value.
    For instance, if the combo box has values "Foo" and "Bar" in it, and "Foo" is the cached selection, then the user goes and changes the selection to "Bar", I want to prompt them with something like "You have changed the value to Bar. Doing so will render XXX no longer valid. Do you want to continue?" -- if they cancel the change, then leave the selection as "Foo".
    What is the best way to do this within ItemListener's itemStateChanged? Are there better ways to do this besides what I've outlined? I didn't see anything in "Core JFC" book or the JDK documentation that discussed this sort of thing.
    Thanks in advance,
    Eric

    Hi,
    It is a design problem and not realy a language problem... The way I create vetoing design it that a keep the previous selection of the JComboBox... upon action I look if the application can do the new computation...if not...ask the user... if true| run calculations if not set the JComboBox to the previous selection...
    JRG

  • How to 'veto' a jList selection change

    Hi All,
    I have a JList which I'm using as a record selector - so whenever my user selects an item on the list, the associated record is loaded up into the other controls on this form for editing. If the user edits any of the data items, I want to ask whether to save changes or not if another item is selected from the JList. So, I've added code in my 'selection changed' function to check for changes and show a 'yes/no/cancel' JOptionPane. The code for my 'yes' and 'no' respones work fine - either save the changes or not, then show the next record. My problem is handling if a user clicks cancel...
    If the user selects 'Cancel', I dont want any of my "show new record" code to execute (this is easy, I can just 'return' out of the function) but also I don't want the JList selection to change. I've tried calling setSelectedIndex() back to the originally selected item, but this in turn triggers my 'selection changed' function to be called again, which causes the user to be asked twice whether they want to save changes!
    So, what I'm after is a kind of beforeSelectionChanged event, which allows the possibility of denying the selection change - but it doesn't look like this exists! I vaguely remember another language (possibly C++/MFC) having this - the user's action could be ignored depending on the return value of the function. Can anyone offer a way of achieving this in Java?
    (It's been a while since I last touched Java, and I'm a complete n00b with Swing. Using NetBeans as my IDE.)
    Thanks in advance for any suggestions!
    Andy

    The way I do it, is to implement a VetoableSelectionModel similar to a bean with a vetoable property: on selection change it queries registered VetoableChangeListeners if they don't object and backs out if one of them barks.
    HTH
    Jeanette

  • How we can disable lead selection programitically?

    Hello,
    I have a standard SAP's WDA and it has a TABLE (not ALV pls.) node, I mean, the node is defined as Cardinality 0...n; Selection 0...n; Lead selection is checked
    For some reason, we need to disable/uncheck this Lead seelction so that default lead selection will not occur and user has to explicitly select the row
    Pls. let us know how can we achieve our requirement, code snippet pls. if u get a chance
    Thank you

    Hi,
    I agree with Mr. Jozef's suggestion to use CLEAR_SELECTION
    You can achieve your requirement as below
    Create post exit enhancement for WDDOMODIFYVIEW( ) method
    Identify the context node bound for standard table and write the below code
              data lo_node type ref to if_wd_context_node.
             " Clear the selected row(s) only for first time
              if FIRST_TIME eq abap_true.
                   lo_node = wd_context->get_child_node( name = wd_this->wdctx_my_node ).
                   lo_node->clear_selection( ).
              endif.
    Note: Replace 'my_node' with your node name
    Hope this helps you.
    Regards,
    Rama

  • How to disable a lead selected item in a radio button group ?

    Hi,
    I have a radio button group and there are entries to create radio buttons dynamically. means there is only one radio button group in the UI design and in runtime I will be having two radio buttons (For ex: Yes and No ) . Now If I want to disable either Yes or No radio button, I am unable to do so. because If I disable the radio button group it disables both.  So, I can have lead selected item for ex: Yes which I want to disable. I want to know specifically how this Yes button to be disabled by taking lead selected index item.
    Please help.
    Thanks
    Praveen

    Try setting the radio button value of the lead selected button to abap_false/space.

  • How to revert back User Management  changes with SAP ep6

    Hi,
    While implementing sso for R/3 with sap EP, we did some changes in SAP System of UM configuration, after that we are not able to login with existing super user.
    We changed the existing userid SAPJSF to some other value in SAP system of UM. This is causing the problem.
    How can I revert back the changes as currently I am not able to access the UM Configuration?
    Which file can be change for reverting back the changes?
    Thanks,
    Manish

    Hi Heiko,
    I restarted server two times but it does not work. I also reverted the changes from propertysheet as well. Still it does not work.
    After that I looked in defaultTrace.trc file and found the exception <b>[EXCEPTION]
    #1#com.sap.engine.frame.ServiceException: User is locked. Please notify the person responsible</b>
    The exception detail is below:     
    1.5#0011435A6406001D0000000F000013E80003FB0CCFA7CC82#1120457372187#com.sap.engine.core.service630.container.ServiceRunner##com.sap.engine.core.service630.container.ServiceRunner#######SAPEngine_System_Thread[impl:5]_17##0#0#Error#1#/System/Server#Java###Core service com.sap.security.core.ume.service failed. J2EE Engine cannot be started.
    [EXCEPTION]
    #1#com.sap.engine.frame.ServiceException: User is locked. Please notify the person responsible
         at com.sap.security.core.server.ume.service.UMEServiceFrame.start(UMEServiceFrame.java:531)
         at com.sap.engine.frame.ApplicationFrameAdaptor.start(ApplicationFrameAdaptor.java:31)
         at com.sap.engine.core.service630.container.ServiceRunner.startApplicationServiceFrame(ServiceRunner.java:201)
         at com.sap.engine.core.service630.container.ServiceRunner.run(ServiceRunner.java:142)
         at com.sap.engine.frame.core.thread.Task.run(Task.java:60)
         at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java:73)
         at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:145)
    Caused by: com.sap.security.core.persistence.datasource.PersistenceException: User is locked. Please notify the person responsible
         at com.sap.security.core.persistence.datasource.imp.R3PersistenceBase.newPersistenceException(R3PersistenceBase.java:2099)
         at com.sap.security.core.persistence.datasource.imp.R3PersistenceBase.init(R3PersistenceBase.java:2315)
         at com.sap.security.core.persistence.imp.PrincipalDatabagFactoryInstance.<init>(PrincipalDatabagFactoryInstance.java:280)
         at com.sap.security.core.persistence.imp.PrincipalDatabagFactory.getInstance(PrincipalDatabagFactory.java:224)
         at com.sap.security.core.server.ume.service.UMEServiceFrame.start(UMEServiceFrame.java:528)
         ... 6 more
    Can you please tell me that how can I unlock the user as my portal is not coming up. Your reply will be helpfull to me.
    Warm Regards,
    Manish

  • How to go for lead selection

    Hi All,
    I have three views.The first is the search view and the other two are the tables view.
    In the second view..I have to display the data from the BAPI in to the table..and on the lead selection of any row and after pressing the Get Detail button I should get the Details from the BAPI for the particular row in the Third view or Table.
    Kindly provide me the logic to make it working.
    Thanks in advance.
    Regards
    Dipendra

    Hello Dipendra,
    View1 -> View2 -> View3
    Navigation through this views can be achieved by navigation plugs as you may already be aware of.
    Sample code available in the location
    <a href="http://sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d">http://sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d</a>
    See samples '1 | 2 | 10 | 15 | 40 '
    So after navigation logic is implemented, next step is to pass lead selection data from view2 to view3. This can be done by storing leadselection index in the Contoller context and access the same from view3. So just get the index and get the nodeElement and display the details.
    Regards,
    Sudeep.

Maybe you are looking for

  • External Video not working

    I'm running a dual 2.5 ghz G5 w/ 10.3.9, using FCPHD. I was editing last night and everything was perfectly fine. This morning I get up, and now my external video doesn't work. I'm using a Sony DCR-TRV17 minidv camcorder. The video clips run fine in

  • Term Store searching Tool

    Hi Everyone, I'm currently building a tool that will allow people to do basic "maintenance" with their term stores. This idea came about when I was tasked with writing a PowerShell script to show us all term that did not adhere to company policy.  I

  • Broken speaker?

    I have a problem with calls - the speaker simply doesnt work! Sometimes it helps when I turn on the loudspeaker option, but not always. I've checked the speaker in "diagnosing" and everything works well, it seems not to work "only" when I'm making ca

  • Playback Controls won't work

    I just installed CS4 Production Premium after upgrading my RAM to 3GB, and the playback control doesn't work. However,all of the other buttons work. The "record" button brings up the recording dialog, etc. Does anyone have any idea what is going on h

  • PR Type from SO 3th party always NB

    Dear All When I create SO 3th party, the PR Type always automaticly NB. I want PR type is ZNB by automaticly can you help me, please thanks imron