BSP close a page

Hello,
I'm new at BSP programming and I'm quite lost...
I have a BSP created without controllers, and I want to create a button which should close a page.
In the <u>layout</u> I have written:
<htmlb:button id     = "close"
                    text   = "<%= otr(/BSHF/HF_FI_INCOMINGINVOICE_F/CLOSE) %>"
                    onClick = "close"
                    design  = "standard" />
In the <u>Event Handler / OnInputProcessing</u>:
event = cl_htmlb_manager=>get_event( runtime->server->request ).
case event->id.
  when 'close'.
    <b>* What should be the code here?</b>
endcase.
<b>*</b> What is the instruction that makes the page close and goes back to the page that has called this one?
I hope any of you can help me...
Thanks in advance,
Ainara.

Hi,
You can simply use the javascript property of the object window....
so you can write....
<htmlb:button id = "close"
text = "<%= otr(/BSHF/HF_FI_INCOMINGINVOICE_F/CLOSE) %>"
onClientClick = "window.close()"
design = "standard" />
or else if you also want to confirm this...then....
<htmlb:button id = "close"
text = "<%= otr(/BSHF/HF_FI_INCOMINGINVOICE_F/CLOSE) %>"
onClientClick = "if(confirm('Are you sure you want to close this page'));{window.close()}"
design = "standard" />
Hope this helps.
<b><i>Do reward each useful answer..!</i></b>
Thanks,
Tatvagna.

