Hide/show a form upon button click

Hi
I want to show/hide different form upon button clicks. Also I want to clear the data from a form upon button clicks. How can I achecive this? Thanks in advance.

Hi,
Create one boolean variable in your datastore. Click of the button should set the value to false and you can bind the same variable to the visibility property so that you can hide and display accordingly. For making the values blank, you can put condition on the detault value formula IF(!<your datastore variable>,"",<value needed>)
Regards,
Murtuza

Similar Messages

  • Show waiting image on button click till response comes

    Hi All,
    I want to show waiting image on button click in a jsff page till response comes from back-end.
    For this I am using following code in button :-
    <af:commandButton text="Submit" id="cb1"
    actionListener="#{RegistrationManagedBean.onRegisterClick}"
    binding="#{RegistrationManagedBean.registerButton}"
    inlineStyle="width:65px; height:34px; font-size:11px; font-family:verdana; color:#fff; border-color:Gray; border-style:solid; border-width:1px; background-image:url(&quot;images/template-related/template_new/ButtonEnabledBG.png&quot;); background-repeat:repeat-x; float:right;"
    styleClass="button">
    <af:clientListener method="enforcePreventUserInput" type="action"/>
    </af:commandButton>
    enforcePreventUserInput is written inside on .js file.
    js code is :-
    function enforcePreventUserInput(evt) {
    var popup = AdfPage.PAGE.findComponentByAbsoluteId('pt1:r1:p1');
    if (popup != null){
    AdfPage.PAGE.addBusyStateListener(popup,handleBusyState);
    evt.preventUserInput();
    function handleBusyState(evt){
    var popup = AdfPage.PAGE.findComponentByAbsoluteId('pt1:r1:p1');
    if(popup!=null){
    if (evt.isBusy()){ 
    popup.show();
    else if (popup.isPopupVisible()) {
    popup.hide();
    AdfPage.PAGE.removeBusyStateListener(popup,handleBusyState);
    Popup code is :-
    <af:popup id="p1" contentDelivery="immediate">
    <af:dialog id="d2" type="none" closeIconVisible="false"
    inlineStyle="background-color:none !important; width:54px; height:55.0px;">
    <af:image source="/images/template-related/LoadingCircle.gif" shortDesc="Loading" id="i7"/>
    </af:dialog>
    </af:popup>
    This is working and image is also being shown but this image is not shown as transparent(where as image is transparent) and also image is having top and bottom shading which is because of dialog or popup. But i dont want this shadow. Also inline style is not working for this popup.
    If there is any other way to solve this purpose please suggest.
    Thanks
    Edited by: 915148 on Jun 4, 2012 1:19 AM

    Ok, we will use a movieclip button but is there a tutorial somewhere on how to display the image when the button is clicked?

  • Show form on button click

    Hello, I am using JDeveloper 11.1.2.3.0
    I have one button and one form on my jsf page. I want the form to be rendered when I click the button (to be visible). How can this be done in ADF?
    Thank you

    No offence, but have you read the post? I shows exactly your use case. OK, the title and the content is more about creating page variables. If you store the flag to hide/show the panel at a different place this is OK, still the actions you need to do are the same.
    Timo

  • How to hide / unhide text baxes on button click in JSF page using javascrip

    Hi,,
    I want to hide/unhide text boxes on a button click.
    How to do it in .jspx page using javascript.

    Hi,
    refer this
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1" title="#{lcRes['page.title']}">
         <af:resource type="javascript">
            function hide(evt){
                evt.findComponent('itToHide').setVisible(true);
         </af:resource>
          <af:form id="f1">
            <af:commandButton partialSubmit="true" id="cb1">
                <af:clientListener method="hide" type="action"/>
            </af:commandButton>
            <af:inputText id="itToHide" value="xx" label="this will hide" clientComponent="true"/>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>

  • Compensation planing iView- hide "show selected in analytics" button

    Hello,
    We recntly installed EHP5 and with it the new version of Enterprise Compensation Management (ECM). the new iViews are in Webdynpro ABAP.
    Via the Portal content adminitration we were able to hide most of the buttons that we do not need. However, we are not able to hide the "Show selected in Analytics" button.
    Any idea how we can achieve this?
    Thanks a lot
    Lucas

    Hi,
    Did you solve this issue? If yes then please describe how. I'm facing the same issue.

  • Open system form on button click

    Hello Expert,
    How to open system form(invetery transfer from) on button click
    Regards,
    Abhinav Lalpurwala

    Hi Abhinav
    Try This.....
    'In Button pressed event
       sbo_application.ActivateMenuItem("3080") 'For Inventory Transfer form
    Thanks
    Shafi

  • Opening system form on button click

    I have a user button on Sales Opportunity form.
    On click of button, I want to open the respective Sales Quotation form.
    The sales quotation for the corresponding docnum should be opened. DocNum is defined at the Stages tab on Sales Opportunity form.
    Please provide the solution ASAP.

    Hi,
    I think your discussion should be posted at SDK forum. Please repost in,
    SAP Business One SDK
    Thanks & Regards,
    Nagarajan

  • How to Dispose/Remove/Clear/Delete Rectangleshape created on Form by button click

    Hi Guys,
    I have a windows form where there are few textboxses and buttons.
    One of the button when clicked creates few rectangles to depict sort of design(its working)
    Now my problem is that I want to clear the form for the user to enter again.
    I am able to clear textbox but I am not able to remove the rectangles made.
    Could anyone suggest how to do it?
    I have tried searching for the example but could not find any.
    I have not used paint to draw my drawing so any graphic related answer wont work it seems.
    I found this but it is giving error :Unable to cast object of type 'System.Windows.Forms.Button' to type 'Microsoft.VisualBasic.PowerPacks.RectangleShape'"
    CType(sender, PowerPacks.RectangleShape).Dispose()
    what should I do?
    Thanks in Advance!
    Mak

    Hi Guys,
    I was able to find out how to remove the all the rectangles which I created
    If we just use this
    Invalidate()
    It will clear the entire surface of the control.
    But......
    The problem is how to remove specific Rectangles!
    Still looking for answers!!, all ideas welcome!
    Cheers
    Mak
    Hello,
    You could define that control variable outside that method, and hide them by setting its parent to nothing.
    Here is a simple sample.
    Imports Microsoft.VisualBasic.PowerPacks
    Public Class Form1
    Dim canvas As New ShapeContainer
    Dim Rect1 As New RectangleShape
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    canvas.Parent = Me
    Rect1.Parent = canvas
    Rect1.Size = New System.Drawing.Size(140, 140)
    Rect1.Location = New System.Drawing.Point(2, 2)
    Rect1.BackStyle = BackStyle.Opaque
    Rect1.BackColor = Color.White
    End Sub
    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
    canvas.Parent = Nothing
    End Sub
    End Class
    Regards,
    Carl
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Show chart region when button clicked??

    Hi All,
    i'm using apex 4.0
    initially i want to hide chart region,when clicked on button i want to show chart region...
    i have tried Dynamic actions ,show/hide but no hope...
    any one help me on this.. :)
    thanks in Adv.

    1. Firstly, make sure that the Chart region has a region template.
    2. If you don't want to use Dynamic Actions try something like the following:
    In the Region Definition set the Static ID = chart
    set the Region Attributes => style="display:none;"
    for the button set the URL = javascript:$("#chart").show();
    Cheers
    Shunt

  • Submitting form via button click

    Hi, i have a following code and it doesnt work and i dont know why
    <jsp:useBean id="pageinfo" class="zrna.PageInfo" scope="session"/>
    <jsp:setProperty name="pageinfo" property="*"/>
    <html>
    <head>
    <script type="text/javascript">
         function clickEvent(form,md,wrkOn)
              form.mode.value = md;
              form.workingOn.value = wrkOn;
              form.submit();
         function m(form){return true;}
    </script>     
    </head>
    <form action="index.jsp" method=get >
         <input type="hidden" name="mode" value="">
         <input type="hidden" name="workingOn" value="">
         <input type="submit" value="Add" onclick="clickEvent(this.form,'add','Student')">
         <input type="submit" value="Alter" onclick="clickEvent(this.form,'alter','Student')">
         <input type="submit" value="Done" onclick="clickEvent(this.form,'general','')">
    </form>          
    So im trying to change jsp bean properties of pageinfo thru submiting form and it doesnt work. when button is clicked the page goes blank. What am i missing?

    is this page you posted "index.jsp"?
    Not sure offhand, but could the form submit before onclick fires? If so, change them to button types, not submit types.
    The bean has those named fields? Public get/set methods?
    Does useBean have to be this?
    <jsp:useBean id="pageinfo" class="zrna.PageInfo" scope="session">
    <jsp:setProperty name="pageinfo" property="*"/>
    </jsp:useBean>

  • Call smart form on button click

    Hi Experts,
    I have a screen. In screen a button is available. I need when i clicked on button my smartform should be open. Plz provide me ur appreciated solution.
    Regards,
    Swapniks

    Hi Swapnika,
    You forgot a small code in between.
    data: v_formname type tdsfname value 'zmem',
    v_fmname type rs381_fname
    Case sy-ucomm.
    when 'okbut'.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    FORMNAME = v_formname
    IMPORTING
    FM_NAME = v_fname
    call function v_fname.
    exporting
    pernr = itab-pernr.
    tables
    itab = itab.
    Regards,
    Prakash Pandey

  • Show an image on button click

    We need the button to display an image on a button when clicked for a tic tac toe game.  Any help would be helpful.

    Ok, we will use a movieclip button but is there a tutorial somewhere on how to display the image when the button is clicked?

  • Hide/Show Finder Window "Bars" Button?

    Snow leopard had a really useful feature associated with Finder windows that allowed all of the various bars (Tool, Side, Path, Status) to be activated/deactivated at one time. Lion took this away (but allowed those features to be active/inactve independently, which while useful does require more work.
    What I would like to be able to do is somehow add that brilliant one-click option back. I think I can do this with Applescript or Automator, but am not sure if it is possible to add the script to the Actions menu (or better yet a button on the title bar, wishfully thought).
    Anybody have a solution?
    Thanks.

    Regards,
    Colin R.

  • Show a custom component on button click in a view stack`

    Hello folks
    I have a view stack in which i have some custom components.
    Now there is one custom component in which there is one button. On the button click, i want to show another custom component but i dont know how to do it. Should i write the inline mxml click event in custom component?? If yes then how??
    Currently i am doing it as
    click="{customcomponent}"

    As you know, ViewStack  has containers, lilke VBox for its views.
    Assuming one of your views VBox has an id of myVBox, and that VBox has the Button that when clicked will display the component, just have the component in the view already, but you can make it invisible with visible=false and includeInLayout=false, and then upon button click set those two variables to true.
    You will probably want a show handler for the view VBox to make those properties false each time that view is displayed.
    Here is some simple sample code.
    If this post answers your question or helps, please mark it as such.
    ---------- MySimpleComponent.mxml ----------
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
      width="100%" height="100%" horizontalAlign="center">
      <mx:Label text="My Custom Component"/>
    </mx:VBox>
    ---------- MainApp.mxml  ----------
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
      xmlns:comp="*" horizontalAlign="center" verticalAlign="middle">
      <mx:Script>
        <![CDATA[
        ]]>
      </mx:Script>
      <mx:LinkBar dataProvider="{vs}"/>
      <mx:ViewStack id="vs" width="100%" height="100%">
        <mx:VBox label="view1" width="100%" height="100%"
          horizontalAlign="center">
          <mx:Label text="View One"/>
        </mx:VBox>
        <mx:VBox label="view2"  width="100%" height="100%"
          show="myComp.visible=false;myComp.includeInLayout=true;"
          horizontalAlign="center">
          <mx:Label text="View Two"/>
          <mx:Button label="Make myComp Visible" click="myComp.visible=true;myComp.includeInLayout=true;"/>
          <comp:MySimpleComponent id="myComp" visible="false" includeInLayout="false"/>
        </mx:VBox>
      </mx:ViewStack>
    </mx:Application>

  • Open Dialog box on button click using Visual Webpart

    Hi,
    I am trying to create New Item,Edit Item & Delete Item button in Visual web part.On clicking on the button it should open the corresponding custom form on dialogue box.I don't want to create any button in the ribbon.I just want to create UI page for
    all buttons and also corresponding input forms on button click in Visual web part.
    Is it possible through visual web part?
    I will be needing your initial guidance to achieve this.
    Please help.
    Thank you.

    Hi,
    According to your post, my understanding is that you want to open modal dialog in a visual web part.
    To open a modal dialog, there are multiple ways, such as using JavaScript.
    However, for your scenario, you should register the script from the C# code, there are some articles for this topic, you can refer to them.
    http://www.ashokraja.me/articles/How-to-Programmatically-Show-or-Hide-a-Modal-Popup-Dialog-with-Server-Side-Code-in-Share-Point-2013
    http://blogs.perficient.com/microsoft/2012/01/sharepoint-2010-closing-a-modaldialog-manually-from-code-c-and-javascript/
    More reference:
    http://blogs.msdn.com/b/chaks/archive/2011/09/14/modal-dialog-box-in-sharepoint-sandbox.aspx
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

Maybe you are looking for