Disableing a field

Is it possible to disable a field so that it cannot be edited or concentrate? I tried setVisualState (ButtonField.VISUAL_STATE_NORMAL) for a few buttons I have, but they are only temporarily disabled (or at least look disabled).

Hi rcmaniac25,

Sorry I copied the (false) setFocusabled of my class CustomButton. This is not present in the api.

You can try with this:

ButtonField btn = new ButtonField ("Button", Field.NON_FOCUSABLE);

and do not add any listener in the field

btn.setChangeListener (this);

Tags: BlackBerry Developers

Similar Questions

  • How to disable certain fields in the form of a calculation with a checkbox for the fields.

    How to disable certain fields in the form of a calculation with a checkbox for the fields.

    In Canada, we have taxes

    I create a form that allows them to calculate a total

    Shema-pdf-form.gif

    I need to be able to turn off all of those taxes to participate in the calculation and to their field visible should be 0

    I was thinking about using a check box (when the checkbox is enabled (Yes) the tax is calculated, unchecked (Off) the tax is not calculated and visible field should show 0 or anything...)

    I really need help on this one, I am a complete newbie...

    Note that the second tax is calculated on the sum of what the first tax Add (tax first is pan-Canadian tax (all provinces).

    The second tax is never only use (Quebec only (in addition to one Canadian)

    Sometimes to sell outside Canada - no tax at all is calculated...

    What should I do?

    Yes, it's just the JS...

  • How can I disable the fields highlighted as a frame within a specific document?

    I need to disable the fields highlighted on a specific document, regardless of point highlight fields 'users' setting. The fields are being filled with information obtained from a page of entry on my site (not the pdf itself). After a user presses submit, this pdf appears, but the fields are: a) has highlighted b) variable. Bonus points if you can tell me how the fields so that they cannot be changed. Using the 'security' feature and lock by password do not work if I chose to not editable fields because I do not think that the site can enter the information about the pdf. Thank you very much.

    Have you tried to set the fields read-only?

  • How to enable / disable certain fields based on the value of the checkbox

    This is probably a stupid question, but I was not able to find the trivial solution (I'm fairly new to the user's BlackBerry interface)

    Example scenario:

    Screen of the user interface with two components

    box: "Run daily.

    time field: ' to hh: mm ".

    If the check box is enabled, the hour field must be activated. If the check box is not selected, the time field should be disabled.

    I wasn't able to find a simple solution. The solution is to remove all components and re-create it with different style (Field.NON_FOCUSABLE |) Field.READONLY), but there are significant drawbacks:

    1. It's pretty messy keep the current value (if the user has modified the time field and click twice on the box, I would like to have the same value and the field must be dirty)
    2. She becomes more messy when you have more complicated logic (panels inside panels that should be enabled / disabled based on all parent checkboxes)

    Any ideas?

    Thanks in advance!

    The way I handled it was to the custom methods in areas that allow me to set the disabled and then state substitute TouchEvent, NavigationMovement and NavigationClick methods to search for this variable and simply return true if it is defined. This will take care of the FieldChanged States and targeted to make them unable to be activated.

  • Disable query fields

    Hello

    I use Jdev 11.1.1.6. I'm working on a research project for which Iam currently using ADF query Panel. But there are two requirements where I'm stuck.
    1. I want to disable some of the fields in the query Panel when loading the page. On the choice of a field (LOV), the other should get enabled.

    2. I want to combine certain fields and provide an individual participant for these groups (mainly to make it understandable by customers), but there will be only a search button to find the records.

    These requirements is possible via the query Panel? Any work around it?
    Or I'll write my own custom search panel?

    Hello

    the Panel of the query does not allow customizations like this. You must create your own search engine.

    Frank

  • ADF: conditionally disable a field in a table - but not the entire file

    Hello people!

    I want to implent the following:

    Suppose I have a table showing all employees. There is a flag that indicates whether or not the employee is a Manager.
    If the flag is Yes, "Salary" field (and only in this area) should run in read-only (or disabled). In other words, this scenario is that, if an employee is a Manager, no one can change his salary (too bad...).

    I tried the isAttributeUpdatable, but this will make the whole of the noneditable file.
    I tried EL in turn it off and the read-only column attribute (something like #{bindings.managerFlag.inputValue == '1'?) "true": "false"}), but it did not work at all. "

    Do you have any suggestions?

    Thank you very much in advance!

    >
    (something like #{bindings.managerFlag.inputValue == '1'?) "true": "false"} "
    >

    Try #{bindings.managerFlag.inputValue == '1'}

  • Disable all fields, except for one touch, in an Interactive form.

    Hello

    I can properly disable all form fields in a form ES2 with a button and the Javascript, however, I would like to leave a protected password button 'open' so that certain users can unlock the form if necessary.

    The code used is:

    XFA. Form.Form1.Access = "non-interactive";

    XFA. Form.Form1.Page1.UnlockButton.Access = "open";

    I suppose that once the first line of code is run, the second line is ignored. All wisdom would be welcome.

    Thank you

    Ron

    Hello

    You can use a script that uses

    yourSubformName.access = 'protected ';

    on each of your subforms. This still allows users to copy their Clipboard and paste it into another application.

    In the subform that contains the unlocked field or button you will need to

    yourFieldName.access = 'protected;

    on each brother in this particular parent field that contains the unlocked button/field...

    I do and that you have a field that has no border or caption to indicate that there is (invisible, so to speak). If a user (Administrator) knows where the field is that they can enter the secret word and unlock the form with a script using .access = "open" on all objects that you locked.  You can leave a button unlocked instead. You can also styling a button so it can not be seen, too.

    There are probably other ways to do this - but it works for me.

    Good luck

    Stephen

  • How to disable the field in the drop-down list to enter a value

    I got a box dropdownlist field and previously a few numerical values on her list:

    say a list of page numbers,

    11

    22

    33

    41

    42

    43

    52

    ..

    I put codes on the change event so that once the user clicks on an element, it is directed to the specific page immediately.

    But the case is that some users would like to enter the field and type a number rather than clicking.

    If he tries to type 42, change event will get him on page 41 instead (as the 1 '4' tank is put in correspondence),

    and then accidentally edit a field then put the tank rest '2' on it.

    so, how can I disable tapping on a drop down field?

    Rgds.

    Hello

    If you select the drop-down list and go to object > field palette. Here you can uncheck "allow customized entry. This will prevent the user to type in the drop-down list.

    With the drop-down menus, I prefer script to the exit event.

    Good luck

    Niall

    Ensure the dynamics

  • Disable form fields

    I would turn off all the fields of the form (text and drop-down lists) except the "submit" button, the reset and the button "print" when a user enters their signature in the signature on the form text field. I have the following code currently but its locking of the buttons as well.

    for

    ()var nPageCount = 0; nPageCount < xfa.host.numPages; nPageCount++) { }

    var

    oFields = xfa.layout.pageContent (nPageCount, "field");

    var

    nNodesLength = oFields.length;

    for

    ()var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) { }

    oFields.item (nNodeCount) .access =

    "readOnly";

    }

    }

    Is there a way we can disable only the fields and not the buttons.

    OK, so you have to change your operator to & and it should be in somthink like:

    for (var nPageCount = 0; nPageCount< xfa.host.numpages;="" npagecount++)="">
    var oFields = xfa.layout.pageContent (nPageCount, "field");

    var nNodesLength = oFields.length;
    for (var nNodeCount = 0; nNodeCount< nnodeslength;="" nnodecount++)="">
                
    If ((.name oFields.item (nNodeCount)! = "Button3") & (oFields.item (nNodeCount) .name! = "Button4"))

    {
    oFields.item (nNodeCount) .access = "readOnly";
    }
    }
    }

    Yan.

  • How to enable and disable a field dependent on another field in the Apex.

    Hello

    I'm new to Apex. IM using Apex Version 4.2.

    I have a tab named CREDITS he has 10 fields. Among them is PROJECT NUMBER, AUTHORIZAION DATE (CALENDAR TYPE POPUP), and FUNDS FLAG CHECK.

    NUMBER of THE PROJECT , the fields are filled, including the FUNDS VERIFIER FLAG is based on the scenario.

    But the AUTHORIZAION DATE is a REQUIRED field must be filled in by the user

    The requirement is to make DATE AUTHORIZAION as MANDATORY when the FUND CHECK FLAG is * "VIRGIN" * or * 'Y' * ' "

    If the FUND CHECK FLAG is * "N" * then the DATE AUTHORIZAION to bring in OPTION.

    Any help will be greatly appreciated...


    Thank you
    Vishal

    You will not be able to get the answers here, post your question in the appropriate section after mark this thread as answered

    "Oracle Discussion forums" Oracle Database "Application Express

  • How to disable some fields in a form by clicking a button?

    Respected, members
    I use oracle 9i and forms 6i and I have a button on a form. I want that ' when I click that button on this form which will be registered all the data on this form and this form (the form of this specific serial number) becomes disable, as display items, I mean he just become in-top-datable in the shape and the only way to change this leaflet is SQL.

    God bless you.

    For each element in the block, you can:

    set_item_property ('block.item', Enabled, property_false);

    If you have a block record multi, this will put all the records to disabled, so this works only in blocks unique Records.

  • Disable required fields when the subform is hidden

    I'm having a problem with a new section of a form I created. When a box is checked, a section opens. Then in this new section, there are more options to choose from.  The problem is when the form is hidden fields are always recognized as mandatory.  (at least I think that's what is wrong). Im hoping someone can offer some help. I'll probably have to send you the form, as it is easier to explain when you see the form. If anyone can help I'd be very happy.


    Thank you


    Nik

    Rather than make the field as mandatory in the palette object properties, check if the field is null or is set using script before sending the form...

    In this way, you can have more control over the mandatory audit. You can only check if the subform is visible.

    Here's an example of what I'm talking about...

    https://Acrobat.com/#d=QUAfLtK2Pr9oHv9Q59rT4Q

    Thank you

    Srini

  • Disable all the fields in a form, when a button is clicked

    Hello

    When I click on any button in the screen, I need to disable all fields in this form.

    Can tell me this.

    Kind regards

    Srinivas

    Seems funny to have two people asking similar questions - you are associated with this poster?

    http://supportforums.BlackBerry.com/T5/Java-development/focus-field-issue/TD-p/1420511

  • Disable (= update not allowed) the field ordered_quantity in Oracle Apps R12 using FP

    Hi friends,

    Please help me with this requirement - Oracle Apps R12 - related forms-

    Obligation:

    Disable the option to update - user should not update the quantity fields on the tabs IE (price, delivery, returns, Service, other, addresses) if it meets a given condition.

    If someone tries to update - just pop - up error message "update not allowed here!"

    I think we can do this using the form of customization.

    But I'm not actually (event trigger, Trigger, Condition object) - how to disable particular field

    Kindly help.

    Let me know if you need input more

    Thank you and best regards,

    AT

    Business people are generally concerned about the results rather than how to run the task.

    The functionality of constraints treatment is there for these requirements.

    We use it to do many kinds of validations.

    Kind regards

    Bashar

  • Best practices on disabling fields?

    Hello

    I use jdev11R1. I have a page named (firstpage.jspx) jspx. This page is from unboundedTF.

    I want to disable more than 15 fields on just one button. but here, each developer has a different approach to do so.

    can any one of the experts said that's the best approach?

    Developer 1 approach:

    1. tell that we unite all the fields in your bean.

    2. the inside button actionlistener bindvar.setDisabled (true).

    2. Add the partial target programmatically.

    Developer1 saying his advantage on his point of view:

    1 ADF approach traditionally (create bindings). Apart from that I don't need any other substance

    Developer 2 Approach:

    1. I will create 15 variable in your return type of bean must Boolean as well as the get set accessor.

    2. I'm having a common method public void endis (Boolean bool) {this.setVar (bool) ;}

    3 inside of the actionlistener button, I'll call endis (true);

    4. Add the partial target programmatically.

    5. last step in all areas, I use el expersion as #{scopetype.beanname, var}

    Developer 2 saying his advantage on his point of view:

    1 Java approach traditionally (get set accessor).

    2. in the future if I there is a change in condition as

    -no need to disable all fields. just a few fields.

    -Repeat the same thing to the other buttons.

    ultimately without having to completely rewrite .little bit effort only.

    3 Developer approach:

    1. I have a variable pageFlowScope inside the actionlistener AdfFacesContext.getCurrentInstace.getPageflowScope.put('disable','y');

    2. go in all fields have expression el as #{pageFlowScope.disable eq 'y'? true: false}

    Developer3 saying his advantage on his point of view:

    1. no need to link and no need for variable declaration, getter and setter in the bean. any piece of code

    Developer1 perspective saying that following:
       --Developer2 doing having lot of code for disabling the fields.
       --Developer3 not best approach. because oracle docs saying that pageflowscope only for BTF. But pageflowscope works in unboundedTF also.
    
    
    
    
    
    Developer2 perspective saying that following
      --Developer1 binding the each and every variable into the bean for disabling the fields. default binding take care of framework why should i do?
      --Developer3 anyhow it will create getter and setter for that by the framework. if scope value lost all will fails.
    
    
    
    Developer3 perspective saying that following
      --Developer1 binding the each and every variable into the bean for disabling the fields. default binding take care of framework why should i do?
      --Developer2 having lot of code for disabling the fields.
    
    
    
    
    


    "the bottom line of the developer discussion, I conclude.

    each of them: I am the best. but each approach has own strength and weakness. »

    My question will be

    1. is there another approach outside these three?


    before answering the second question. have these things in mind.

    Point1. simple and reusable any developer.

    Point2. use of resources (memory allocation).

    Point3. less time to do the job. here after.

    2. Please suggest how best approach in all of the perspective?

    -edited lately, please pass once again,

    Thank you

    Developer 1 approach:

    ...

    Developer1 saying his advantage on his point of view:

    1 ADF approach traditionally (create bindings).

    Since when does the traditional approach? Never bind the components to a bean if it is not really necessary! Do you have other solutions, this one is out of the race.

    Developer 2 Approach:

    ...

    Developer 2 saying his advantage on his point of view:

    1 Java approach traditionally (get set accessor).

    2. in the future if I there is a change in condition as

    -no need to disable all fields. just a few fields.

    -Repeat the same thing to the other buttons.

    ultimately without having to completely rewrite .little bit effort only.

    Yes, but what the likelihood you must change the fields to turn?

    From my point of view, you put a lot of effort for something, you don't know if it will happen at all. Even if you know it comes it would be easier to form groups and use the group to toggle variable fields. You can then change a field to group a to group b without a lot of programming.

    3 Developer approach:

    ...

    Developer3 saying his advantage on his point of view:

    1. no need to link and no need for variable declaration, getter and setter in the bean. any piece of code

    You have even the code in the actionListener can you use a setPropertyListener for this. The question is why put the variable in the flowrate range of page? We do not know the use case to answer this question. Generally you shouldn't put anything in the pageFlowScope if she is not necessary outside the page. That we do not know. PageFlowScope is a broad field, so you should consider using a smaller if possible scope.

    4. solution: put all the fields in a container. Write a method in bean method that activates / deactivates all the fields of a given container of seizure something like that

    disable the rocker of all child uicomponents inside the given uiComponent

    Private Sub (AdfFacesContext adfFacesContext, UIComponent component) {} toggleDisableInputItems

    The list of items = component.getChildren ();

    for (point UIComponent: items) {}

    toggleDisableInputItems (adfFacesContext, item);

    If (item instanceof RichInputText) {}

    Entry RichInputText = point (RichInputText);

    input.setDisabled (! input.isAutoSubmit ());

    adfFacesContext.addPartialTarget (input);

    } ElseIf (point instanceof RichInputDate) {}

    Entry RichInputDate = point (RichInputDate);

    input.setDisabled (! input.isAutoSubmit ());

    adfFacesContext.addPartialTarget (input);

    }

    }

    }

    There are probably more solutions. I would stick with 3 or 4 depending on the use case.

    Timo

Maybe you are looking for