Control Enable/Disable of Save/Delete/Modify buttons

Hi Friends,
Have some one written a program how to enable disable the buttons on a for. Like i have 4 buttons
1) Add New
2) Save
3) Modify
4) Delete
Now i want to control the enable/disable of these butons. Like when a blank record. ADD NEW, MODIFY, DLETE button shuld remain disable and ONLY SAVE button remains Enable. Similarly when there a change in record. MODIFY BUTTON is enabled.
Similarly other functions. Have someone written the code for this control. I am trying but no desire results.
Pliz Help,
Imran

Hello Imran
You have to write a code like
If <condition> the
set_item_property(button,enable,property<true/false>);
ELSIF <condition2>
set_item_property(button,enable,property<true/false>);
ELSIF <condition3>
set_item_property(button,enable,property<true/false>);
ELSE
set_item_property(button,enable,property<true/false>);
END IF;
the condition can be checked :SYSTEM.form_status.
Regards
Mel

Similar Messages

  • Table Control Enable / Disable Row

    Hi,
    I have a table control with 6 columns also screen contains some header input fields.
    Out of 6 columns first two columns are disabled.
    Depending on value entered in certain field in the header I fill the table control. e.g. if the value in certain field is X, table control is filled with say 15 rows, if value is Y, table control is filled with say 5 rows.
    Now my requirement is only those rows which are filled should be disabled. i.e. If user chooses value Y then all rows after 5 should be input enabled.
    But since I have disabled the columns statically complete column remains disabled.
    Can anybody tell me How to enable a particular row in table control ?
    Thanks n Regards,
    Nitin
    Message was edited by: Nitin Pawar

    Say your Table control in TABCON.
    You screen structure is SC_ITAB.
    Your internal table is ITAB.
    In PBO of screen
       LOOP AT ITAB INTO SC_ITAB WITH CONTROL TABCON.
        module SUPPRESS_ROW.
      ENDLOOP.
    In ABAP Module
    MODULE SUPPRESS_ROW.
    IF SC_TAB IS INITIAL.
    LOOP AT SCREEN.
      SCREEN-INPUT = 0.
      MODIFY SCREEN.
      ENDLOOP.
    else.
      LOOP AT SCREEN.
       SCREEN-INPUT = 1.
       MODIFY SCREEN.
      ENDLOOP.
    endif.
    This will help you suppress at row level.
    You may change the if condition to suit your need .
    Cheers
    ENDMODULE.

  • Re: Enable Save ,Delete buttons in Form

    Hi All,
    I using Jdeveloper 11.1.2.3 ,
    My scnerio is i am taking 2 panel tabs  One tab contain table i.e List, second tab contain the Form i.e Details ,
    I am taking Save,Delete,CreateNew buttons, Whenever i am in List Only CreateNew buttons should enable mode,remaining 2 buttons is in disable Mode.
    and in Details form Save and Delete buttons is Enable Mode.
    How Can i achieve this requirement,
    With regards,
    satishkumar

    Thanks for your Rply Timo,
    I have lot of forms in Application, thats why i am globally defined all the Buttons.
    WithRegards,
    satishkumar N

  • How to set Save and Apply button to disabled

    Hi all
    i need to disable the save and apply buttons according to some action the user is doing, when the user changes some LOV value the save button should be disabled
    the following code i am using is not working to disable the button,
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) {
    String val = "";
    String message = "";
    int statusVal = 0;
    try {
    super.processFormRequest(pageContext, webBean);
    if ("empPositionChange".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM))) {
    OAMessageChoiceBean rGBean1 = (OAMessageChoiceBean)webBean.findIndexedChildRecursive("Status");
    if (rGBean1 != null) {
    val = (String)rGBean1.getValue(pageContext);
    statusVal = Integer.parseInt(val);
    if (statusVal == 1) {
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject vo1 = (OAViewObject)am.findViewObject("WOCreateUpdateVO");
    vo1.reset();
    if (vo1 != null) {
    vo1.next();
    OARow row = (OARow)vo1.getCurrentRow();
    String ReasonCode = (String)row.getAttribute("Attribute1");
    //message = message + ReasonCode;
    if (ReasonCode == null) {
    OASubmitButtonBean savebBean = ((OASubmitButtonBean)webBean.findChildRecursive("Save"));
    if (savebBean != null){
    savebBean.setDisabled(true);
    OASubmitButtonBean applybBean = ((OASubmitButtonBean)webBean.findChildRecursive("Apply"));
    if (savebBean != null){
    applybBean.setDisabled(true);
    catch(Exception exception){
    throw new OAException("Error in Staffing Query: "+exception, OAException.ERROR);
    please any one had this issue.
    any help??
    Regards,

    i am using this code in the processRequest
    public void processRequest(OAPageContext pageContext, OAWebBean webBean){
    super.processRequest(pageContext, webBean);
    OAMessageChoiceBean mcb = (OAMessageChoiceBean)webBean.findIndexedChildRecursive("Status");
    FireAction firePartialAction = new FirePartialAction("empPositionChange");
    mcb.setAttributeValue(PRIMARY_CLIENT_ACTION_ATTR,firePartialAction);
    as for tracking the error it is giving me nullpointerexecption on the OASubmitButtonBean savebBean = ((OASubmitButtonBean)webBean.findIndexedChildRecursive("Save"));

  • Disable Save and email button.

    Hi,
    In the PO Adobe output form MEDRUCK_PO, I need to disable the Save and email button when print Preview is done. The Print button can be disabled by setting  SFPOUTPUTPARAMS-NOPRINT = 'X'.
    Can you please let me know if the Save and Email buttons can be disabled?
    Thanks,
    Dhananjoy.

    The Save buttom cannot be dissabled.
    The available params are:
    Optional: Set output parameters
    gs_outputparams-nodialog = ''.
    gs_outputparams-preview = ''.
    gs_outputparams-getpdf = 'X'.
    gs_outputparams-nopreview = 'X'.
    gs_outputparams-noprint = 'X'.
    gs_outputparams-noarchive = 'X'.
    gs_outputparams-nopributt = 'X'.
    gs_outputparams-arcmode = '1'.
    gs_outputparams-noarchive = 'X'.
    Open print job
    CALL FUNCTION 'FP_JOB_OPEN'
    CHANGING
    ie_outputparams = gs_outputparams
    EXCEPTIONS
    OTHERS = 1.
    Also check PDFCHANGESRESTRICTED = 'X'

  • How to enable / disable SSRS Parameter

    Hi
    I want to enable a parameter called "start date" (type is date) when another (value from dropdown) parameter is selected
    Say for an example, i have below 3 parameters
    1. drop down which 2 values called "vtextbox","vdate"
    2. start (data type is date)
    3. finish (data type is date)
    when i select "vdate"value from the dropdown 2nd and 3rd parameters has to be enable
    similarly when i select "vtextbox" value from the dropdown 2nd and 3rd parameter has to disable
    I have searched many forums every one says this is not possible in report manager interface
    But this is possible in custom code
    please make a note all three parameters are independant
    It would be great if any one provide the custom code for same
    Regards
    Santosh

    Hi itsmesantosh1982,
    According to your description, you want to use a parameter to control enable/disable other two parameters. Right?
    In Reporting Services, when we create a parameter, this parameter has been enabled. The only way you want to disable the parameter is deleting it. In this scenario, disable the two parameter is same as selecting all values in these two parameters. So
    we can just modify the default values in 2nd and 3rd parameter instead of using cascading parameter. We can create a dataset, put in the query below:
    IF @Param='vtextbox'
    select distinct startdate from [table]
    else
    select '[value]'
    The [value] can be any value which is not existing in [table]. So when you select 'vtextbox', the default value will be all values in the table. If you select 'vdate', it will need you to select value automatically because the return value is not existing
    in the table. This can be an effective workaround for your requirement.
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How to use create, delete, modify butttons in a table

    hi all
    in my application i have emp table in my source view
    in that table i have inserted static data in columns i.e., empid, empname. i have 3 buttons create, delete, modify buttons in that table. when i press Create button it navigates to another view1 in which we have a emp form with create new emp button and labels empid, empname and 2 input fields.After filling the form when hit the create newemp button the form data should be displayed in the table.
    The same for Modify and delete.  i.e., when i select a particular empid row in my source view table and hit the modify button it should navigate to view2 in which the particular record form with data displays and after making necessary modifications the modified data should be display in the particular row .
    For delete button, when i select a particular record in the table and hit delete button it should be deleted from the table.
    any snippet of code is valuable
    Thanks in advance
    sravan

    Hi Sravan,
    I just need a clarification, are you getting the table data from the back-end system?
    On the second view, after the user input on click of the "Create New" or "Modify" button, update the back-end. Once the update is successful, fire a plug back to the first view and reload the table or execute the model again. The updated records will be fetched from back-end system.
    On click of "Delete" button, remove the record from the back-end and execute the model again.
    This holds good if you have the data fetched from the back-end.
    Regards,
    Santhosh.C

  • Table control enable and disable rows

    Hi,
    I want to keep the table control in disabled mode initially.
    When user press the add button,the row next to where data is already present should alone be enabled for data entry.
    In PBO event i was able to disable the entire table control.but when i could not find a way to identify the first blank line to enable it for data entry.
    Please help.
    Thanks
    Ambily

    Hi Ambily,
    follow the below steps
    declare a data : w_flag  type c. in the global
    and next write the code the PBO
    PROCESS BEFORE OUTPUT.
    * Module screen GUI-Screen&Status and Screen Logic
      MODULE status_<Screennum>.
    * Table control for OUTPUT
      LOOP AT <table-control> .
        MODULE Modify_screen.
      ENDLOOP.
    Module modify_screen output.
    * Table control reading values from input screen & displaying on screen
      READ TABLE <table>   INDEX <tablecontrol>-current_line.
    If w_flag is initial.
        LOOP AT SCREEN.
          IF screen-name = <Tablecontrol Line>.
            screen-input = 0.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    wndif.
    Endmodule.
    "next in PAI mark the w_flag to 'X'
    Prabhudas

  • Enable/disable problem with button on table toolbar

    Hello *,
    In my WD (ABAP) application, on a view I have a table, a toolbar within it and buttons on the toolbar. I am trying to control 'enable' property of one button, binding it to an attribute in view's context.
    When I do this trick just for any button on the view which is not on the toolbar, it works just fine. But when the button is placed on table's toolbar - it just stays disabled all the time.
    Normally I bind enable property to an attribute in the <b>root</b> node. When I change attribute value, the 'normal' button responds correctly (getting enabled or disabled), but the <u>table toolbar button</u> <b>does not</b>. I start wondering if table controls (like toolbar and its buttons) has something to do with a node the table is bound to?
    Any comments about special features of toolbar and its buttons being placed in a table?
    Thanks!

    Looks like a bug to me. There is nothing special with toolbar buttons vs. "normal" buttons (at least not in Web Dynpro Java).
    Armin

  • Enable/disable lov button in a multi-row bloc

    Hi all,
    I have a form in which there is a multi-row block with some lov buttons related to some items,
    in query mode, user should not be able to modify item, item property update_allowed is set to false, that worked, but user is able to modify item when he clicks on the lov button...so i want to disable the button for query records and for record in (insert or new), button should be enable,
    i tried some tips but don't work, do you have any idea
    Thanks for your help.

    Hi,
    Can you suggest some methods to enable/disable LOVs in my search query? I have a customized VC which performs search and I need to enable/disable the LOVs depending on requirement.
    Abhishek

  • How to use a radio button in enabling/disabling a text box in report progra

    Hi,
        Could any please let me know, how to use a radio button in enabling/disabling a text box in report program.

    *& Report  ZMR_RADIO_BUTTONS
    REPORT  ZMR_RADIO_BUTTONS.
    PARAMETERS : R1  RADIOBUTTON GROUP G1,
                 R2  RADIOBUTTON GROUP G1.
    PARAMETERS : A1 TYPE I,
                 A2 TYPE I.
    AT SELECTION-SCREEN OUTPUT.
    *initialization.
    IF R1 = 'X'.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 0.
    ENDIF.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 1.
    ENDIF.
    ENDLOOP.
    ENDIF.
    IF R2 = 'X'.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 1.
    ENDIF.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
        SCREEN-ACTIVE = 0.
    ENDIF.
    modify screen.
    ENDLOOP.
    ENDIF.
    START-OF-SELECTION.
    *IF R1 = 'X'.
    *LOOP AT SCREEN.
    IF SCREEN-NAME = 'A1'.
       SCREEN-INPUT = 0.
       SCREEN-ACTIVE = 1.
    ENDIF.
    *ENDLOOP.
    *ENDIF.
    *IF R2 = 'X'.
    *LOOP AT SCREEN.
    IF SCREEN-NAME = 'A2'.
       SCREEN-INPUT = 0.
       SCREEN-ACTIVE = 0.
    ENDIF.
    *ENDLOOP.
    *ENDIF.

  • How to disable the Save button For a pdf?

    Hi,
    I have a requirement that when you open the livecycle developed pdf, the Save option available in the toolbar (Save As icon) and File menu of the Reader should be disabled. A button will be provided in the form separately to provide the Save functionality. Can anybody help me reg. this? Is there any setting available for this in Adobe Pro or any other tool?
    Regards,
    Maria

    It's not really difficult to disable the save button. But it depends on the context from where you want to delete it. even if you disable the save button the user has the option to print screen and create a fresh pdf. So your question has some philosophical aspects to deal with. Please mail me at [email protected] incase of further quries. I've understood your problem and have got a solution but it's not somewhat legitimate to do. I can share it with you through email.

  • Enable/disable operation buttons according to the selected row in table?

    Hi,
    I used JDev 11.1.1.2.0
    On my main page, it has a query section and display search result to a table component, and also has some operation buttons like (update/delete) on the toolbar.
    I want to enable/disable the operation buttons according to some filed value of the selected row in the table, and I searched the OTN forum, found more questions like this but seemed no found one right solution.
    The table is single selection, and has a status column, its data type is Integer, and I want to enable buttons when the selected row's status field value is 0 or 1, disable buttons when status value is other values.
    Table code like:
    <af:table value="#{bindings.VO1.collectionModel}" var="row"
    rows="#{bindings.VO1.rangeSize}"
    emptyText="#{bindingsVO1.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.VO1.rangeSize}"
    rowBandingInterval="0"
    filterModel="#{bindings.VOCriteriaQuery.queryDescriptor}"
    queryListener="#{bindings.VOCriteriaQuery.processQuery}"
    filterVisible="true" varStatus="vs"
    selectedRowKeys="#{bindings.VO1.collectionModel.selectedRow}"
    selectionListener="#{bindings.VO1.collectionModel.makeCurrent}"
    rowSelection="single" id="resId1">
    Operation buttons code like:
    <af:commandToolbarButton text="Update" id="ctb2" action="editDAF"/>
    Any suggestion will be great help.
    Thanks,
    zeroxin

    Hi,
    create an attribute binding in the PageDef file for the status field. Then setup the button PartialTriggers property to point to the table ID. The button's disabled property then points to the status attribute binding like
    #{bindings.statusField.inputValue=='value'}
    Frank

  • Button enable/disable in Master-Detail table

    I am using JDeveloper 11.1.1.3.0 and I have a page fragment (.jsff) which includes a Master-Detail table and the Master table has 3 buttons that get enabled/disabled based on the specific string within a column say, if the column has value, 'DRAFT', the buttons should be enabled. In all other cases, the buttons should be disabled.
    The above mentioned scenario works in cases where the table has more than one row in the table; but in two cases the buttons don't get enabled even though the column has 'DRAFT' as its value:
         1. when the table first loads with the data populated in the table; clicking on the first row doesn't trigger the buttons, clicking on any other row triggers the buttons
         2. when there is only one row in the table
    To resolve this, I tried looking at the logs for any specific information regarding the buttons getting enabled or disabled. I couldn't find info on setting up a breakpoint for the commandbutton and the disabled property which would enable me to determine whether it is being triggered as soon as the table gets populated or not.
    How can I get the buttons to work per my requirements? Also, can I set breakpoints for the button and/or evaluate disabled property's EL expression?
    Thanks in advance.

    Navaneeth:
    The buttons are part of panelCollection which exists in panelHeader. As the below code demonstrates,
    1. Buttons are defined in the toolbar (t2) in panelCollection (pc1)
    2. Each buttons' partialTrigger is set to the table (md1)
    3. Tables' (md1) partialTrigger is set to the toolbar (t2).
    <af:panelHeader text="#{viewcontrollerBundle.HISTORIC_PANEL_SPECS__TESTER_S}" id="ph2">
            <af:panelCollection id="pc1" styleClass="AFStretchWidth">
              <f:facet name="menus"/>
              <f:facet name="toolbar">
                <af:toolbar id="t2" partialTriggers="t2">
                  <af:commandButton actionListener="#{bindings.promotePanelSpec.execute}"
                                    text="#{viewcontrollerBundle.PROMOTE_PANEL_SPEC}"
                                    id="cb1" icon="/Images/up16.png"
                                    partialTriggers="md1"
                                    disabled='#{bindings.Status!="DRAFT"}'
                                    immediate="true"/>
                  <af:commandButton text="#{viewcontrollerBundle.ADD_TESTER_SPEC}" id="cb2"
                                    partialTriggers="md1"
                                    icon="/Images/action_add.gif"
                                    actionListener="#{bindings.CreateWithParams.execute}"
                                    action="addTestSpec"
                                    disabled='#{bindings.Status!="DRAFT"}'/>
                  <af:commandButton actionListener="#{PanelSpecTesterSpec.deleteTesterSpec}"
                                    text="#{viewcontrollerBundle.REMOVE_TESTER_SPEC}"
                                    id="cb3" partialTriggers="md1 ::pc2:t1"
                                    icon="/Images/delete.png"
                                    disabled='#{bindings.Status!="DRAFT"}'/>
                </af:toolbar>
              </f:facet>
              <f:facet name="statusbar"/>
              <af:table id="md1"
                        rows="#{bindings.PanelSpecTesterSpecView1.rangeSize}"
                        fetchSize="#{bindings.PanelSpecTesterSpecView1.rangeSize}"
                        emptyText="#{bindings.PanelSpecTesterSpecView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                        var="row"
                        value="#{bindings.PanelSpecTesterSpecView1.collectionModel}"
                        rowBandingInterval="0"
                        selectedRowKeys="#{bindings.PanelSpecTesterSpecView1.collectionModel.selectedRow}"
                        selectionListener="#{bindings.PanelSpecTesterSpecView1.collectionModel.makeCurrent}"
                        rowSelection="single" partialTriggers="::t2"
                        filterVisible="true" displayRow="selected"
                        filterModel="#{bindings.ProductIdPanelSpecVersionToolNameQuery.queryDescriptor}"
                        queryListener="#{bindings.ProductIdPanelSpecVersionToolNameQuery.processQuery}">
                <af:column headerText="#{bindings.PanelSpecTesterSpecView1.hints.ProductId.label}"
                           sortProperty="ProductId" sortable="true" id="c39"
                           filterable="true">
                  <af:outputText value="#{row.ProductId}" id="ot28"/>
                </af:column>
                <af:column headerText="#{bindings.PanelSpecTesterSpecView1.hints.Status.label}"
                           sortProperty="Status" sortable="true" id="c43"
                           filterable="true">
                  <af:outputText value="#{row.Status}" id="ot40"/>
                </af:column>
              </af:table>
         </af:panelCollection>
    </af:panelHeader>The fact that the above code works when there are multiple rows tells me that buttons are having trouble reading the first row of the table.
    Also, I changed the displayRow property for the table from "selected" to "first" but no luck either.

  • Use rich:fileUpload/ to enable/disable my buttons with checking file names

    Hello!
    I need to upload some files with using <rich:fileUpload>,and i did it but i need to check file names for some reasons and enable or disable upload button but my problem is that when i open my modal panel and click add button of <rich:fileUpload> and then add upload button of <rich:fileUpload>(not my upload button but upload button wich <rich:fileupload> has) i check file name but the button is not enable/disable until i close my modal panel and open it agin,so i need to know how to modify my code to make it work?
    <rich:modalPanel  id="uploadFile" autosized="true" resizeable="false">
                    <f:facet name="header">
                     <h:panelGroup>
                         <h:outputText value="uploadFiles"></h:outputText>
                     </h:panelGroup>
                 </f:facet>
                 <h:form>
                      <rich:fileUpload  maxFilesQuantity="#{uploadBean.maxUploadFiles}" allowFlash="true" fileUploadListener="#{uploadBean.uploadListener}" immediateUpload="false"/>
                             <table>
                                <tr>
                                     <td><h:commandButton disabled="#{!uploadBean.xlsNameValid}" rendered="#{!uploadBean.admin}"  action="#{uploadBean.upload}" value="upload" /></td>
                                     <td><h:commandButton action="#{uploadBean.clearFiles}" value="cancel" id="cancel"/></td>
                                </tr>           
                           </table>
                 </h:form>
                 <rich:componentControl for="uploadFile" attachTo="cancel" operation="hide" event="onclick"/>
              </rich:modalPanel>

    No the problem is that file is being checked on server side, but if file is invalid the button Upload(my button ,not standart rich:fileUpload) must be disbaled,and shown,but i have to close this modal panel and open it again to see my button enabled/disabled

Maybe you are looking for

  • "report" not defined in BPM tutorial

    I downloaded BPM suite to test it out and the report variable is not defined. The tutorial said it was self defined, but I got errors when I tried to add result == "Accepted" and report.isApproved == true in the Adding a Condition Transaction part of

  • Output window for NetBeans 5.0

    Hi, I am printing a large amount of information to the output window, but for whatever reason, it goes completely blank after about 75% of the information has been printing. Does anyone know why this happens? Thanks, Jacob

  • Double vendor for invoicing

    Dear SAP Expert, I have a little question about SAP. Here is the root case : My client (Z) have a contract with vendor X while several service in contract was perform by vendor Y. In Contact paper documentation, it was writen. But in SAP data, contra

  • Which do I need?  Extreme or Express?

    I am replacing my DLink router and am uncertain whether to purchase an Airport Extreme or Airport Express. I will only have my iBook G4 connect wirelessly as there are no other computers in the house. It is not likely that I will make use of the iTun

  • DMM/DMS Ldap integration and filters

    We have our DMM 5.2.1 integrated into a Microsoft Ldap environment.  It makes the connection to ldap,  but I can't seem to get any users imported.  Do I need a filter?  If so,  can I get an example different from the one in the manual?  my setup look