Similar Messages

  • Why I can not unlock the record when close a page?

    I develop a jsp page as client,the jsp application use a business componment with statefull application module.i call a database rowset's lock function in jsp page to lock a record,now,after i close the jsp page without commit and rollback,the record is not unlocked,until i restart the oc4j application server.how can i unlock the record when close the page without commit and rollback?????

    Li Ping:
    If you lock a row in the course of a transaction, you cannot unlock the row until the end of transaction (either rollback or commit). DBMS doesn't allow this.
    Alternatively, you can try to delay locking of the row. E.g., you can try using optimistic locking. Please see the Java Doc for oracle.jbo.Transaction if you're interested in optimistic locking.
    Thanks.
    Sung

  • Spry Accordion - Tabs open and then close after page loads

    I am using a Spry Accordion menu driven from a database.
    The menu opens up during the page load and then closes.
    I'm using SpryAccordion.js 1.6.1
    And to open a preset tab, I'm using:
    <script type="text/javascript">
    <!--
    var Accordion1 = new Spry.Widget.Accordion("Accordion1",{useFixedPanelHeights:false, enableAnimation: false, defaultPanel: 0 });
    //-->
      </script>
    But, all of the tabs open and then close on page load.
    My page:   http://www.texashotjobs.us/00C01.aspx
    Any fix for this??
    Thanks, Ron

    Well to both thanks.  Actually I wasn't disappointed as I had a two part question...
    I tested the 1.6 JS and remembered that I had to modify the 1.4 so that tabs actually would link.  So I reverted back to 1.4.
    So, going to 1.6 fixed the open panel on load but "unfixed" the panel tab from linking.....
    So changing this in the 1.6 js fixed the link issue as well:
    Spry.Widget.Accordion.prototype.onPanelTabClick = function(e, panel)
        if (panel != this.currentPanel)
            this.openPanel(panel);
        else
            this.closePanel();
        if (this.enableKeyboardNavigation)
            this.focus();
    //    if (e.preventDefault) e.preventDefault();
    //    else e.returnValue = false;
    //    if (e.stopPropagation) e.stopPropagation();
    //    else e.cancelBubble = true;
    I t appears everything is working........
    Thanks, Ron Gaddis
    Visual Reality Productions

  • Unable to close home page tab or unable to close firefox by closing home page tab (when if that is the only last tab remaining in the browser

    Recently I noticed that I could not close my browser by closing the last tab, which is nothing but home page tab. also noticed that when I open my browser and after opening many other tab if I want to close home page tab I could not close. If I closed it then I cant navigate or surf from that tab.
    This may be due to some add-on causing trouble.
    The problem does not arise in safe mode. Also if I group tab after closing, it is counted as tab but I cant open that particular tab.

    # Click the orange Firefox button, then select Options to open the options window
    # Go to the General panel
    #Change the setting "When Firefox starts" to "Show my home page"

  • How do I close one page at a time?

    When I go from my email to a link and then can't get back to email using the back arrow I usually close that page and am back at my email. With Firefox I go to close and a message says that I am about to close 2 tabs and I have to say yes or it doesn't do anything and then it closes my email (which I am trying to get back to). Then to get back to my email I have to go through the multi step process to open it again and get back to the message I was reading before I opened the link. Frustrating! Pleas let me know who to be able to close only one link at a time. There must be a way or it will be too time consuming to use. Thank you

    Are there any entries in the tab history of the Back button on the Navigation Toolbar?
    Use one of these methods to open the tab history list:
    * Right click on the Back or Forward button
    * Hold down the left mouse button on the enabled Back or Forward button until the list opens
    You can close the current tab with a middle-click on that tab or via the keyboard shortcut Ctrl+W
    Make sure that you do not click the close X on the window title bar.
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • How can you close all pages in safari?

    On my iPad it is possible to close all windows in Safari.
    Is there a similar feature in Safari? Every time I clear the history, the last page remains open.
    How can I close that window as well without having to first create a new blank one?
    Regards

    Yes, ok, but then I still have to open a new page to continue browsing.
    on the iPad i can close all pages and safari for iOS defaults to favorites.
    regards

  • When i open firefox it instantly goes to the bottom of the page then opens a new one. i cant close the pages down the bottom and they are running in the background slowly everything down

    when i open firefox it immediately goes to the bottom tool bar and keeps running. a new home page then opens and i cant close the one at the bottom because there is no icon. these hidden pages keep playing old youtube song and another one with adds running. how do i close these pages please? also if i minimise firefox to go onto say, email, i cant retrieve it and have to then open another home page. argggghhhhhhhh. help please. thanks and have a great, 'quiet' day. beth

    This issue can be caused by an extension that isn't working properly.
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • The iBooks page on my iPad2 has locked. I cannot move on the page. I can close the page, and everything else is working fine. Does any one have any ideas for unlocking, resetting, or somehow getting the iBooks page to work? Thank you.

    The iBooks page on my iPad2 has locked. I cannot move on the page. I can close the page, and everything else is working fine. THis happened in the middle of a download. Does any one have any ideas for unlocking, resetting, or somehow getting the iBooks page to work? Thank you.

    Just re-set the App -
    Open the App
    Hold down the power button until the slider appears
    Hold down the home button (Don't use the slider) Until the App Closes
    You might lose your place, but shouldnt be too hard to find it again...

  • Has anyone tried creating a plugin that you can type in a specific word, and if it comes up in the very top of the page (i think its refered to as the header) it closes the page or tab automatically?

    Has anyone tried creating a plugin that you can type in a specific word, and if it comes up in the very top of the page (i think its refered to as the header) it closes the page or tab automatically? there is a program called POW! by AnalogX that does this, but its only good for IE. And Im a Firefox man. Can anyone look into this or maybe create a plugin that does what POW! does for IE? I will donate to the creater of a plugin that does that. Im so sick of pop ups that most pop up blockers miss.

    The Firefox pop-up blocker is very effective. If you are getting a lot of pop-ups in Firefox, you may have picked up some Malware that is causing those pop-ups.
    Install, update, and run these programs in this order. '''''(Not all programs detect the same Malware.)''''' They are all free for personal use, but some have limited functionality in the "free mode" - but those are features you really don't need to find and remove the problem that you have.<br />
    ''Note: If your Malware infection is bad enough and you are mis-directed to URL's other than what is posted, you may have to use a different PC to download these programs and use a USB stick to transfer them to the afflicted PC.''
    Malwarebytes' Anti-Malware - [http://www.malwarebytes.org/mbam.php] <br />
    SuperAntispyware - [http://www.superantispyware.com/] <br />
    AdAware - [http://www.lavasoftusa.com/software/adaware/] <br />
    Spybot Search & Destroy - [http://www.safer-networking.org/en/index.html] <br />
    Windows Defender: Home Page - [http://www.microsoft.com/windows/products/winfamily/defender/default.mspx]
    If these don't find it or can't clear it, post in one of these forums for specialized malware removal help: <br />
    [http://www.spywarewarrior.com/index.php] <br />
    [http://forum.aumha.org/] <br />
    [http://www.spywareinfoforum.com/] <br />
    [http://bleepingcomputer.com]

  • Why does clicking on a tab close that page?

    Usually, I am using multiple tabs and multiple instances of FF with multiple tabs also. When I go to another tab from the same browser instance, sometimes that page that I want to view again will close as if I had clicked on the "x" at the right side of the tab. I am not clicking on the "x" but near the center of the tab but the entire tab acts like I clicked on the "x" to close that page. The older versions of FF didn't do that.

    Create a new profile as a test to check if your current profile is causing the problems.
    See "Basic Troubleshooting: Make a new profile":
    *https://support.mozilla.org/kb/Basic+Troubleshooting#w_8-make-a-new-profile
    There may be extensions and plugins installed by default in a new profile, so check that in "Tools > Add-ons > Extensions & Plugins" in case there are still problems.
    If that new profile works then you can transfer some files from the old profile to that new profile, but be careful not to copy corrupted files.
    See:
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • How to close OA page by clicking on Submit_Button ?

    Hi,
    I have a requirement to close OA page when the user clicks on Submit_Button(save) on the same page. But we have a logic in CO(processFormRequest) to do some actions when the user clicks on Submit_Button, so I want to close the OA page once those actions completed in Submit_Button(save) logic. How can I achieve this requirement, please help me.
    Below is the code in Submit_Button(save)
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if(pageContext.getParameter("save") != null)
    OAMessageTextInputBean notesBean = (OAMessageTextInputBean)webBean.findIndexedChildRecursive("Notes");
    String scRecordId = pageContext.getParameter("searchTempId");
    String invNo = pageContext.getParameter("InvNo");
    String idFlag = pageContext.getParameter("IdFlag");
    String value = (String)notesBean.getValue(pageContext);
    Serializable param[] = {
    scRecordId, value, invNo, idFlag
    am.invokeMethod("getNotes", param);
    }

    First of all thanks to Shree to respond to my question.
    I didnt try as you suggest bcz I think it will not work to my requirement. But I have tried your solution directly in the Save button logic but it is not working.
    Let me explain my entire requirement:
    I have one search page, in that we have Notes column with notes image in Search Results.
    When the user clicks on that Notes Image, it is going to open one new page.
    In that new page we have one Textbox(MessageTextInput), One Save(Submitbutton), Cancel(Button).
    User will type some notes in the Textbox and then he will click on Save then the data gets saved into particular table column and user will click cancel button to close that page.
    Then user will click on Apply button in the main page then there are some actions going to perform.
    Now user wants to close that page when user clicks on Save button after entering the notes in Text box.
    I have tried following coding in Save button logic.. at the end of the save button logic
    pageContext.putJavaScriptFunction("keyListener", "function keyListener(){window.close();}
    OASubmitButtonBean cb=(OASubmitButtonBean)webBean.findChildRecursive("save");
    cb.setOnClick("keyListener()");
    and
    pageContext.putJavaScriptFunction("keyListener", "function keyListener(){window.close();}");
    OAWebBean body = pageContext.getRootWebBean();
    if (body instanceof OABodyBean)
    body.setOnKeyPress("keyListener()");
    but no luck
    Please advice me...

  • Can't close web pages.

    After just doing the ios 5 update, i no longer
    have web pages button on my navigation bar so I cannot close web pages. Anyone else have this problem?

    Safari on iOS 5 uses tabbed browsing and not the thumbnail/page browsing as on previous versions of iOS. To close a tab tap the '-' that is on the left end of each tab (you can't close final tab), and to open a new tab you can tap the '+' on the right-hand end of the tab bar.

  • BSP(Business Server Page) in ABAP

    Hi Sapient
    I would like to knw how to use BSP (Busines Server Pages) wats the tcode and to navigate thru it?
    Pls explain
    Rewards of helpful answer
    Regards
    Santosh.

    Hi,
    to work on BSP's , goto SE80 transaction(object navigator),
    and select BSP Application from the dropdown list provided.
    and here u can create BSP application.
    and by using the tagbrowser u can use html/htmlb tags for writing the code.
    --->
    BSP Concepts
    Application Class
    The application class, is a regular ABAP Objects class, that can be assigned to the BSP application, to ebcapsulate the BSP logic ans store data and make it available across BSP pages. This data is stored as attributes.
    The only requirement for an application is that the constructor is parameter-less. If not, the application class cannot be generically instantiated by the BSP runtime environment.
    The global object application can be used in the BSP application to access the attributes and methods of the application class.
    You do not have to use an application class in your BSP application. It is an optional way for you to structure your BSP application .
    The application class is assigned to the properties of the BSP application:
    Application Basis Class CL_BSP_APPLICATION
    If an application class does not already have a super class, it can be derived from the predefined base class CL_BSP_APPLICATION. This class provides methods that are typically required by a BSP application for embedding in a Web environment. This is how information about the current BSP application (such as session timeout, current URL of BSP application, state mode, and so on) can be called or set.
    As the application object is an application attribute in every BSP event handler, the methods of the CL_BSP_APPLICATION class are also available with the corresponding inheritance. This makes it easy to provide the relevant functionality to lower application levels using a single object reference
    Using the application class in an event
    The application class is used just as an ordinary class
    CALL METHOD application->kunde_gettable
    IMPORTING
    kunde_table = i_zkunder.
    Statefull/Stateless
    Statefull
    A stateful BSP application is executed like a normal SAP transaction, – independent of all user interactions - in one single context (roll area). This means that data specified by the user during the application execution or data determined by the application itself is available potentially throughout the entire execution duration of the session.
    Stateless
    Stateless BSP applications only block resources on the SAP Web Application Server during the time one single request is being processed. When the request has been processed, all resources in particular the application context are returned to the system for use in other requests.
    Statefull or Stateless ?
    As a rule of thumb, it is recommended that Internet scenarios used at the same time by a large number of users operate in stateless mode. Stateful programming is recommended for more complex applications that are used by a limited number of users in parallel and that operate with data that is expensive to determine.
    BSP Tips and Tricks
    How to use form fields in the event handler
    This examples shows how to read the value of a form field, and use it in an event handler.
    The user keys in the field zzkunnavn in the form nand presses then Save button.
    Layout
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <html>
    <title>Use form field</title>
    <h1>Use form field</h1>
    <body> <form method = "post" name="x">
    <input type="text" size="50" maxlength="50"
    name="zzkunnavn">
    <input type=submit name="onInputProcessing(save)"
    value="Save">
    </form>
    </body>
    </html>
    Page attributes
    The field zzkunnavn must be defined in the Page attributes of the screen
    Event handler OnInputProcessing
    CASE event_id.
    data: l_kunnavn type string.
    WHEN 'save'.
    Sets value of parameters, i.e. gets value from screen
    navigation->set_parameter( name = 'zzkunnavn').
    Gets value of parameter, so can be moved into abap field
    Note: zzkunnavn declared in page attributes
    l_kunnavn = navigation->get_parameter( name = 'zzkunnavn').
    Regards,
    vineela.
    Edited by: Radha Vineela Aepuru on Mar 12, 2008 8:12 AM

  • Can not close web page out since upgrading IOS 8

    Can not close web page out since upgrading IOS 8

    Tap the minimize icon (two boxes) in the upper right corner of the Safari page. Then tap the tiny x in the thumbnail to close. You can also swipe the thumbnail to the left to close.

  • My web screen is frozen (grey shaded) and will not let me close out page.

    my web screen is frozen (grey shaded) and will not let me close out page.  4 pages open now.

    Tap the home button to go to the home screen. Then go to Settings>Safari>Clear history, Cookies and Cache. Restart the iPad. Hold down on the sleep button until the red slider appears and slide to shut down. then press the sleep button and hold until the Apple logo appears. Let go of the button and let the iPad boot up. Try Safari agin.

Maybe you are looking for