Skip to Content
author's profile photo Former Member
Former Member

Pop-Up Window

Hi Experts,

I have a Pop-Up Window which consists of an OK Button.

When i Click On that OK button,the Cursor should be placed in the second Input Field of the Screen.

How can this be done.

Please let me know.

Thanks and regards,

Chandrashekar.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 19, 2008 at 07:23 AM

    Hi,

    You can create a context and set its value on the OK button's event of the confirmation window.

    Check this value in the wdDoModifyView.

    if(<condition>)

    {

    IWDInputField input = (IWDInputField)view.getElement(<id>);

    input.requestFocus();

    }

    Regards,

    Murtuza

    Add a comment
    10|10000 characters needed characters exceeded

    • It means, it is not able find your context attribute. Usually it doesnt happen after your code change like this.

      IWDAttributeInfo attribute = wdContext.nodeAbcnote().getNodeInfo().getAttribute(IPrivateCurrentUserView.IAbcnoteElement.STATUS2);

      STATUS2 - is your context element which is binded to the input field.

      Try this, change your context element directly to the Context instead of Context - Abcnote - Status2.

      IWDAttributeInfo attribute = wdContext.getNodeInfo().getAttribute(IPrivateCurrentUserView.IContextElement.STATUS2);

      IWDNodeElement nodeElement = wdContext.currentContextElement(); // current element

      if(attribute != null)

      wdThis.wdGetAPI().requestFocus(nodeElement, attribute);

      Regards,

      Sridhar

  • author's profile photo Former Member
    Former Member
    Posted on Feb 19, 2008 at 07:25 AM

    Hi,

    place the following code in your button action handler

    IWDAttributeInfo attribute = wdContext.getNodeInfo().getAttribute("name"); //attribute info of your second input field
    	IWDNodeElement nodeElement = wdContext.currentContextElement(); // current element 
    	wdThis.wdGetAPI().requestFocus(nodeElement, attribute);
    
    

    Regards

    Ayyapparaj

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Ayyapparaj,

      I have done the same as you explained but i am getting NullPointException when i click on the OK button.

      I am giving the stack trace for your information.

      java.lang.NullPointerException

      * at com.sap.tc.webdynpro.progmodel.view.ContextBindingManager.getViewElementViaEditablePropertyBinding(ContextBindingManager.java:88)*

      * at com.sap.tc.webdynpro.progmodel.view.View.requestFocus(View.java:588)*

      * at com.abc.servicecenter.sapwai.wdcomponents.popupwindowscomponent.ErrorMessageView.onActionExit(ErrorMessageView.java:155)*

      * at com.abc.servicecenter.sapwai.wdcomponents.popupwindowscomponent.wdp.InternalErrorMessageView.wdInvokeEventHandler(InternalErrorMessageView.java:142)*

      * at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)*

      * at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)*

      * at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doHandleActionEvent(WindowPhaseModel.java:420)*

      * at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:132)*

      * at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)*

      * at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)*

      * at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:321)*

      * at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)*

      * at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)*

      * at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)*

      * at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:150)*

      * at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)*

      * at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)*

      * at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)*

      * at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)*

      * at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)*

      * at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)*

      * at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)*

      * at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)*

      * at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)*

      * at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)*

      * at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)*

      * at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)*

      * at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)*

      * at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)*

      * at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)*

      * at java.security.AccessController.doPrivileged(Native Method)*

      * at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)*

      * at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)*

      Please help me out to find and the solution for this issue.

      Thanks and regards,

      Chandrashekar.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.