How can I disable a button ?

Hi!
How can I disable the a button ?
There is a if statement. If it returns a false the button must be disabled.
Regards
sas
Edited by: erdem sas on Jan 15, 2008 3:06 PM
Edited by: erdem sas on Jan 15, 2008 3:16 PM

Do it thru its action:
//Deactivate a button disabling its action
//You can see it but clicking it does nothing
wdGetACTION_NAMEAction().setEnabled(false);
//Get it's funcionality back
wdGetACTION_NAMEAction().setEnabled(true);
Or you could hide it using an attribute of type WDVisibility binded to its visible property.
//Hide it
wdContext.currentContextElement.setATTRIBUTE(WDVisibility.NONE);
//and Show it
wdContext.currentContextElement.setATTRIBUTE(WDVisibility.VISIBLE);
Regards.
Julio Herrera.

Similar Messages

  • How can I disable back button

    How can I disable the back button and/or prevent the back button displaying my recent searches on right click ?

    Set the pref <b>browser.sessionhistory.max_entries</b> to 0 on the <b>about:config</b> page.
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />

  • How Can i Disable this Button (Screenshots)

    Hi,
    I need to disable 2 buttons (Approve - Reject) for a specific responsibility (+see screenshot link below+)
    http://img825.imageshack.us/i/44310429.jpg/
    Path : Intercompany User --> Transactions: Inbound --> Search for transaction --> Update Transaction
    Through Personalize Page, i personalized the button and set it's Render to FALSE but they still appear (+see screenshot link below+)
    http://img801.imageshack.us/i/87584812.jpg/
    Am i missing something? Please Help,
    Your advice is highly appreciated,
    Best Regards,

    Dear Kali Thanks for your response,
    I tried to set the Render FALSE at the site Level , but the buttons are still appearing.
    you mean the "Disable Self-Service Personal" Profile option? it is set to NO
    the outputs as per your :
    exec jdr_utils.listcustomizations(p_document => '/oracle/apps/fun/transaction/entry/webui/UpdateInTrxPG');
    /oracle/apps/fun/transaction/entry/webui/customizations/org/81/UpdateInTrxPG
    /oracle/apps/fun/transaction/entry/webui/customizations/site/0/UpdateInTrxPG
    /oracle/apps/fun/transaction/entry/webui/customizations/responsibility/51450/UpdateInTrxPG
    /oracle/apps/fun/transaction/entry/webui/customizations/responsibility/51451/UpdateInTrxPG
    exec jdr_utils.printDocument('/oracle/apps/fun/transaction/entry/webui/customizations/org/81/UpdateInTrxPG');
    <?xml version='1.0' encoding='UTF-8'?>
    <customization xmlns="http://xmlns.oracle.com/jrad" version="9.0.6.0.0_35" xml:lang="en-US" customizes="/oracle/apps/fun/transaction/entry/webui/UpdateInTrxPG" developerMode="true">
    <modifications>
    <modify element="ApproveButton" userCustomizable="true"/>
    <modify element="RejectButton" userCustomizable="true"/>
    </modifications>
    </customization>
    exec jdr_utils.printDocument('/oracle/apps/fun/transaction/entry/webui/customizations/site/0/UpdateInTrxPG');
    <?xml version='1.0' encoding='UTF-8'?>
    <customization xmlns="http://xmlns.oracle.com/jrad" version="9.0.6.0.0_35" xml:lang="en-US" customizes="/oracle/apps/fun/transaction/entry/webui/UpdateInTrxPG" developerMode="true">
    <modifications>
    <modify element="ApproveButton" rendered="false" userCustomizable="true"/>
    <modify element="RejectButton" userCustomizable="true"/>
    </modifications>
    </customization>
    exec jdr_utils.printDocument('/oracle/apps/fun/transaction/entry/webui/customizations/responsibility/51450/UpdateInTrxPG');
    <?xml version='1.0' encoding='UTF-8'?>
    <customization xmlns="http://xmlns.oracle.com/jrad" version="9.0.6.0.0_35" xml:lang="en-US" customizes="/oracle/apps/fun/transaction/entry/webui/UpdateInTrxPG" developerMode="true">
    <modifications>
    <modify element="ApproveButton" userCustomizable="true"/>
    <modify element="RejectButton" rendered="false" userCustomizable="true"/>
    </modifications>
    </customization>
    exec jdr_utils.printDocument('/oracle/apps/fun/transaction/entry/webui/customizations/responsibility/51451/UpdateInTrxPG');
    <?xml version='1.0' encoding='UTF-8'?>
    <customization xmlns="http://xmlns.oracle.com/jrad" version="9.0.6.0.0_35" xml:lang="en-US" customizes="/oracle/apps/fun/transaction/entry/webui/UpdateInTrxPG">
    <modifications/>
    </customization>
    Best Regards,

  • How can i disable a button in the application tool bar of a standard trans?

    Hi Experts,
       I want to disable the create button in the application tool bar of the standard transaction cv03n. Is there any method?

    Hi,
    In the include 'LCV110F19', the GUI is being called for the screen.
    This is the actual code being called.
    WHEN c_dms_create.
          SET PF-STATUS 'D100CREATE'.
          SET TITLEBAR  'D100CREATE'.
    You can try to code something like below.
    DATA: itab TYPE TABLE OF sy-ucomm.
    APPEND 'CREATE' TO itab.
    SET PF-STATUS 'D100CREATE' EXCLUDING itab.
    Kindly reward points by clikcing the star on the left of reply,if it helps.

  • How can i disable a submit button and execute submit_action method on click

    Good Day,
    On my page I have a submit button that execute the submit_action method of the page backing bean that submit data captured on the page into a database and activate another class that send mail at the same time on a click of the submit button,the mail process takes a while before returning back to the page.I was able to disable the submit button to prevent the user from keep click while the process is running but the issue is on clicking the submit button it only disable the submit button without executing the submit_action method of the page backing bean.How can i disable the submit button and execute submit_method of the backing bean at the same time.
    Thanks in advance.

    I tried this out on one of my pages to see if it works.
    First, I added the following JavaScript to my submit button's onClick event:
    this.disabled=true; return true;When I clicked the submit button, it was disabled but the form was not submitted.
    I deleted the JavaScript from the onClick event and added the following JavaScript to the form's onSubmit event:
    var button = document.getElementById("form1:submitButton"); button.disabled=true; return true;When I click the submit button, it was disabled and the form was submitted but the button's action method was not called.
    The next thing I tried was to change the onSubmit event code:
    var button = document.getElementById("form1:submitButton"); setTimeout("button.disabled=true", 500); return true;This seemed to work. The difference was that I added a 1/2 second delay before disabling the button.
    See if that works for you. If not then I'm fresh out of ideas.

  • How can I disable the Voicemail button on an iPhone 4

    How can I disable the Voicemail button on an iPhone 4 or
    if that is not possible can i programme it to dial my own phone rather than my carrier's Voicemail box?

    No, it's not possible to disable that button and no, it's not possible to reprogram it to anything else.

  • How can I disable POST GOODS RECEIPT button in transactions VL31N/VL32N via Authorization or Role Level.

    How can I disable POST GOODS RECEIPT button in transactions VL31N/VL32N via Authorization or Role Level, There is a requirement from my client  and i propose two methode
    1- Creation of Ztcode ZVL32N and do changes ABAP program level
    2- Disablement via Authorization/Role level - but how can i find the auth object/ Authorization corresponds to POST GOODS RECEIPT button in VL32N

    I think you can make use of SHD0 - Transaction variant to achieve this. You can make it as grayed out while recording steps in SHD0.

  • 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"

  • How can I disable back, forward and refresh button in browser running ADF 11.1.2.2

    How can I disable back, forward and refresh button in browser running ADF 11.1.2.2?

    I insert the java script into ADF page. But it does not work. The ADF source look like below. Did I insert into wrong region?
       <f:view>
            <af:document id="d1">
                <af:messages id="m1"/>
                <af:resource type="javascript">
                  window.history.forward();
                  function noBack() {
                      window.history.forward();
                </af:resource>
                <af:form id="f1">
                    <af:pageTemplate viewId="/template/temp2.jspx" id="pt1">
                        <f:facet name="body">
                            <af:panelStretchLayout id="psl1" topHeight="30px">
                                <f:facet name="bottom"/>
                                <f:facet name="center">
                                    <af:panelBox text="Incident List" id="pb1">
                                        <f:facet name="toolbar"/>
                                        <af:panelCollection id="pc1">
                                            <f:facet name="menus"/>
                                            <f:facet name="toolbar"/>
                                            <f:facet name="statusbar"/>
                                            <af:table value="#{bindings.ServiceRequestMain.collectionModel}" var="row"
                                                      rows="#{bindings.ServiceRequestMain.rangeSize}"

  • How can I disable POST GOODS RECEIPT button in transactions VL31N/VL32N .

    Hi ,
    How can I disable POST GOODS RECEIPT button in VL31N/VL32N . 
    Its because, we wanted to use VL06I  to do PGR insted of VL32N.
    Thanks in advance.
    Rays

    Hi,
    if you have a look at program SAPMV50A then you can see that routine cua_exclude_dynamic is used to disable buttons dynamically. If you are on ECC6.0 then you can use implicit enhancement point to exclude code WABU_T which corresponds to "Post Goods Receipt". You can simply add the following lines at the end of this routine using implicit enhancement point.
    IF sy-tcode EQ 'VL31N' OR sy-tcode EQ 'VL32N'.
      PERFORM cua_fcode_allow USING 'WABU_T' no.
    ENDIF.
    Cheers

  • How can we disable/Hide the buttons at items tab in header level Gen tab?

    Hi,
    How can i disable/Hide the buttons(Delete,insert...) in item details of general tab of Order Header?
    I am not able to do it with screen varients.
    Please let me know your views.
    Points will be given.
    Thanks,
    Adi.

    Hi,
    How can i disable/Hide the buttons(Delete,insert...) in item details of general tab of Order Header?
    I am not able to do it with screen varients.
    Please let me know your views.
    Points will be given.
    Thanks,
    Adi.

  • How can i initialize a button (Switch when pressed) to be always disabled when i start the programm.

    Hello
    How can i initialize a button (Switch when pressed) to be always disabled when i start the programm. My problem is that the state of the button is always the state in which it finihed last time.
    Thanks
    Lukas

    A button is either true or false. "Disabled" is a property that determines if the button can be operated or not.
    It seems from the rest of your question that you actually want to ensure that it is set to false, but remain enabled. This is easiest done with a local variable as already mentioned by becktho.
    If you want to disable the button, use a property node.
    LabVIEW Champion . Do more with less code and in less time .

  • How can I disable Firefox from automatically opening on system startup on my Mac - unchecking the "open at login" does not work?

    We have Firefox 10.o on our Macbook Pro OS X 10.5.8. I prefer using Firefox as my browser but my husband prefers Safari for now because of a long history of bookmarks and saved information he doesn't have time to re-do. He is tired of Firefox automatically opening when we start up the laptop, and even when we uncheck the "open at login" it still opens at login every time. He is about to uninstall it because of this. How can we disable? It does NOT show up in our account on the Mac OS as an application that starts at login, so we can't disable it there.

    For those of you running Windows, I found this on another site. (Unfortunately, not before getting totally disgusted and switching to chrome.)
    1. click start (or the windows flag button at the bottom left) 2. in the "search programs and files" or the RUN dialog box, enter "msconfig.exe" or "msconfig". 3. That should open the system configuration program. 4. click the "Startup" tab at the top of the opened program. 5. Under the "startup item" column, look for Mozilla firefox. 6. uncheck that one. 7. Click OK or apply. 8. click "exit without restart". 9. you're good to go.

  • How can I DISABLE the pop up 'Would you like to copy it to Library', preventing this message from bothering for each and every book, again and again, time after time? (Windows 7 64bit US).

    How can I DISABLE the pop up 'Would you like to copy it to Library', preventing this message from bothering for each and every book, again and again , time after time? (Windows 7 64bit US).
    I guess this may be a feature request. Adobe may think this is a good message for every new eBook.
    I sure would like to decide about that myself.
    Thanks in advance if this will be changed.

    singmk wrote:
    Decided to setup the mail for exchange on my N8 so I could see my work emails. Worked like a charm but after a couple of hours decided I didn't like being that contactable so deleted the mailbox.
    Now to the problem, during setup I was forced to enable the phone lock and had to pick a 7 digit alphanumeric code. Fair enough I thought and went ahead. When I removed the mailbox however the lock remained in place with the default auto time of 30 minutes. When I checked in Phone management there is no option to disable this lock so I thought I could at least change the default time to something bigger but when you try, it remains at 30 mins. You also can't disable the auto time as it pops up an error message saying can't unlock phone.
    Does anyone know if I'm missing something obvious here or is this something which can't be disabled once it's switched on? I've done a soft reset back to factory settings with no luck and the only other thing I can think of is re installing the firmware which seems a bit extreme.
    Would like to hope there is some way to have control over this. Can someone help?
    Which firmware your N8 having now? You can check firmware by choosing Call, then type *#0000#.
    My N8 works fine on security setting and able to define Phone auto lock period, by choosing Menu>Settings>Phone>Phone management>Security settings>Phone and SIM card>Phone auto lock period>User defined>Lock after(minutes)
    You will prompt to enter Lock code each time u define auto lock priod or enable/disable auto lock.
    Hope this can help you.
    If you find this post helpful, please show your appreciation by clicking the Kudos star at the left. If it provides you the solution, please click on the GREEN Accept as Solution button at below

  • How can I disable the light of my keyborad?

    Hello everybody!!! I wonder how can I disable the light from my keyboard. I just can change the colors in 4 differents ways but none of then can switch off the light of my keyboard. I have a GT70 2PC. Thanks for your time .

    you should be able to turn off and on with FN and + to turn on then FN and the - button i think it was to turn off the backlight it's on number pad area to the right you should see light form icon showing light is on and then another 1 that is showing it's off
    here is pic of marked buttons that i'm talking about.

Maybe you are looking for