Disable a text field

Hi,
A non-database text field in a block with 10 rows displayed. I want to programatically enable/disable an instance of this field belonging to the current record. I tried to use set_item_instance_property but there is no enable/disable property in this built-in. Any other way ?
Regards,
Suresh

Suresh,
As Baig said, you have to set the INSERT_ALLOWED, UPDATE_ALLOWED, NAVIGABLE properties TO PROPERTY_FALSE will work for you. Its almost like disabling the item.
SET_ITEM_INSTANCE_PROPERTY('<block_name>.<item_name>', CURRENT_RECORD, NAVIGABLE, PROPERTY_FALSE);
SET_ITEM_INSTANCE_PROPERTY('<block_name>.<item_name>', CURRENT_RECORD, INSERT_ALLOWED, PROPERTY_FALSE);
SET_ITEM_INSTANCE_PROPERTY('<block_name>.<item_name>', CURRENT_RECORD, UPDATE_ALLOWED, PROPERTY_FALSE);Regards,
Manu.
If my response or the response of another was helpful or Correct, please mark it accordingly

Similar Messages

  • How to disable the text field in File upload element?

    Hi,
    How can we disable the text field in the "File upload" UI element so that the user won't be able to type the file path there, but he will still be able to browse the file using the Browse button?
    Regards
    Praveen

    Hi Praveen,
    This is not possible with the Web Dynpro File Upload UI element.
    Thanks,
    Samta

  • JDialog Disable button Text field Empty

    Hi,
    How can I disable the send button if the JText field is empty in JDialog box.
    Thanks in advance
    Balaap

    There is no need to post the same question twice in the same forum and please do not cross post.

  • How to disable a text field

    Hi experts,
    I have a req. in which I have designed a selection screen.
    Now there are 2 radio buttons namely ALV n Excel.
    Below that, there is another text box called Path.
    My req. is that only when the user selects the radio button Excel, the Path field should
    get enabled.
    How can I achieve this functionality?
    Below is the piece of code where I have declared the buttons.
    SELECTION-SCREEN: BEGIN OF BLOCK b4 WITH FRAME TITLE text-004.
    PARAMETERS: S1 RADIOBUTTON GROUP RAD2 DEFAULT 'X',
                S2 RADIOBUTTON GROUP RAD2.
    SELECTION-SCREEN: end OF BLOCK b4.
    SELECTION-SCREEN: BEGIN OF BLOCK b5 WITH FRAME TITLE text-005.
    PARAMETERS: p_path LIKE RLGRAP-FILENAME.
    SELECTION-SCREEN: END OF BLOCK b5.
    Thanks,
    Ajay.

    hi ajay,
    SELECTION-SCREEN : BEGIN OF BLOCK B1 .
    SELECTION-SCREEN SKIP 1.
    PARAMETERS : P_RB1 RADIOBUTTON GROUP G1 DEFAULT 'X' USER-COMMAND AC,
                 P_RB2 RADIOBUTTON GROUP G1.
    SELECTION-SCREEN SKIP 1.
    PARAMETERS : P_FILE TYPE RLGRAP-FILENAME MODIF ID ZFI.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN : END OF BLOCK B1.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN .
    *-- if radio button from excelsheet is selected
        IF P_RB2 = 'X'.
          IF SCREEN-GROUP1 = 'ZFI'.
            SCREEN-ACTIVE = '1'.
          ENDIF.
          IF SCREEN-GROUP1 = 'ZF1'.
            SCREEN-ACTIVE = '1'.
          ENDIF.
    *-- if radio button from database is selected
        ELSEIF P_RB1 = 'X'.
          IF SCREEN-GROUP1 = 'ZFI'.
            SCREEN-ACTIVE = '0'.
          ENDIF.
           IF SCREEN-GROUP1 = 'ZF1'.
            SCREEN-ACTIVE = '0'.
          ENDIF.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    regards
    Gaurav

  • How to disable certain text fields in second tab based on the drop down selection from first tab?

    My first tab contains a drop down menu which has two options
    1. Personal info
    2. Office info
    The second tab contains all the information regarding Office and Personal Information. But I need to selectively disable certain fields based on the drop down in first tab.
    For example,
    The second tab consissts of all fields like
    Name,
    Age
    Job title,
    Office Location, etc.
    And i dont want office related details to be displayed if I am selecting personal info in the first tab.
    It would be really great if someone could send me the code for achieving this.
    Thanks in advance.

    Hi Vishnu
                  Can you check the List component in foundation/components ? I think "Build list using" works he same as your requirement. Check the listener they have used in dialog/items/list/items/ listFrom/listeners
    "selectionchanged"  : function(box,value){box.findParentByType('tabpanel').manageTabs(value);}
    here the ExtJs will find the tabpanel with value you are selecting fromdropdown. The title of each panel should match with the dropdown values
    Some queries
    Disable values means you have to remove it from your CRX?
    "values should become mandatory". for tab2? or tab3? - if tab2 and if it is a customized widget then u have to write it in your js only i think.
    Thanks
    Veena

  • Disable Backspace when in input text fields

    Im trying to find a way to disable the keyboard backspace
    button from going back a page in the site but allowing it to
    function as a character delete when needed for typing in an input
    text field of a form.
    Strangely this problem only occurs for about a minute after
    the page is opened....after that it then works correctly. You can
    see what I mean by accessing the site's contact page
    www.safetybusiness.co.uk
    I have found two different sets of code to disable the
    Backspace completely, but this then means it doesn't work at all
    when wanting to delete in the text field.
    Method 1:
    <script type="text/javascript">
    if (typeof window.event != 'undefined')
    document.onkeydown = function()
    if (event.srcElement.tagName.toUpperCase() != 'INPUT')
    return (event.keyCode != 8);
    else
    document.onkeypress = function(e)
    if (e.target.nodeName.toUpperCase() != 'INPUT')
    return (e.keyCode != 8);
    </script>
    Method 2:
    <script>
    function checkShortcut()
    if(event.keyCode==8 || event.keyCode==13)
    return false;
    </script>
    <body onkeydown="return checkShortcut()">
    Anyone know how I can overcome this?

    The TextField class has a tab order property. You may want to
    look into this. As for disabling the backspace key, you can grab
    key presses from user input. I'm not 100% on this but you could use
    Flash to test the key being pressed. If backspace is pressed, find
    out the current object with focus (unsure of this part), if it's an
    input box in flash, have flash handle it or if a text box doesn't
    have focus, send it out to javascript to have it handle it.

  • HTMLD_ITEM.DATE_POPUP  - Disabling text field AND Datepicker.

    Hi all,
    Need help with the following.
    I am using APEX 3.2.100.12 (this is in production and won't be upgraded soon).
    I have a report, that creates dynamically date_popups.
    My query goes like this:
    select
    case
    when trunc(ddc_delivery_date) <= trunc(sysdate) then HTMLDB_ITEM.HIDDEN(3,PTD_PA_MONTH_ID) || HTMLDB_ITEM.HIDDEN(4, to_char(SYSDATE, 'DD-MON-RRRR')) || HTMLDB_ITEM.DATE_POPUP(2,ptd_pa_month_id,'','dd-MON-yyyy', 10, 11, 'DISABLED')
    else HTMLDB_ITEM.HIDDEN(3,PTD_PA_MONTH_ID) || HTMLDB_ITEM.HIDDEN(4, to_char(SYSDATE, 'DD-MON-RRRR')) || HTMLDB_ITEM.DATE_POPUP(2,ptd_pa_month_id,'','dd-MON-yyyy', 10, 11, 'onBlur="valiDate(' || rownum || ');"onChange="setFocusItself(' || rownum ||');"')
    end as "Example"
    from Table;
    Let's assume all those names there work as it is.
    The first "when trunc... " should show the date_popup item, but should be shown disabled; which totally happens, but only on the text field; I also need the datepicker to be void or something, and no popup be allowed to show up, something like: "('IP_CLOSED_DATE').parentNode.nextSibling.firstChild.href="javascript:void(0)", which can be used to not allow a popup be displayed.
    The thing is, I've tried to add another parameter (as I've seen it is possible), including words like disabled, void, 0, etc... and none of them work. So I would like to know if anyone has encountered the same issue and has been able to solve it.
    What I need, is not only the text to be disabled but also the popup.
    Thanks a lot!!
    Jorgelina

    Just noticed that you are on apex 3.2 and that JS code relies on JQuery(builtin to Apex 4.0)
    So we ll try another approach and this does not use any JS
    From your report query, I can see that you column has to be read only when <u>trunc(ddc_delivery_date) &lt;= trunc(sysdate)</u>. In this case you want those row's column to be a readonly text-field. So <b>we use a different API in those cases, i.e APEX_ITEM.TEXT instead of APEX_ITEM.DATE_POPUP</b>
    select
        case
        when trunc(ddc_delivery_date) <= trunc(sysdate) then
            HTMLDB_ITEM.HIDDEN(3,PTD_PA_MONTH_ID) || HTMLDB_ITEM.HIDDEN(4, to_char(SYSDATE, 'DD-MON-RRRR')) || HTMLDB_ITEM.TEXT(2, TO_CHAR(<date column>,'dd-MON-yyyy', 10, 11 ,'read_only="read_only"')
        else
           HTMLDB_ITEM.HIDDEN(3,PTD_PA_MONTH_ID) || HTMLDB_ITEM.HIDDEN(4, to_char(SYSDATE, 'DD-MON-RRRR')) || HTMLDB_ITEM.DATE_POPUP(2,ptd_pa_month_id,'','dd-MON-yyyy', 10, 11, 'onBlur="valiDate(' || rownum || ');"onChange="setFocusItself(' || rownum ||');"')
        end as "Example"
    from <table>;
    Note: Change <date column> to the name of the date column whose value has to be shown
    For readonly date row columns, you would see a text field alone, without a date picker

  • How to set Disabled Text field's Background color

    We have an Applet application which we are running with Java Plug-in 1.5.0_11. We have Grey back ground for all the pages. When the text fields are in editable mode the text color is in black. When they are in non editable mode the text color changes to opaque green (with grey background page color) which is hard to read.
    The same application with Java Plug-in 1.4.2_13 did not had this color problem. When text fields were disabled they appeared as dark grey which was easy to read.
    We are using
    import javax.swing.JTextField;
    Is it a bug in newer Java Plug-in? Is there a work around for this?
    Thanks for any help and suggestions

    Solved this myself by writing a programmatic skin and set it to LinkButton's disabledSkin.

  • Background color of disabled text field?

    In my JClient app, the background color of text fields changes when they are disabled (which is good). But I can't seem to figure out where the color it's background is being set to comes from...not from the text field. Maybe somewhere in the look-and-feel? Anyone have any ideas?

    Found the fix for my problem (again, as usual):
    The problem is with the windowsXP look-and-feel. There is a patch, see winlaf:
    https://winlaf.dev.java.net/release_0.3.html

  • How to grap the disable text field values

    Dear All,
    i have a lov,
    in this lov,i create 3 mappings for display those return values in text iput fieldss
    i want to grab those text fields valuess
    and assign those those values to another vo(table)
    those grapping fields are not changed thats y i kept in disable mode
    that time whenever any action is occure then disable field values are gone
    that time i pass only null to vo.
    but i want to grap the value when i kept those fields are in disalbe alsooo
    how can i grap those valuess.

    you have to create item of type form value & create lOV mapping so that the value will not get lost
    Thanks
    --Anil                                                                                                                                                                                                                                           

  • Disable button when text field is empty

    Hi
    How can I disable a button in JDialog box when the text field is empty and enable it when the user gives some input.
    Balaap

    You will have to use a keyListener since the use is not able to type into a disabled TextField. Listen for KeyEvents, if you get one enable the TextField a fill it with the char of the pressed key.
    Rommie.

  • Problemas, PopUp y Text fields disabled

    Hola,
    Tengo una PopUp, que dentro hay reporte de dos columnas ID, DESCRIPCION,el campo DESCRIPCION, es u link a una url que llama una jascript, que me devuelve los valores del reporte a unos text fields.
    El problema es que uno de los text fields esta disabled por la Conditions y el java no me deja pegar el valor que traigo.
    Alguien tiene alguna idea, o sugerencia Gracias!!!!!
    JP

    Hi Andy,
    Using "disabled" has the effect of turning the colour of the text on any object into shades of gray. There is nothing that you can do about this. There is no css that you can apply to an object that has the disabled attribute set. The nearest you could get would be to create a style class and apply this to the field - but, even with this you can not change the fact that it displays the text in gray (but you can change the font-family and font-size values).
    What you could do is use "readonly" instead which doesn't change the style but just makes the field non-editable.
    Regards
    Andy

  • Problems, PopUp y Text fields disabled

    hello,
    I have a PopUp, that inside is a report of two columns ID,DESCRIPTION. the column DESCRIPTION      
    jascript is or Link to a URL that calls one, that it gives back to the values of the report to text fields to me.
    The problem is that one of text fields this disabled by the Conditions and the Javascript does not let to me stick the value that I bring.
    Somebody has some idea, or suggestion Thanks!
    Juan Pablo

    JaimeRJ wrote:
    Hi, I'm having problems with text fields in full screen.
    I'm aware of the security restriction but Adobe says text fields are disabled only when running in a browser, text fields should be OK when in standalone player or AIR.
    Not the case.
    I'm exporting a .exe file and text fields become immediately disabled when I go to Full Screen. I can't develop the thing in AIR (to use  FULL_SCREEN_INTERACTIVE ) due to company restrictions on installing software. So the standalone exe is the right solution to me, this should be working, but it isn't, please help.
    Hey there,
    The documentation you're referring to says the following:
    "These restrictions are not present for SWF content running in the stand-alone Flash Player or in AIR. AIR supports an interactive full-screen mode that allows keyboard input."
    It mentions nothing about running full screen in a projector executable file which is what you are trying to do. The stand alone flash player is usually an executable file in the flash development environment that is used for testing and debugging flash content for the developer. For distributing your app I would think that there would be good reason to prevent text input in full screen projector files for the security reasons. You should probably look at distributing your intended content some other way or ask for special permission to do AIR. I can't confirm this, but maybe this might be an option: http://www.flashjester.com/?section=tricks_jugglor3
    Hope that helps.

  • How do I disable printing of my PDF if a text field isn't filled in?

    Hello all I'm currently trying to find a way to make the print button of my pdf not work if say a necessary textfield wasn't filled in?
    I take it that the standard validation scripts won't work?
    The very helpful fellow from a thread seemed pretty sure it couldn't be done.
    In short in order the print button to work the form must have certain textfields populated with content if the combo box next to them has a certain value selected.
    Say for example
    A text field by the name AIMCode_R1 has no content in it but it's related combobox "Loc_R1" has value 2 currently selected then before printing the pdf must validate that textfield "AIMCode_R1" has content and visversa if "AIMCode_R1" has content then "Loc_R1" must have  value 2,3 or 4 selected before the pdf will allow the user to print.

    In that case all the responses above are incorrect. You can write whatever conditions you want before calling the print command.
    Of course, the user will still be able to print the file using the built-in Print command, in which case you can use some of the ideas mentioned above, but the file will still print. One approach I like to use is to reset the form if some required fields are not filled-in, so the printed copy is blank, and then re-fill it afterwards, so the user can complete it.

  • Disabling BC4J bound text fields

    If I have a JTextComponent bound to a database field, and I want to disable to the field, I call myTextField.setEnabled(false).
    This works initially, but as soon as the view is refreshed, the box somehow enables itself again. Can anyone explain this for me?
    Thank you!
    Owen Gibbins

    You have to create a subclass of JTextField (which I think is what you are using), which looks something like this:
    class MyTextField extends JTextField
    protected boolean isReallyEnabled = true;
    public boolean isEnabled()
    return isReallyEnabled();
    public boolean isReallyEnabled()
    return isReallyEnabled;
    public void setReallyEnabled(boolean b)
    isReallyEnabled = b;
    To enable/disable the control, you use the 'reallyEnabled' property. The 'enabled' property will now be ignored.
    HTH

Maybe you are looking for