Disable close button of a portlet?

Hi,
How can I disable close button of a portlet programettically? I have a requirement to disable a portlet based on some condition from another portlet. If the condition is true I have to display a portlet with close button in window bar.Otherwise display the portlet without close button.
Thanks
Pradeep

We actually modified the buttondelete.jsp in frameworks.
Kunal Mittal

Similar Messages

  • To disable close button of the UDF form

    Hi,
    I need to disable the close button of a UDF form. Can anyone help me pls.
    Manu.

    Hi Manu,
    Herewith a code example... This would disable the close button on the Sales Order window (and only the first window)
      Dim oform As SAPbouiCOM.Form
      <i>'loop through all the forms here if you need</i>
      <i>'i am using "-FormType" here as the UDF window has the same UID as the normal form, but with negative sign</i>
      oform = oApplication.Forms.GetForm("-139", 0)
      Dim oItem As SAPbouiCOM.Item
      <i>'Close button is 4</i>
      oItem = oform.Items.Item("4")
      <i>'Disable button</i>
      oItem.Enabled = False
    Hope it helps,
    Adele

  • How to disable close button during runtime

    Hi everybody.,
    Please help me how to disable the close button at top of the window during runtime. I dont want the user to use that button to close. I have used button called Exit in that form but sometimes users closing by clicking that button.
    I am using Oracle form 10g R1.
    Thanks in Advance,

    Hi,
    Thanks Mr. Arif Khadas for your quick reply.
    While running the form, in window there will be two close button, one is in form and another one is in Internet Explorer. By making changes on the property what you said above this will hide only the form's close button. I want to hide the internet explorer close button also.
    Thanks in advance.

  • Disable "Close" button of command prompt through LabVIEW using Win32 APIs

    Hello all,
    I am trying to disable the close button of a third party console application that I am invoking through LabVIEW. I tried using GetSystemMenu() and DeleteSystemMenu() from user32.dll, but somewhere I am doing it wrong.
    Can anyone can suggest a solution to this?
    Thanks!
    FraggerFox
    -FraggerFox!
    Certified LabVIEW Architect, Certified TestStand Developer
    "What you think today is what you live tomorrow"
    Solved!
    Go to Solution.

    Do you have the handle to Window?  Off hand, I don't know how to delete it, but here is some C# code that I used to grey out the close window button in another project:
            [DllImport("user32.dll")]
            private static extern IntPtr GetSystemMenu(IntPtr hWnd, bool bRevert);
            [DllImport("user32.dll")]
            private static extern bool EnableMenuItem(IntPtr hMenu, uint uIDEnableItem,
               uint uEnable);
            private const Int32 SC_CLOSE = 0xF060;
            private const UInt32 MF_BYCOMMAND    =0x00000000;
            private const UInt32 MF_ENABLED = 0x00000000;
            private const UInt32 MF_GRAYED = 0x00000001;
            private const UInt32 MF_DISABLED = 0x00000002;
            private void EnableClose(bool enable)
                IntPtr pSysMenu = GetSystemMenu(Handle, false);
                if (pSysMenu != null)
                    EnableMenuItem(pSysMenu, SC_CLOSE, MF_BYCOMMAND | (enable ? MF_ENABLED : MF_DISABLED));
    This was fairly easy to convert over once I had the handle (this is from a library I picked up somewhere).
    Hope this helps.
    A
    Attachments:
    WINUTIL.LLB ‏609 KB
    DisableCloseButton.vi ‏44 KB

  • Hiding FPM "Close" button in Portal/NWBC

    Hello,
    First some background, when you launch a WDA FPM application in the portal on of the standard buttons that it shows is the "Close" button. This button allows for the closing of the current browser window, When the FPM application is displayed inplace in the portal, this sort of behaviour is not very useful!
    There was a thread : Re: Disable 'Close' button in Standard billing FPM Application in which Thomas Jung gave a detailed explanation of why this button was appearing and a very good suggestion on how to stop it.
    I understand how I can hide this button - albeit a long winded process when the element is not available for personalisation unless you launch the application from NWBC or a portal (and with our dev portal not by default pointing to our configuration master client...) sigh... 
    I also understand that the WDA application is completely unaware that it is in an external portal window, or displayed inplace in the portal (although if it calls a new portal URL it can specify whether it should be displayed inplace or external).
    What I don't understand is why this is the case - The portal has an API - Class AbstractNavigationConnectorNode method getShowType which returns whether the window is external or inplace, surely the WDA handler for the portal could query this and expose it to the WDA frameworkn through the interface IF_WD_PORTAL_INTEGRATION. Then it would be simple to hide the close button for inplace windows and show it for external windows.
    Given that the portal allows users to launch whichever pages they want externally (although I tend to always turn off this option) it is very hard (i.e. not possible) for us to know for sure if the application will be launched inplace or externally - so "hard coding" the visibility of the close button by personalising the application is not a great solution.
    WDJ is aware of the inplace/external nature of the portal window that it is running in and applications do code to support this. It seems to me an omission that WDA does not have this same level or knowledge of the portal environment that it is running in.
    Are there any plans to extend the IF_WD_PORTAL_INTEGRATION interface to support this? Or are WDA applications destined to a less informed life than their WDJ cousins.
    Sorry for the rant like nature of this post - but I hope that someone from SAP might be able to help me understand this problem.
    Cheers,
    Chris

    Hi Chris,
    Sorry about the late reaction. I think that is because of the nature of the question and the person who is asking. You are one of the expert people who are in SDN to help people. If you ask such questions then it is mostly stay not answered :).
    I have encountered this problem earlier this year and also we have had several emails between Thomas Jung. We are not coming further than to follow Thomas suggestion to Disable the close button in Portal.
    regards
    Senthivel

  • How to disable X button on internet explorer(IE)

    hi ,
    can u please tell me how to disable close button of IE ,if possible send java script code
    thanq

    So you want to annoy your users, eh? You've already annoyed us here, since this is a Java forum, not an ECMAScipt forum. What do you want to do for an encore?

  • Remove minimize/maximize buttons across all portlets

    Is there a way to remove all minimize, maximize, and refresh buttons from all portlets across the entire portal?
    I'd also like to somehow force the maximizing of all portlets. This will help get around the problem with all those people who have minimized and will no longer have a way to maximize those portlets after removing their ability to minimize.
    Thank you for you help in advance.
    tomS.

    I found it!
    In my Portal Customization 1 class manuals under the Adaptive styles section; it mentions the portletCollapseButton CSS style tag.
    What's even better, is that you can set how these buttons are displayed globally, by community, by page, and/or by portlet.
    Modify this file to make immediate changes
    ...\ptimages\imageserver\plumtree\common\public\css\mainstyle-en.css
    Modify this file to use CSSMill to make changes:
    ...\ptimages\tools\cssmill\templates\portal60.template
    Here are some exaples of how you can manage the display of the collapse/refresh buttons on your portlet title bars:
         Example: Hide collapse button for the portlet whose id=6 on the page whose id=1.
    #pt-page-1 #pt-portlet-6 .portletCollapseButton
         display: none;
         Example: Disallow collapsing of portlets by user="guest".
    .ptPageUser-guest .portletCollapseButton
         display: none;
         Example: Disable collapse buttons on all portlets for the community whose id=200.
    .ptCommunity-200 .portletCollapseButton
         display: none;
    You can do the same with the other buttons as well:
    .portletCollapseButton
    .portletHelpButton
    .portletPrefsButton
    .portletRefreshButton
    .portletTitle (for the whole title)
    I hope this helps someone else out there.

  • How to disable close & minimize button of jframe?

    how can i disable the close and minimize button of the Jframe?

    to disable minimize
    setResizeable(false);
    to inactivate the close button
    setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);

  • Disable/enable window close button?

    I have a new Window() open and I want to disable the close button when the window has already been opened. Does anyone know how to do this in Flex?

    Ok I got, it's an AIR app.
    You can listen to event Closing and preventDefault on it. Check this:
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                           xmlns:s="library://ns.adobe.com/flex/spark"
                           xmlns:mx="library://ns.adobe.com/flex/mx"
                           closing="closingHandler(event)">
    <fx:Script>
                <![CDATA[
                    protected function closingHandler(event:Event):void
                        if(!forceClose.selected)
                                event.preventDefault();
                ]]>
    </fx:Script>
    <s:CheckBox id="forceClose" label="Force close" />
    </s:WindowedApplication>
    Regards,
    Pablo Souza

  • How can I disable Minimize, Restore & Close buttons of MDI window?

    I'm using Forms6i on Windows XP
    How can I disable Minimize, Restore & Close buttons of MDI window?
    An urgent reply would be apprecaited.
    MURUGESAN.T

    in windows property
    list of this
    close allowed
    move "
    resize "
    maximize "
    minimize "
    all to set "no"

  • Disabling windows close button in dialog

    Hi,
    I am using Jdev 10.1.3.x(10g)
    I am opening a dialog pop up for a functionality. What i want is to force user to use cancel button provided inside dialog to come out of it and want user to not to use windows cance X button.
    Is there any way by which i can hide the title bar or disable the close button or on click of widow close i actually click on cancel button throgh java script?
    Main concern is i am passing some data from parent to dialog throgh process scope and i want to clear it on cancel. In my application there are many popup dialog which may lead to memeory issue so i seek solution to clear this data once it is not desired any more.
    Also i tried Request object to pass the data but in popup it is not recognised.
    Suggestion in any direction will be helpful.
    Regards,
    Kevin Chheda

    Hi,
    answering this question for 10.1.3 since 11g is different and provides a af:dialog component to handle this case. In 10.1.3 the window you open is an external browser window. You cannot disable the close button here because it is part of the browser window that JavaScript cannot control
    Frank

  • Disable Close Tab Button on all Tabs Broken in v5 (31.0)

    Firefox 5 (v31.0) has broken browser.tabs.closebuttons = 2
    That setting is 2 in my about:config, also I have Tab Control 5.5 with Close Buttons = None.
    Either way the latest Firefox is ignoring both settings and now displaying an X on my active tab.
    Along with the new interface of the tabs is overlaping the tabs next to it and causing me to close tabs instead of switching tabs.
    Is this another case where Firefox knows best, and just changes things because they can?
    What is the proper 'new' code to totally disable the X on all tabs?

    I'm still trying to figure out why the add-ons bar was removed. As
    are many hundreds of other users.

  • Disabling the Close Button of JFrame or Frame

    Dear Friends,
    can anybody please help out to solve the problem i am having in disabling the close button of Jframe . Or try for hiding the close button from the screen
    thanks kalyan

    to disable the close button
    myFrame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE)

  • Disabling default close button in JFrame

    hi,
    in JFrame there are by default 'minimize', 'maximize' and 'close' button. is it possible to disable or not to show the 'close' button'
    regards,
    tom

    If you want to control the closing of the frame you can use
    frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE)If you are interested in listening whether this button was clicked (for example as an alternative to a "Close" button you can register a WindowListener and handle the windowClosing(...) event
    About disabling/hiding - maybe you will have to subclass the frame header UI class, which is L&F specific.
    HTH
    Mike

  • How to disabled IE's close button

    HI:
    I want to disabled the IE"S close button ,but I can't know how to do it .Thanks to tell me how to do it ,thank you

    Write your own version of IE and don't provide a close button. Then ask everyone to install it.
    Otherwise you can't do that, and a damn good thing too. Who the hell want's to go to a site and get a browser window popup that you can't close? Hmm? No one. Get a life.

Maybe you are looking for

  • Can I set a default folder in Acrobat?

    Most of my PDF files are in one location.  I would like to be able to set that location as the default folder in which Acrobat will look when I want to open a file.

  • Why does mainstage load every instrument for an entire concert at once?

    I have recently finished a UK tour using Mainstage at the centre of my keyboard rig and while I got through without any hitches, I had 30 songs to program in the run-up to the tour and almost all of them involved strings in some form or other (I use

  • How to use string control as terminal window

    Hello All I am trying to create a terminal window in my VI and to do this i have a string control and a string indicator. I want the user to be able to write a command in the terminal and when hitting enter the control should update, but not before!

  • Lock Object control (concurrence)

    Hi all, How can we manage concurrence in VC?.  For example, how can I avoid multiple users maintaining the same table in VC?. I can run a data service with the "start" connector in order to place a lock object, but how can I run a data service when t

  • Portal Favourites to appear in new window?

    I have some reports set as favorites in the Portal Favorites. I see that I can click on the icon on the topright corner and select "open in a new window" which would show me all the favorites.Now what i want to do is when i click on any one of the fa