I want make my button visible or invisible on click of button

Hi All
I want make my button visible or invisible on click of button.
Regards
Kirankumar M

HI Kiran,
Your Question:
onclick button should be visible and on second click it should become invisible.
Answer:
In your View
1.Add Two button using Apply Template--actionButton
  So two buttons will get added to the view
2.Create an attribute in View Context say buttonset of type com.sap.ide.webdynpro.uielementdefinitions.Visibility
Bind the visible property of second button to buttonset attribute
This attribute is  to set visibility
Also create a booloean attribute bool in the View context
3.In DoInit method
wdContext.currentContextElement().setBool(true);
So that both buttons are visible in View initially
4.In First button event handler onActionButton()
call second button eventhandler onActionButton_0()
public void onActionButton(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    //@@begin onActionButton(ServerEvent)
       onActionButton_0(wdEvent);
    //@@end
Here onActionButton_0() is like one method which is actually making second button visible or invisible based on boolean value bool=true /bool=false
5. Write the following code in onActionButton_0() to perform the actual action
    if(wdContext.currentContextElement().getBool()==true){
            wdContext.currentContextElement().setButtonset(WDVisibility.NONE);
            wdContext.currentContextElement().setBool(false);
else{
       wdContext.currentContextElement().setButtonset(WDVisibility.VISIBLE);
                  wdContext.currentContextElement().setBool(true);
6.Now build and deploy ans run your application.
It works..
Nice Question..
I was excited trying this...
Hope it helps You
Regards,
Archana
Edited by: Archana CTS on Mar 19, 2009 2:08 PM

Similar Messages

  • How to make a tabstrip visible and invisible again?

    Hi
    I have a GUI with Fields, Texts, Checkboxes, Radio buttons, a Button and of
    course a tabstrip with 7 tabs.
    Before I want to show some data in the tabs of the tabstrip, I have to fill the fields, check a radio button and checkboxes. After filled all entries needed, I will start
    the preparation of the data with clicking on the button.
    Before the click on the button the tabstrip has to be invisible. After the preparation
    of the data I will make the tabstrip with its tabs visible.
    All this is in the same dynpro (e.g. 0100). I don't build it together with to dynpros.
    I tried with LOOP AT SCREEN ... ENDLOOP, but the tabstrip does not appear.
    The only attribute accessable is "activetab".
    How to make that happen?
    Thanks for your help
    Frowin

    Hi
    Suppose you have 3 screen:
    - 1 main screen (100)
    - 2 subscreen    (101, 102)
    In the subscreen 101 you need to design your tabstrip (so you need to move your tabstrip from main screen), the subscreen 102 has to be empty.
    In the PBO of screen 100:
    PROCESS PBO.
    MODULE SET_SUBSCREEN.
    CALL SUBSCREEN SUBAREA INCLUDING V_REPID V_SCREEN.
    In the module SET_SUBSCREEN, you insert the code you need to choose the right subscreen:
    IF _SHOW = 'X'.
      V_SCREEN = '0101'.
    ELSE.
      V_SCREEN = '0102'.
    ENDIF.
    The flag _SHOW is setted in PAI after pressing the button:
    MODULE USER_COMMAND.
        CASE OK_CODE.
           WHEN 'SHOW'. _SHOW = 'X'.
    Max
    Edited by: max bianchi on Jan 9, 2008 5:03 PM

  • How to make Transperant container visible , invisble by code

    Dear experts ,
    I want make transaperant container visible or invisible based some boolean value .
    I have gone thr' class    CL_WD_UIELEMENT and CL_WD_TRANSPARENT_CONTAINER. I have found method SET_VISIBLE .
    Let suppose name of my transperant container TC_COSTCENTER .Please let me know what code I have to write . Where should I write ?
    I am writing it code in WD_INIT as this process is based on value that I get on boolean value which tell decide visibility of Transperant container.
    Waiting for reply . Urgetly .
    Points will be given surely .
    Cheers
    Parry

    Hi Parry,
    The dynamic programming way is follows:
    you need to first get a reference to the root element 'ROOTUIELEMENTCONTAINER' from the view reference available within the wddomodifyview method. the variable returned is of type cl_w_uielement_container. you can use the method get_root_element( ) of the interface if_wd_view for this purpose.
    next get a reference to the transparent container by using the method get_child of the class cl_wd_uielement_container( using the variable returned from the prevoius call) and cast it to a variable of the class cl_wd_transparent_container. to this method you need to pass the id of your transparent container.
    Once you have the reference you can use the method set_visible( ) to make the container visible or invisible at runtime.
    However you need to be careful about the placement of this code within the wddomodifyview method because it would get executed every time. Thus the best way is to store the reference to view in a component controller the first time and later on use this attribute anywhere within your component.
    Regards,
    Shweta

  • How to make Visible and Invisible using a Button?

    hi!... I've a Text3D using Oriented3D object and I would like to know how to make it visible and invisible by clicking a button.
    I know there is a function, setVisible() in RenderingAttributes, which can be set by the object's Appearance.
    Since I want to use a button to change the object's appearance, I need to change it in the button's actionPerformed function, but it has thrown an exception:
    "Shape3D: no capability to set appearance".
    I'd tried using those setCapability flags... but still nothing...
    Could someone help me please?...
    Thanks

    When you create Shape3D, setAppearance to it and
    setCapability(ALLOW_APPEARANCE_READ).
    For the Appearance, you should setCapability(
    ALLOW_RENDERING_ATTRIBUTES_READ).
    For the RenderingAttributes, you should setCapability(
    ALLOW_VISIBLE_WRITE).
    So in the button event handler,
    shape.getAppearance().getRenderingAttributes().setVisible(true/false).
    Now you can control the visiblity of Text3D

  • Want to make an iview invisible on click of a button!!!

    Hi Experts,
    We've a requirement wherein we want an iview to be called but it should not be visible on the left hand side navigation pane.
    Actually, the iview has been assigned to a workset and is called as soon as the user clicks on the workset. Now after the ivew is called it appears on the left hand side navigation panel as well as since we are using a workset map iview within the workset the iview is visible in the content area as well.
    I want that after the iview is called and the content is displayed. On click of a button, I want that iview to become invisible and the control should go to the next iview.
    I know how to navigate from an iview to another iview but I don't know how to make the first iview invisible on click of a button.
    Kindly suggest how can I acheive this functionality?
    Regards,
    Anurag

    Hi Vinod,
    Thanks for the prompt reply.
    Yes., the new iview would be visible in the same window and the previous iview should not be present on the left hand side navigation panel.
    Currently, since the iview is a part of a workset, on  click of a button the user is navigated to the new iview but the previous iview is present on the navigation panel. Is there any way possible so that we can remove the previous iview from the left hand side detailed navigation panel when the user navigates to the new iview
    Actually, we have a workset map iview and so all the iviews assigned to the worksets are available as links on the screen. After the user navigates to the new iview the previous iview's link should become invisible from the content area.
    Is this possible to remove the previous iview's link from the content area and the navigation panel on the left hand side?
    Thanks in advance for your reply!!!
    Regards,
    Anurag

  • No property to make htmlb:button invisible or visible??

    I am working on a jspdynpage proj where I need to make htmlb:button visible/invisible at runtime.. is there any property?

    Hi Kiran,
         You can use Java Script to make this happen. To make invisble or to disable use the following
    <input style="visibility:hidden;" type="button" value="Hello world!" disabled> . You can get the attributes of the button in varible, then start modifying the attribute at run time.
    Thanks
    Sathish

  • How to make the buttons INVISIBLE in the Application toolbar

    Hi All,
    I have a requirement to create a button in the Application toolbar of the Module Pool Screen. The field should be made Invisible by default. and it should be displayed based on one condition.
    Could you please let me know how to make that particular button INVISIBLE. I think we can make it invisible by using EXCLUDING statement. But, How to make the button VISIBLE again when the check is satisfied.
    I found from the portal that the FM 'VIEW_SET_PF_STATUS' can be used to make a button INVISIBLE. Could anyone help me out how to pass the parameters to this Function module?
    or is there any Function Module available to make the button VISIBLE and INVISIBLE? Please help me on this issues.
    Is there any possibility to make the button VISIBLE or INVISIBLE as we do for the screen fields using LOOP AT SCREEN..?
    Thank you in advance.
    Regards.
    Paddu.

    Hi,
    Try to use below in the PBO module status_0100 OUTPUT.
    DATA t_fcode TYPE TABLE OF sy-ucomm.
    refresh t_fcode[].
    APPEND 'Function code name of the button' TO t_fcode. 
    Check the condition here for which you want to make field visible.
        DELETE FCODE of the button from T_FCODE table
      ENDIF.
      SET PF-STATUS 'STATUS_0100' EXCLUDING t_fcode.

  • How to make a button invisible?

    I'm sure this is something easy that I'm missing, but I can't figure it out.  How do I make a button invisible?  I need it to be invisible through frame 43 of my movie.  I have tried changing the alpha to 0, but it's not letting me change that, except in the edit button mode which changes it for the entire duration and not just through frame 43.

    It can vary slightly depending on which version of actionscript your file is using, but just turn the visible property off and on.  For AS3....
    btnName.visible = false;
    btnName.visible = true;

  • How to make a loop that changes two different movieclips from visible to invisible every second

    I am writing some code that puzzles me. It may be, because I have a cold or because I've never needed to do anything like this. I want to have two movieclips one is visible and one is not. then one second passes the one that was visible is invisible and the invisible one is visible. What would be the best approach to this, besides handcoding if statements. I know there has to be a faster way and less expensive way than handcoding if statements.
    I'd like to thank anyone who replies in advance .

    this is how i would do it
    package
              import flash.display.MovieClip;
              import flash.display.Sprite;
              import flash.events.TimerEvent;
              import flash.utils.Timer;
              public class Main extends Sprite
                        private var mc1:MovieClip;
                        private var mc2:MovieClip;
                        public function Main()
                                  // create your mc's here
                                  mc1 = new MovieClip();
                                  mc2 = new MovieClip();
                                  mc2.visible = false;
                                  var timer:Timer = new Timer(1000);
                                  timer.addEventListener(TimerEvent.TIMER, loop);
                                  timer.start();
                        private function loop(e:TimerEvent):void
                                  mc1.visible = !mc1.visible;
                                  mc2.visible = !mc2.visible;

  • How do I make FF4 look like FF3.6? I want the same buttons in the same places.

    I want the FF4 UI to look exactly like my FF3.6 UI. I want the same buttons in the same places.
    I have reverted to FF3.6 until this issue is solved. I do NOT like the new UI.

    You can make Firefox 4 look like Firefox 3.6, for details see http://www.computertechtips.net/64/make-firefox-4-look-like-ff-3-6

  • Ctrl + secondary mouse button (Trying to make a button invisible)

    Hi Portal Experts,
    I am trying to make a button invisible basically personalization of Iview we are in SAP Portal version 6,40. I have kept mouse on the button and action was Ctrl + right click of mouse and i am not getting the properties screen rather a general windows options(Second screen shot). It would great if i can get suggestions to get the properties screen.
    Thanks in Advance..!!
    Regards
    Venkat

    Hi Venkat,
    Can you check the value of property "AllowUserPersonalization" in Visual administration Services → Configuration Adapter → webdynpro → sap.com → tc~wd~dispwda - propertysheet
    Also what is the exact version of this portal?
    Mahesh
    Message was edited by: Mahesh Krishnapillai

  • Forced Navigation - Want the next button to display after user clicks on all buttons.

    Hi. I'm new to using Captivate to make a learning module. I'm stuck on this forced navigation issue. I created 8 click boxes that the users have to click on. I created 9 advanced actions. Each AA for the click boxes hides text boxes that don't pertain to it, shows a text box, plays audio, and assigns a number 1 to a variable I created. There are 8 variables. I then created an conditional AA that displays the next button once all 8 variables have the number 1 assigned to it.
    For some reason, the next button doesn't display even though I'm sure each variable has the number 1 assigned to it. Also, I want the entire audio to play for the click box before the person can click on the next click box. Right now, I can click on a click box and then another click box right afterwards and the audio stops and the next audio starts. Can you all please help?
    I am using Captivate 6.0.0.199.  My computer is running Windows 7.  I want the output to be SWF.  Thank you in advance for your help!

    First of all, install the patch, you are still on the unpatched version that had a lot of bugs. Almost one year ago a fix was released, your version should be 6.0.1.240. Use Help, Updates.
    The difficult part will be the audio, the other part should be very easy, have explained that a lot of times. You could disable all click boxes, but then you need a new event to trigger the 'enable' action. Is it that important? Are those users not wise enough to listen to the audio, or is that audio not interesting enough? Why not instruct them about listening?
    I suppose you use the Play Audio statement, and indeed, when you trigger another audio clip the previous one will be stopping. You could attach the audio to an 'invisible' object, and make that visible which will play the audio. But that will cause another issue if the user clicks too quickly on a second click box: both audio will play at the same time.
    Lilybiri

  • How can I make a button that on press the object appears and on second press the object to disappear

    Hello,
    I'm quite new to flash programing, and I don't know how can I make a button that will make the object appear and disappear.Till now I have this code for the appear:
    on (press)
        _root.top1.gotoAndStop(2);
        _root.topp.gotoAndStop(2);
        _root.mm1.gotoAndStop(2);
              _root.m1.gotoAndStop(2);
    but from here I'm stuck.
    Thank you for your help

    What you can do is use the _visible property of the object to make it appear and disappear, or more correctly, use the opoosite of the _visible property.  You should not put code "on" objects, keep it in the timeline.
    If "object" is the instance name of the object you want to toggle, then in the timeline code you can use...
    object._visible = false;  // start with the object being invisible
    yourButtonName.onRelease = function(){
        object._visible = !object._visible;
    That one line in the function sets the object's _visible property to be the opposite of what it currently is.

  • How make a button inactive after the click ?

    Hi,
    how can i make a button inactive after i clik on it ? I need it becasue i have one button which play my symbol (made with this nice course https://blogs.adobe.com/edge/2012/07/18/tutorial-leveraging-independent-symbol-timelines/) but it's not working when the button is in the symbol where there is animation, it's only working when the buttons is a symbol on the stage and on the top of all over symbols, so when i clik on it works and play the symbol that i want but after is still active so i can't place another button at the exact same place of the first because it will play the first button and i need to put 20 buttons, anyone can help me please ? My buttons is just an empty rectangle so i don't talk about turn of the visibility but turn of th "activity"
    Thanks a lot

    If you prefer you can put the code in compositionReady
    Here is a sampe on how to use a next and prev buttons to change data.I have some other examples I will add later but this one could give you an idea on how to do it.
    This one uses data from an array and then moves through the info:
    https://app.box.com/s/78ya0labbydgwogxra2a
    If you are playing symbols then use the rigth scope to get to them.
    I would make a array of the symbol names and use it the same way like I did the array for the info.
    sym.getSymbol(mysymbolArray[i]).play();

  • How to make a button show AND hide a field?

    In an interactive form (with Adobe Acrobat X Pro), how can I purpose one button to:
    1.) Show a field when clicked the first time
    2.) Hide a field when clicked a second time
    I seem to only be able to make a button do one or the other, but not both with the same button. Maybe an easier way to say this is I want to be able to have one button turn a field "on" and "off".
    Any help would be GREATLY appreciated. Thanks! 

    Use this code:
    var f = this.getField("OtherFieldName");
    if (f.display==display.visible) f.display = display.hidden;
    else f.display=display.visible;

Maybe you are looking for

  • Creating A/R Credit Memo via copying from A/R Invoice

    Hi all, I have a problem creating A/R CREDIT MEMO via copying from AR invoice. there are no list of invoice appear eventhough the Customer im trying to add in credit memo are exists in ar invoice. thanks vin

  • Plz help me in  knowing ansers to these question  of wiki..................

    In IMG, activities for which SAP cannot deliver default settings? 2 At what level the regulation of employees are defined in SAP? 3 To integrate the PA and OM we use a switch, specify? 4 In which feature T-Code's are maintained? 5  What is the use of

  • Group and Outline using Excel

    Hi, Does anyone know if you can use the group and outline functions of excel when building and distributing a report? We want to have data shown at a summary level and the user can choose to hit the "+" sign to expand the data.

  • How to Control Defualt Styles(Font,Size,BG Color) for WPC Objects

    Hi All, This is Ganesh, Current i am working on Content Migration Using WPC.Now My Question, while we are creating the Site Content using WPC(Like Articles, Paragraph's, etc...), while we are typing the content for Article, its showing in one font, a

  • How to Correct and Re-send new idoc # in WE19

    Hi Expert Can you please give me the steps to correct and re-send (new idoc) in WE19. Here is the situation: Outbound ASN failed in EDI for having special char in field ARKTX(E1EDK08-E1EDP07-E1EDP09-ARKTX). Here I just need to remove special characte