How to open show detail item on ADF link click

Hi,
Can anybody tell me how to open show detail item tab on link click ??
thanks,
Nitesh

Hi,
what Frank is saying..
1. select showdetailitem component
2. go to disclosure property
3. attach a managed bean variable (return true/false)
4. in the commandLink method set the variable true/false depending on requirement
or
1. select showdetailitem component
2. create a binding in the managed bean
3. in the commandLink method set showdetailitembinding.setDisclosed(true/false);
4. add PPR
refer http://jobinesh.blogspot.in/2010/12/programmatically-disclosing.html
~Abhijit
Edited by: Abhijit Dutta on Mar 12, 2013 5:20 PM

Similar Messages

  • How to stretch background image, How to change show detail item header

    Hello all I have a few questions I would like to pose humbly to your collective wisdom, FYI I use Jdeveloper 11.1.3 and ADF Fusion
    First, how do I stretch the background Image? I have a background image in a show detail item but it is very small. 400 by 400. Thing is it's just a pic of the color red gradually moving from bright to dark in the image. So stretching it should not make it look horrible, but also repeating it makes it look silly, because you have 50 little images of dark red to bright red, instead of one big image of dark red to bright red. Can this be done and how?
    Secondly how do I change the header of the show detail item in a Panel Accordion? I have 8 Show detail items, in the middle of my page and the user can click and switch between which one is open, which makes for a nice effect, but I would like to give each of the show detail items a particular color. I did this with the backgrounds but I can't do it with the header, which are always visible, while only one background is visible at a time. I tried using the skinning technique but I wasn't able to change the header (I changed the background so the skinning was done correctly). I used
    af|panelAccordion::header
      color: blue;
      font-family: Arial, Helvetica, sans-serif;
      background: Maroon;
      background-color: Maroon;
    }Because I read in the Fusion Guide (or somewhere) that the show detail item cannot be skinned and therefore doesn't have a property like af panel Accordion.
    Can it though be achieved through some other means?
    Third when I drop the data control on the page and if I pick search form, why can't I use the CreateInsert button? Why can't I use the form to Create new rows? It keeps giving me some type of error, like Row is out of bounds or something? Is that some mistake with my database, or page, or is it not possible to do it like that?
    I welcome your words of guidance and also happy new year Huzzah!!!
    Edited by: Dino2dy on Jan 4, 2011 2:01 AM

    Thanks I haven't really had time to play around with this, as I have other concerns, but I do plan on coming back to it, and it is one of the things about ADF that really is bothersome. Creatively it means I can choose between 2 styles when making an app Blaf Rich and Fusion (the other ones are just worse versions of the two) while I will concede that the superb out of the box functionalities and things I can do declaratively probably mean I won't have a Dreamweaver type freedom of design I thought there might be a way to do some of these custom design changes.
    A few questions though
    When you skin the accordion are you able to propagate the changes to show detail item headers? Because that is one thing that I really want to change, just the color of the headers but I was unable to do so.
    Also there is a component that is not part of a panel accordion or panel tabbed called panel box. Again I changed the backgrounds to great effect but I need to change the panel header and in this I failed.
    Granted I used the css color attribute for both not a picture so maybe that is the reason. Just wondering if you succeeded.
    Cheers

  • Programatically switching show detail item

    Hi All,
    I have 2 show detail items in af:paneltab
    in first show detail item i have link on click of the link i need to switch to the second show detail item.
    so i wrote by function and binded it to actionevent of the command link as below
    for (UIComponent child : internalTabs.getChildren()) {
    RichShowDetailItem sdi = (RichShowDetailItem)child;
    if(sdi.getText().equals("Faulted and Rejected Messages"))
    sdi.setDisclosed(false);
    else
    sdi.setDisclosed(true);
    AdfFacesContext.getCurrentInstance().addPartialTarget(internalTabs);
    where internalTabs is binding to af;PanelTab and Faulted and Rejected Messagesis second tab text
    for the first time it is switching correctly to second showdetailITem.when we again come to the first Showdetailitem on click of it. from that time onwards it is not switching but function is getting called.
    i am using jdev11.1.1.5
    Thanks in advance

    Hi,
    Please check if you can get any help from the code below:
    private String selectedItem="sdi2";
    public void displaySelectedItem(ValueChangeEvent valueChangeEvent) {
    RichPanelTabbed richPanelTabbed = getPanelTabbed();
    for (UIComponent child : richPanelTabbed.getChildren()) {
    RichShowDetailItem sdi = (RichShowDetailItem)child;
    sdi.setDisclosed(isThisItemToBeDisclosed(sdi));
    private boolean isThisItemToBeDisclosed(RichShowDetailItem sdi) {
    FacesContext context = FacesContext.getCurrentInstance();
    return selectedItem.equals(sdi.getClientId(context));
    private RichPanelTabbed getPanelTabbed() {
    FacesContext context = FacesContext.getCurrentInstance();
    return (RichPanelTabbed)context.getViewRoot().findComponent("pt1");
    Regards

  • How to Stretch Components in Show Detail Item - Jdev 11.1.2

    Hello:
    I have a panel splitter-verticle, and in the second facet I have a panel stretch layout and in that a panel tabbed. Inside a show detail item, I have another panel splitter-verticle. Inside the first facet, I have a af:query and in the second facet I have a af:form. But both the af:query and the af:form do not stretch to fill the open space, when I move the first splitter.
    What is required to have the af:query and af:form inside a show detail item with a splitter stretch to fill the open space?
    Thanks for the help.
    Edited by: 862658 on Aug 11, 2011 6:29 AM

    Hi,
    set the showDetailItem StretchChildren property to First
    Frank

  • PPR on Show detail Item is not working

    Hi Team,
    I want to completely show / hide the show detail Item based on selection in other showDetailItem . I have used the ppr to achieve this functionality. But its not working.
    Any suggestions please.

    hi user,
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1">
          <af:form id="f1">
            <af:panelTabbed id="pt1"
                            styleClass="AFStretchWidth"
                            binding="#{backingBeanScope.Mbean.pt1}">
              <af:showDetailItem text="showDetailItem 1" id="sdi1"
                                 rendered="#{backingBeanScope.Mbean.cb1.selected}"
                                 binding="#{backingBeanScope.Mbean.sdi1}"/>
              <af:showDetailItem text="showDetailItem 2" id="sdi2"
                                 rendered="#{backingBeanScope.Mbean.cb2.selected}"
                                 binding="#{backingBeanScope.Mbean.sdi2}"/>
              <af:showDetailItem text="showDetailItem 3" id="sdi3"
                                 rendered="#{backingBeanScope.Mbean.cb3.selected}"
                                 binding="#{backingBeanScope.Mbean.sdi3}"/>
            </af:panelTabbed>
            <af:selectBooleanCheckbox text="check tab1" id="sbc1" autoSubmit="true"
                                      binding="#{backingBeanScope.Mbean.cb1}"
                                      valueChangeListener="#{backingBeanScope.Mbean.cb1s}"/>
            <af:selectBooleanCheckbox text="check tab2" id="sbc2" autoSubmit="true"
                                      binding="#{backingBeanScope.Mbean.cb2}"
                                      valueChangeListener="#{backingBeanScope.Mbean.cb2s}"/>
            <af:selectBooleanCheckbox text="check tab3" id="sbc3" autoSubmit="true"
                                      binding="#{backingBeanScope.Mbean.cb3}"
                                      valueChangeListener="#{backingBeanScope.Mbean.cb3s}"
                                      partialTriggers="pt1 sdi3"/>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>
    import javax.faces.event.ValueChangeEvent;
    import oracle.adf.view.rich.component.rich.input.RichSelectBooleanCheckbox;
    import oracle.adf.view.rich.component.rich.layout.RichPanelTabbed;
    import oracle.adf.view.rich.component.rich.layout.RichShowDetailItem;
    import oracle.adf.view.rich.context.AdfFacesContext;
    public class Mbean {
        private RichSelectBooleanCheckbox cb1;
        private RichSelectBooleanCheckbox cb2;
        private RichSelectBooleanCheckbox cb3;
        private RichShowDetailItem sdi1;
        private RichShowDetailItem sdi2;
        private RichShowDetailItem sdi3;
        private RichPanelTabbed pt1;
        public Mbean() {
        public void setCb1(RichSelectBooleanCheckbox cb1) {
            this.cb1 = cb1;
        public RichSelectBooleanCheckbox getCb1() {
            return cb1;
        public void setCb2(RichSelectBooleanCheckbox cb2) {
            this.cb2 = cb2;
        public RichSelectBooleanCheckbox getCb2() {
            return cb2;
        public void setCb3(RichSelectBooleanCheckbox cb3) {
            this.cb3 = cb3;
        public RichSelectBooleanCheckbox getCb3() {
            return cb3;
        public void cb1s(ValueChangeEvent valueChangeEvent) {
            // Add event code here...
            cb1.setSelected(true);
            AdfFacesContext.getCurrentInstance().addPartialTarget(pt1);
        public void cb2s(ValueChangeEvent valueChangeEvent) {
            // Add event code here...
            cb2.setSelected(true);
            AdfFacesContext.getCurrentInstance().addPartialTarget(pt1);
        public void cb3s(ValueChangeEvent valueChangeEvent) {
            // Add event code here...
            cb3.setSelected(true);
            AdfFacesContext.getCurrentInstance().addPartialTarget(pt1);
        public void setSdi1(RichShowDetailItem sdi1) {
            this.sdi1 = sdi1;
        public RichShowDetailItem getSdi1() {
            return sdi1;
        public void setSdi2(RichShowDetailItem sdi2) {
            this.sdi2 = sdi2;
        public RichShowDetailItem getSdi2() {
            return sdi2;
        public void setSdi3(RichShowDetailItem sdi3) {
            this.sdi3 = sdi3;
        public RichShowDetailItem getSdi3() {
            return sdi3;
        public void setPt1(RichPanelTabbed pt1) {
            this.pt1 = pt1;
        public RichPanelTabbed getPt1() {
            return pt1;
    it should work.

  • How do you show calendar items in Mail?

    How do you show calendar items in Mail?

    The only way possible to send a non-text file by e-mail is as an attachment. Different e-mail programs will handle JPEG attachments differently. Some will show the attachment within the message and some will not.

  • How to insert PO details in an ADF based form and initiate the process flow

    Hi All,
    Could any one let me know how to insert PO details in an ADF based form and initiate the process flow in oracle BPM. This ADF form will be custom one....How to create a ADF custom based form.Please let me know the step by step process..Am new to BPM
    Thanks in advance,
    sreevani

    Hi All,
    Could any one let me know how to insert PO details in an ADF based form and initiate the process flow in oracle BPM. This ADF form will be custom one....How to create a ADF custom based form.Please let me know the step by step process..Am new to BPM
    Thanks in advance,
    sreevani

  • How to open an Applet from a text link in a HTML Page

    Hi There
    How to open an Applet from a text link
    in a HTML page
    For example I have a HyperLink "Open Applet"
    When a user clicks that link i want to open a
    Applet in a AWT Window.
    How can i do this
    Will any one help me?
    -Ramya

    u can use javascript for that
    <SCRIPT language="javascript">
    function loadAppNow() {
    document.write("<APPLET ......></APPLET>")
    </SCRIPT>
    LoadApplet
    this will overwrite the applet on current window
    There are many good ways other than document.write to open in same window. I don't remember the syntax right now.
    Plz. refer to javascript tutorial for that.
    even you can insert the applet while retaining previous contents. its quite easy actually.
    regards....bhart

  • How to display the details of particular order when click on button in sapui5

    Hi Experts,
        How to display the details of particular order when click on button in sapui5?
    I Have a requirement that is i want display all the list of orders coming from backend as shown in image below
    then in that i have a button when i press the button  it need to display the details of particular order as shown in image below
    Please help me .
    Thanks & Regards
    chitti

    Does anyone know how to display the index of current desktop?
    Brute force - - I have written the number of the Desktop directly onto the wallpaper picture I am using for each Desktop  (easy to do with Preview).
    All Desktops are using different wallpaper photos, so they are easily recognized by the color scheme, and in the upper left corner is the number.
    Regards
    Léonie

  • How to open PO line item

    how to find  out
    OPEN PO line item
    by  using EKKO & EKPO table

    Nilesh,
    Check this post
    Open PO's
    Reward if this helps,
    Satish

  • How to open an asset item.

    Hi,
    I want to open an asset item. Which can be used in purchase orders.
    What are the attributes to set at the time of opening an asset item.

    Hi M;
    Please check http://download-west.oracle.com/docs/cd/B34956_01/current/acrobat/120cseig.pdf and see its helpful for your issue
    Regard
    Helios

  • How to open a jsf page on a link with a record . Link is in email

    Respected Friends ,
    I am facing a need for sending a email link to users for opening a form for processing a record . I have created a servlet for forwarding the user to the desired page on which we need to render a perticualr record. The servlet forwards the user to the required page but when the page is rendered it gives
    java.lang.NullPointerException     at iffco.wf.view.servlets.UserLinkRedirectServelt.getApplicationModule(UserLinkRedirectServelt.java:143)     at iffco.wf.view.servlets.UserLinkRedirectServelt.doPost(UserLinkRedirectServelt.java:125)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:712)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:369)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:865)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:447)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:215)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)     at java.lang.Thread.run(Thread.java:595)
    Please help me ,
    I want to know how i can load a page from a link with a perticular record .
    I am using jdeveloper 10.1.3 . Also when i acess the current application module from the servlet it gives me the null pointer exception.
    Thanks in advance

    HI FRANK THANKS FOR THE QUICK REPLY I AM PASTING THE CODE OF MY SERVLET..
    frank can you please provide me how to pass parametres along with jspx link and how to acess them in the managed bean .this will also solve my problem.
    package iffco.wf.view.servlets;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import iffco.wf.view.backing.LoginPageBean;
    import iffco.wf.view.utils.ADFJSFUtils;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.ViewObject;
    import oracle.jbo.client.Configuration;
    import iffco.wf.model.wf_servicesImpl;
    import javax.faces.context.FacesContext;
    import javax.faces.el.ValueBinding;
    import oracle.adf.controller.v2.context.LifecycleContext;
    import oracle.adf.controller.v2.lifecycle.PageController;
    import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCDataControl;
    public class UserLinkRedirectServelt extends HttpServlet {
        private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
        public void init(ServletConfig config) throws ServletException {
            super.init(config);
        /**Process the HTTP doGet request.
        public void doGet(HttpServletRequest request,
                          HttpServletResponse response) throws ServletException,
                                                               IOException {
            String var0 = "";
            String var1 = "";
            String var2 = "";
            response.setContentType(CONTENT_TYPE);
            PrintWriter out = response.getWriter();
            out.println("<html>");
            out.println("<head><title>UserLinkRedirectServelt</title></head>");
            out.println("<body>");
            out.println("<p>The servlet has received a GET. This is the reply.</p>");
            out.println("</body></html>");
            out.close();
            System.out.println("Inside doget method of servlet");
            LoginPageBean LoginBeanInstance = new LoginPageBean();
            System.out.println("Login bean initiated--->" + LoginBeanInstance );
            String nextJSP = "/faces/LoginPage.jspx";
            RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(nextJSP);
            dispatcher.forward(request,response);
        /**Process the HTTP doPost request.
        public void doPost(HttpServletRequest request,
                           HttpServletResponse response) throws ServletException,
                                                                IOException {
            String var0 = "";
            String var1 = "";
            String var2 = "";
            response.setContentType(CONTENT_TYPE);
            PrintWriter out = response.getWriter();
            out.println("<html>");
            out.println("<head><title>UserLinkRedirectServelt</title></head>");
            out.println("<body>");
            out.println("<p>The servlet has received a POST. This is the reply.</p>");
            out.println("</body></html>");
            out.close();
            System.out.println("Inside post method of servlet");
            LoginPageBean LoginBeanInstance = new LoginPageBean();
            System.out.println("Login bean initiated--->" + LoginBeanInstance );
            String        amDef = "iffco.wf.model.wf_services";
            String        config = "wf_servicesLocal";
            wf_servicesImpl service = (wf_servicesImpl)Configuration.createRootApplicationModule(amDef,config);
            System.out.println("service created --> "+ service);
            ViewObject vo=service.getLoginVO();
            System.out.println(vo);
            vo.setNamedWhereClauseParam("p_personal_no","109128");
            vo.setNamedWhereClauseParam("p_password","abc");
            vo.executeQuery();
            System.out.println("View Object has -->"+vo.getEstimatedRowCount()+" Rows");
            ADFJSFUtils newHelperClass = new ADFJSFUtils();
            System.out.println("New Helper Class Initated -->"+newHelperClass);
            ApplicationModule currentAM = newHelperClass.getDataControlApplicationModule("wf_servicesDataControl");
            System.out.println("Current AM is -->"+currentAM);
            ViewObject vo = currentAM.findViewObject("LoginVO");
            System.out.println(vo);
            vo.setNamedWhereClauseParam("p_personal_No","109128");
            vo.setNamedWhereClauseParam("p_password","abc");
            vo.executeQuery();
            System.out.println("View Object has -->"+vo.getEstimatedRowCount()+" Rows");
            System.out.println("Before method");
            wf_servicesImpl wfser=getApplicationModule();
            System.out.println("after method value got-->"+wfser);
            String nextJSP = "/faces/LoginPage.jspx";
            RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(nextJSP);
            dispatcher.forward(request,response);
        public wf_servicesImpl getApplicationModule() { 
                 FacesContext context = FacesContext.getCurrentInstance(); 
                 System.out.println("context --"+context);
                 ValueBinding vb = context.getApplication().createValueBinding("#{data}"); 
                 BindingContext bc = (BindingContext) vb.getValue(context); 
                 DCDataControl dc  = bc.findDataControl("wf_servicesDataControl"); 
                 return (wf_servicesImpl) dc.getDataProvider(); 
        private void redirect(
            ResponsePage aDestinationPage, HttpServletResponse aResponse
          ) throws IOException {
            String urlWithSessionID = aResponse.encodeRedirectURL(aDestinationPage.toString());
            aResponse.sendRedirect( urlWithSessionID );
          private void forward(
            ResponsePage aResponsePage, HttpServletRequest aRequest, HttpServletResponse aResponse
          ) throws ServletException, IOException {
            RequestDispatcher dispatcher = aRequest.getRequestDispatcher(aResponsePage.toString());
            dispatcher.forward(aRequest, aResponse);
    }

  • How to locate all content items where HTML link is missing?

    We went through a brief period where Dynamic Converter was not producing the HTML link on new check in of content items. Now we have that fixed, but we need to identify those files that lack the HTML link so we can fix that. How do we locate content items that lack the HTML link?

    Please find the URL which causes issue .
    I am not able to invoke the dispatch action in struts.
    /11/09 15:36:03 EFLBuilder: [instance=152748_BUILDERKIT_777946304, id=115210371784,4] ERROR: AbstractResourceRenderer.renderBody - Resource
    "/seminarDetails.mcs;jsessionid=0ad16e5530d73bf00b218e744ea3b74adf8413a2ef58.e34RahmKa3mRay0Lc3aKbhiLbxaKe6fznA5Pp7ftolbGmkTy?Menu=customer&'amp;actionCmd=seminarDetails
    Regards
    Prem

  • Item displayed when link clicked

    I have a form with a "submit button". The button is not really a button since it is based on a template, it seems to be made up of 3 images with links to submit the page.
    When a person clicks this submit link, is it possible to show an item or region that informs them to wait while their transaction is being processed (transaction can take up to 10 seconds)?

    Hello,
    There is an example of that right plus code here.
    http://apex.oracle.com/pls/otn/f?p=11933:69
    Carl

  • How to open Batch Details Form using a LinkedButton?

    Hi all,
    I just want to know how can I open the Batch Details system Form, using a LinkedButton from my user form.
    Just like the Batch Number Transaction Report window, from the Batch Column.
    It's difficult because this document don't have the ObjectType.
    Thanks a lot.
    Cheers
    David

    Solved!
    I did this:
    From the MatrixLinkPressedEvent:
    if (pVal.BeforeAction)
                        switch (pVal.ColUID)
                              case "column":
                                BubbleEvent = false;
                                AddOnApplication.Application.ActivateMenuItem("12290");//Form for Batch Details
                                form.EnableMenu("12290", true);
                                bool _runThread = true;
                                while (_runThread)
                                    Thread.Sleep(500);
                                    try
                                        ((SAPbouiCOM.EditText)AddOnApplication.Application.Forms.ActiveForm.Items.Item("40").Specific).Value = _dtGrid.GetValue("ItemCode", pVal.Row - 1).ToString();
                                        ((SAPbouiCOM.EditText)AddOnApplication.Application.Forms.ActiveForm.Items.Item("62").Specific).Value = _dtGrid.GetValue("Batch Hide", pVal.Row - 1).ToString(); ;
                                        AddOnApplication.Application.Forms.ActiveForm.DefButton = "38";
                                        AddOnApplication.Application.SendKeys("{ENTER}");
                                        _runThread = false;
                                    catch (Exception){}
                                    finally
                                        _runThread = false;
                                        form.Freeze(false);
    And that's it.
    Hope this help to someone
    Cheers

Maybe you are looking for

  • Media Encoder Multiplex fail - Mux suggestions?

    I edit continuing professional education seminars for streaming.  I use the same settings preset every time - a customer frame size in baseline profile H.264.  I have a particularly long project (8-hours) that I encoded overnight last night. AME log

  • FireWire 400&800 (IMAC Core2) NOT WORKING after Upgrading to SNOW LEOPARD!

    My FireWire 400&800 (iMAC Core2) are *NOT WORKING* after Upgrading to SNOW LEOPARD! Any Solutions? Thanks! --Frank Strallents www.SHOCKPROOFX.com

  • IWeb and Internet Explorer

    Hi all, I am a technician at a college, and we're using iWeb to publish websites for the students' coursework. Upon checking the health of the published pages, it is apparent that many of the students' work is not appearing in Internet Explorer corre

  • Remving EDGE and connecting to WIFI with a password

    After I downloaded an update on my first generation IPhone, I have only been able to access the WIFI that doesn't need a password but not password protected ones. I used to be able to access any WIFI as long as I had the password. I also notice that

  • About Key-Commit

    I have lots of complex validation written on Key-Commit trigger. But whenever user tries to clear the form, its asking "Do You Want To Save The Changes", if user says yes then Key-Commit Trigger is not firing. Same thing happens when user press Key-E