Focus of radio button (should be easy)

When you have a group of radio buttons and radio buttons you set the button of the radio as FOCUSABLE or do something else to operate the myradiobutton.isFocus ()?  I'm testing to the development in navigationclick but I still don't see not the radio button with focus - even if it is highlighted and if I hit enter it is activated.

I'm in a pop-up window.  I develop for the 4.2.  Just below the Radio buttons is an objectlistfield and this area is still active even if the radio button is selected and functional if I hit the enter key.  It's almost like radio buttons are on the top of the objectlistfield or something but I didn't something fancy to try to put one over the other and if the list is empty, I don't see the "* void *" is located on top of the radio buttons, and vice versa.

//The radio definitions
RadioButtonField radio1, radio2;
RadioButtonGroup rgrp;

//The radio group and button creation
rgrp = new RadioButtonGroup();
radio1 = new RadioButtonField("Phone", rgrp, !saveToSD);
radio2 = new RadioButtonField("SD", rgrp, saveToSD);

radio1.setChangeListener((FieldChangeListener) this);
radio2.setChangeListener((FieldChangeListener) this);

// Where I am testing for navigationclick
protected boolean navigationClick(int status, int time)
{
  if( radio1.isFocus() || radio2.isFocus())
  {
     super.navigationClick(status, time);
     return true;
  }

  -- if radio buttons don't have focus the next section of code will get the objectlistfield selection and take action --

Am I missing something simple (like a task to put the word FOCUSABLE)?

Thank you
Craig York

Thank you Rex - you put me on the right track and I hacked together something that works...

Details:

getFieldWithFocus returns the VerticalFieldManager - not very useful

getLeafFieldWithFocus returns the field I really want

After several iterations of trial and effort I finally just changed my code to this:

Field tmpfield = getFieldWithFocus();
Field tmpfield2 = tmpfield.getLeafFieldWithFocus();

if(tmpfield2 != fileList)
{
   return super.navigationClick(status, time);
}

// fileList is my objectlistfield so if I am not processing that just let super handle this navigationclick

Note I have also now use your Super return... instead call super and returning true - it makes much more sense.

Thank you VERY VERY much for sending me in this way.

Kind regards
Craig York

Tags: BlackBerry Developers

Similar Questions

  • change field bitmap on the focus of radio button

    Hello

    I have 4 radio buttons in a group of radio buttons. Each of the radio buttons has a picture that is linked to. I want to change the image of a bitmap field whenever a radio button got the update.

    How can I do?

    Thanks in advance.

    Call super.onFocus and super.onUnfocus, as well as the change of the bitmap of treatment.

  • still trying to make more visible radio button selections

    11.1.1.4 forms (us better not know because it is not certified for 2012r2 which is the machine that we could put this on.)  We expect...)

    in when-radio-changed before

    OK after having corrected a mistake big it's the current code:

    It works to set a different color when running a label radio! But there is a problem. I can't seem to

    unplugged the color. When the user selects another radio button colors should change course.

    For some reason any, as I get to the effect that they cannot be changed again. Any ideas?

    Does anyone know how to specify < unspecified > as a color? I tried many things and no

    work.

    declare

    currfield varchar2 (64): =: system.trigger_field;

    Val varchar2 (10): = 0;

    unpickedcolor varchar2 (20): = "r50g75b50";

    pickedcolor varchar2 (20): = "r100g100b100";

    Start

    set_radio_button_property (currfield, 'CONCENTRATE0', BACKGROUND_COLOR, unpickedcolor);

    set_radio_button_property (currfield, 'CONCENTRATE1', BACKGROUND_COLOR, unpickedcolor);

    set_radio_button_property (currfield, 'CONCENTRATE2', BACKGROUND_COLOR, unpickedcolor);

    set_radio_button_property (currfield, 'CONCENTRATE3', BACKGROUND_COLOR, unpickedcolor);

    Val: = trim (name_in (currfield));

    If val = '0' then

    set_radio_button_property (currfield, 'CONCENTRATE0', BACKGROUND_COLOR, pickedcolor);

    elsif val = "1" then

    set_radio_button_property (currfield, 'CONCENTRATE1', BACKGROUND_COLOR, pickedcolor);

    elsif val = "2" then

    set_radio_button_property (currfield, 'CONCENTRATE2', BACKGROUND_COLOR, pickedcolor);

    elsif val = "3" then

    set_radio_button_property (currfield, 'CONCENTRATE3', BACKGROUND_COLOR, pickedcolor);

    end if;

    synchronize;

    end;

    I got it! Many hours trying things, doing really, really, really stupid mistakes, etc. And the answer is below.

    NOTE that it is impossible to change the BACKGROUND_COLOR of the option button, because what happens is the color change _sticks_. (11.1.1.4) if the user has chosen an option button and then selects another so you have two radio buttons that have the selected color and so on. But it happens with VISUAL_ATTRIBUTE is the way to go. Here, I got a Visual attribute (which replaces the background_color) and the font size and the font defined for the radio group and that does not cause a problem. All the radio button properties have the default value and .

    It comes to relax when-radio-changed before status.  CURRENT and SELECTED are defined VISUAL_ATTRIBUTES.

    Now, if only there were an easier way of coding this because having a zillion radio groups this is going to be one heck of a

    a lot of work duty code using hard-coded radio_button_names.

    declare

    currfield varchar2 (64): =: system.trigger_field;

    Val varchar2 (10): = 0;

    Start

    Val: = trim (name_in (currfield));

    set_radio_button_property (currfield, 'CONCENTRATE0', VISUAL_ATTRIBUTE, 'CURRENT');

    set_radio_button_property (currfield, 'CONCENTRATE1', VISUAL_ATTRIBUTE, 'CURRENT');

    set_radio_button_property (currfield, 'CONCENTRATE2', VISUAL_ATTRIBUTE, 'CURRENT');

    set_radio_button_property (currfield, 'CONCENTRATE3', VISUAL_ATTRIBUTE, 'CURRENT');

    If val = '0' then

    set_radio_button_property (currfield, 'CONCENTRATE0', VISUAL_ATTRIBUTE, 'SELECTED');

    elsif val = "1" then

    set_radio_button_property (currfield, 'CONCENTRATE1', VISUAL_ATTRIBUTE, 'SELECTED');

    elsif val = "2" then

    set_radio_button_property (currfield, 'CONCENTRATE2', VISUAL_ATTRIBUTE, 'SELECTED');

    elsif val = "3" then

    set_radio_button_property (currfield, 'CONCENTRATE3', VISUAL_ATTRIBUTE, 'SELECTED');

    end if;

    synchronize;

    end;

  • Length of list of radio button never ceases to increase - is this good?

    I have a set of 5 radio buttons in a form that all report to the same radio button list (as far as I can tell!) - they look like that in the hierarchy tab:

    rblApprQ1

    -rblApprQ1_1

    -rblApprQ1_2

    -rblApprQ1_3

    -rblApprQ1_4

    -rblApprQ1_5

    I have a bit of validation on my button validate to check one of the boxes has been verified, as follows:

    var

    rblApprQ1 = xfa.resolveNode("mainForm.rblApprQ1");

    This happened in another script object:

    function

    checkRadioButtons (field)

    {

    rbChosen

    = '';

    Len

    = field.nodes.length;

         for (i = 0; i <len; i++)

    {

              if (field.nodes.item (i) .rawValue ! = null)

    {rbChosen

    = field.nodes.item (i) .rawValue ;}

    }

         if (rbChosen == '')

    {

    return false;}

    on the other

    {

    return true;}

    }

    The problem I have is, if no box is checked, the value of len in the function checkRadioButtons is 5 - I assume that's 5 separate boxes in my radio button list? Yet when the buttons are selected, the len value goes up to 7, which makes my waste of function!

    I'm doing something wrong?

    You get an extra node after the selection is made. If I look at the className of the object property, you'll see that each radiobutton class

    domain name and the extra node is of type calculation. Then put a supplement come to make sure that you test a node of type 'field '. So I propose the code that returns the value true or false outside the loop for. At the moment, you return it to us for each option button in your list. You should only return a single value. I also changed the name of the object passed to the field to test to make it easier to follow. Here is a view of the code I created for testing:

    checkRadioButtons (RadioButtonList)

    function checkRadioButtons (test) {}
    rbChosen = ";
    Len = test.nodes.length;
    App.Alert (Len)

    for (i = 0; i
    rbName = test.nodes.item (i);

    App.Alert (rbName.saveXML ("Pretty"));
    If (rbName.className == "field") {}
    If (test.nodes.item (i) .rawValue! = null) {}
    rbChosen += test.nodes.item (i) .rawValue;
    }
    }
    }
    If (rbChosen == ") {}
    App.Alert ("no RBs were selected");
    } else {}
    App.Alert ("RB selection was made");
    }
    }

  • Cannot be selected 2 radio buttons in different columns in a DataGrid.

    Hello

    I have 2 columns of radio buttons successfully using itemrenderer. But I am unable 2 radiobuttons select simultaneously since the two columns.

    Here, I enclose the screenshot of the application. Since the screen shot I will explain to you wht exactly my problem is...

    radio_image.JPG

    If I select the box option helps in the first row, and then I want to select Start button in the second row while the first line help button is still selected; but I am unable to do that is to say, the focus moves

    In short, help Option radio buttons and option buttons in startup should be in two separate groups.

    Thanxs

    Gerard

    Comment your code in init() & flag 1 the erroneous values value & flag 2 in your XML.

  • Select a radio button via javascript

    Is it possible to select an option button using a script?

    I'm trying to select a radio button with the 0 value in a group called Department if a radio button with a value of 0 is selected in a group called TimeofCall.

    I tried this and several variants:

    If

    ((this. TimeofCall.rawValue == 0))

    {

    xfa.host.messageBox ("day is selected.");

    This. Department.rawValue

    == 0;

    }

    I get the message, so I know he checks the TimeofCall group but I can't seem to select an option button in the Group of Department.

    Any ideas would be appreciated.

    -Kevin

    You are the syntax is a little messed up.

    'This' is used to refer to the current object.

    Thus, assuming that the value you are testing is the current focus of basic education should be along the lines of:

    If (this.rawValue == 0) {}

    RadioButtonList.fieldname.rawValue = 0;

    }

    else {}

    //}

    If you test another area, it would be:

    If (fieldname.rawValue == 0) {}

    RadioButtonList.fieldname.rawValue = 0;

    }

    else {}

    //}

    Hope that helps! Going from memory for the moment...

  • Radio buttons option requires inputText to fill

    I have a few radio buttons where people have 3 options. One of the options is to be rejected. If the rejection is chosen, I want an inputText on this page to become necessary so that the user cannot save his choice until he wrote a few comments in the inputText. My problem is that I Don t know how to catch the value of option buttons until I saved this value to the database. I would be grateful if someone could tell me how to do this.


    I got it to partly to work now. I have an ID assigned to radio buttons and use this id in the partialTriggers of the InputText component property and then set the required property to #{bindings. Status.inputValue is "Reject"}. In this way I have seem to be able to get the value in the option buttons until it is saved in the database. But the problem I have now is that if the user changes his mind and won't reject anyway and sets the option buttons to again accept the remains of InputText required instead of evolution not requires again as I thought he would do.

    Published by: Viking Atlantic on November 5, 2008 04:52

    Hello

    the immediate property of the 'true' radio button value and complete response of the FacesContext in order to avoid an update of the model. I would like to write the condition or not the textfield should be obliged by a managed bean variable. In this way is easier to change the value

    Frank

  • Impossible to analyze your diet. Invalid XML: error on line 190: name of the "disabled" attribute associated with an element type "button" should be followed by the "=" character.

    Hello I am trying to download an episode of my Podcast podcast connect and get this error?

    Impossible to analyze your diet. Invalid XML: error on line 190: name of the "disabled" attribute associated with an element type "button" should be followed by the "=" character.

    my diet is validated? http://beprovidedhealthradio.libsyn.com/RSS

    It worked for my first episode? I don't know why it doesn't work for the second episode. I also use Libsyn if that helps.

    Your show is already in iTunes.

    https://iTunes.Apple.com/podcast/id1151562400?MT=2 & ls = 1

    And everything seems fine with it and your diet.  You ONLY SUBMIT YOUR FEED ONCE.

    That's it - better to stay outside of your podcast connect account - only bad things happen to go there and play with things.  Once again, your show is very well and is in iTunes and your flow is good with it.

    Both episodes show when you subscribe - and your most recent episode appears on the page of the iTunes, general store with in 24 hours from when you posted it.

    Rob W

    https://iTunes.Apple.com/us/podcast/beprovided-health-radio/id1151562400?MT=2 https://iTunes.Apple.com/us/podcast/beprovided-health-radio/id1151562400?MT=2

  • Help with custom radio buttons.

    Before you go all Rube Goldburg thought that I post for a quick reality check.

    Basically, I have a test with several different configurations of coupon and I try to give users an advanced interface to select one they use. Using radio buttons seems the way to go and I inserted my custom images but I have only be able to select by clicking on the buttons. I want the user to be able to click on the image. Unless I'm missing something, I have this feeling that I have to create the four complete custom Boolean buttons with States of 4-6 and then write the code to do that alone is never on at the same time?

    Joint-

    You can change the appearance and the size of the used option button and overlay them on your chart, and then set the transparent parameter. So it looks like they're clicking on custom image but they are clicking on the invisible button on the top of the image.

    But it might be easier to use a ring of photo,

    Photo ring can be changed at runtime to add selections. Where the radio button enum cannot.

  • Event based control radio button

    Is there an easier way to write this code and keep the same functionality?

    Just use number of table of Boolean

    The method works if you don't allow zero points NOTE: do not replace the Add 1 increments.  We use the constasnt U32 to compel the radio button enum or vice versa just incrment the enum; enum (0.1) ++ = (1, 0) enum and enum (0.1) + 1 = U32 (1,2)

    If you do not allow that zero elements remove the addition because "no selection" becomes 0

  • CHECKED radio button disables never

    Hello

    I'm developing a portal based on a browser for the management of field technicians. It is mainly designed for navigation on PC, but I have to make sure that parts are working on BlackBerry "BOLD (9000 /" ")."

    The problem I have is that I have a group of four option buttons, which one is CHECKED by default. On the BlackBerry, I never have to uncheck that, regardless of which radio button is selected by default. If I don't by default not he checked, all radio buttons work fine.

    It works well on other browsers - but not on the BlackBerry.

    (my version of the software is v4.6.0.162 (Platform 4.0.0.155))

    Here is the HTML source on Firefox (you can see option 1 is checked):

             Update Your Status          

    Select new status:

    available

    enroute to incident
    working on incident Lone worker on site? 
    unavailable

    Html is a little different on the Blackberry using ALT - RBV, but I couldn't understand how to retrieve the source from there!

    I'd appreciate any help - it's driving me crazy!

    You can publish this Web page somewhere and give us the link?
    It'll be easier to debug.

    In addition, don't forget that your document is HTML 401 compliant using http://validator.w3.org/

  • the radio button background

    Hello

    I have a few radio buttons on my project. They appear as it should in the first place: -.

    But when I click on one the transparent parts show Blue: -.

    How can I stop this happening?

    Do you want it looks like F in your photo?

    I can only imagine that, two colors (background and foreground), the outer part is the first while the dot in the middle is the last.  Try substituting the method object - like this:

    protected void paint(Graphics g) {
        int oldBg = g.getBackgroundColor();
        int oldFg = g.getColor();
        g.setBackgroundColor(Color.ORANGE);
        if (isFocus()) {
            g.setColor(Color.BLUE);
        } else {
            g.setColor(Color.ORANGE);
        }
        super.paint(g);
        g.setColor(oldFg);
        g.setBackgroundColor(oldBg);
    }
    

    I who did not test and would be curious to know the result.

    Good luck!

  • How can I add some radio buttons and textbox on the Web

    Hi friends,

    I have a few critical requirements for my application:

    1. There should be a background image.

    2. I need to have 2 radio buttons and a text box. where the user is allowed to give feedback.

    How can I achieve this requiments.

    What ui component I need to use: form or canvas.

    If form, so how can I set the background.

    How can canvas, I add the boxes to option and TextBox.

    can someone suggest me please.

    Thank you

    Maury.

    Thank you very much for your answer.

  • How to show or hide the region of the shuttle during the click on the radio buttons?

    Hello

    I'm new to JDeveloper. Here is my requirement.

    1. create 2 radio buttons: Yes and no and default displays "" selected radio button.

    2. create a region of shuttle with select query in VO.

    Query is:

    Select 'No group' for_user, for_pkg double null

    Union

    Select "Company" for_user, for_pkg "SEGMENT1" double

    Union

    Select 'Rental' for_user, for_pkg 'SEGMENT2"double

    Union

    Select 'Cost center' for_user, 'SEGMENT4' double for_pkg

    Union

    Select 'Project' for_user, 'SEGMENT5' double for_pkg

    Union

    Select "Intercompany" for_user, "SEGMENT8" for_pkg of the double

    order by nulls first for_pkg

    3. initially hide the region of the shuttle during the loading of the page.

    4. click on the radio button 'yes', display area of the shuttle with values at the head of list of query VO and empty list leak.

    5. new click on the 'no' radio button, he must hide region and so screen shuttle shuttle dynamically according to the selected option button.

    But my problem is I am able to hide area shuttle when the page loads at the beginning and after that, when I'm clicking 'Yes' radio button, is just to display area shuttle empty without value in the main list and once when I'm clicking 'No' radio button, it should hide area shuttle but he's not hiding. I used the RPP to show or hide the area Shuttle under certain conditions. I use JDev 10.1.3.3.0 version as we Oracle EBS version 12.1.2 in our society.

    Please find the attached draft and suggest me proper with examples of sample approach.

    Monika,

    I tried to get this working in the lower version of Jdeveloper and looks like it works.

    Can you make the change below and see what happens.

    1. modify your query to VO as below: (I replaced null with SEGMENT0)

    select 'No Grouping' for_user, 'SEGMENT0' for_pkg from dual
    union
    select 'Company' for_user, 'SEGMENT1' for_pkg from dual
    union
    select 'Location' for_user, 'SEGMENT2' for_pkg from dual
    union
    select 'Cost Center' for_user, 'SEGMENT4' for_pkg from dual
    union
    select 'Project' for_user, 'SEGMENT5' for_pkg from dual
    union
    select 'Intercompany' for_user,'SEGMENT8' for_pkg from dual
    order by for_pkg
    

    2. place VO execution to the processFormRequest:

        public void processFormRequest(OAPageContext pageContext,
                                       OAWebBean webBean) {
            System.out.println("In process Form Request");
            super.processFormRequest(pageContext, webBean);
            OAApplicationModuleImpl appModule =
                (OAApplicationModuleImpl)pageContext.getApplicationModule(webBean);
            String eventParam = pageContext.getParameter(EVENT_PARAM);
            System.out.println("eventParam: " + eventParam);
            if ("showHideShuttle".equals(eventParam)) {
                //  appModule.invokeMethod("deletetrailing");
                System.out.println("Inside If");
                OAMessageCheckBoxBean messageCheckBoxBean = (OAMessageCheckBoxBean)webBean.findChildRecursive("checkBoxBean");
                System.out.println("messageCheckBoxBean : " + messageCheckBoxBean);
                String messageCheckBoxBeanVal = (String)messageCheckBoxBean.getValue(pageContext);
                System.out.println("messageCheckBoxBeanVal: " + messageCheckBoxBeanVal);
    
                if ("Y".equals(messageCheckBoxBeanVal)) {
                    OAViewObjectImpl shuttleVO1 =
                        (OAViewObjectImpl)appModule.findViewObject("ShuttleVO1");
                    if (shuttleVO1 != null) {
                        shuttleVO1.setWhereClause(null);
                        shuttleVO1.setWhereClauseParams(null);
                        shuttleVO1.executeQuery();
                        System.out.println("Executed Query : " + shuttleVO1.getQuery());
                    }
                    OAViewObjectImpl shuttleVO2 =
                        (OAViewObjectImpl)appModule.findViewObject("ShuttleVO2");
                    if (shuttleVO2 != null) {
                        shuttleVO2.setWhereClause("1=2");
                        shuttleVO2.setWhereClauseParams(null);
                        shuttleVO2.executeQuery();
                        System.out.println("Executed Query1 : " + shuttleVO2.getQuery());
                    }
                }
                String[] name = { "RenderAttr1" };
                String[] val = { messageCheckBoxBeanVal };
    
                Serializable[] params = { name, val };
                Class[] paramTypes = { String[].class, String[].class };
                appModule.invokeMethod("setXXCustomPVOValues", params, paramTypes);
    
            }
    
        }
    

    3. move Spel link shuttle Bean for the region of header above.

    Some useful links for the shuttle Bean:

    Technology blog based in Java of Sushant: 13. Area of application OFA shuttle

    Framework OA Blog: control of the shuttle as part of OSTEOARTHRITIS

    See you soon

    AJ

  • What to put in the xsd schema for the form of the ADF radio buttons?

    Hello, we create a form generated from the data of a HT ADF auto which is a type defined in a schema .xsd. Which schema component Let's in the .xsd schema correspond to buttons option in the form of the ADF? For example, in our .xsd we just

    <? XML version = "1.0" encoding = "UTF-8"? >

    " < xsd: Schema container = ' http://www.w3.org/2001/XMLSchema "xmlns:wf =" " http://www.example.org "

    " targetNamespace = ' http://www.example.org "elementFormDefault ="qualified"> "

    < xsd: complexType name = "FormDataType" >

    < xsd: SEQUENCE >

    < xsd: element name = "FirstName" type = "xsd: String" / >

    < xsd: element name = "Name" type = "xsd: String" / >

    < xsd: element name = "Department" type = "xsd: String" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: Schema >

    What would be the element / type etc be for radio buttons?

    Hi Tali,

    It depends on what you want to do with radio buttons, but it would be better to be a part of string in most cases.

    This could be better handled on the ADF OTN forum, but I'll take a shot at it.  If you have many items to choose from, you can use the string "Department", you already have in your XSD.  When displayed on the form, include various departments with radio buttons next to each other (for example,"manufacturing", "Marketing", "Sales").

    Because this is the BPM forum, I guess your XSD is used as data for a human task which in turn used to create a form of the ADF.  If this is the case, you can use your "Department" in your XSD string element that has already been placed on your form as a text input field.  The reason is the link that you need to update the element of the human task service is automatically created in this way.  Select this field to text, and then in the properties panel, copy the text that is in the 'value' of the field (you stick it in the Value property of the Radio group you will add in the next step).

    There are two ways to get the radio buttons on the form.  You might drag the "Radio group" widget on the form-> click on radio to 'Create a list (select an item)' button-> click the Add icon to add the choices you want to appear on the form (for example,' manufacturing ', 'Marketing', 'Sale').   Once this was added, paste property value text you copied in the previous step into the field of "Value" property of the new Radio group.

    If you select the radio button of the new group source, it should look like this if you wanted two choices for your radio buttons:

    After this has been added, delete the existing text entry field that was created when the form was generated automatically from the human task.

    Hope this helps,

    Dan

Maybe you are looking for

  • Bookmarks missing keyword content.

    If two bookmarks has same keyword if one of them is missing, so my keyword lost because not like that before.The column keyword on library is missing too.Why this happens and how to solve?

  • My wife can no longer access his email

    Suddenly, she lost the ability to receive emails through thunderbird even if she could send. The provider, century link, changed his password in an attempt to trouble. I managed to get to his mailing list, but now she has lost beyond emails and still

  • Ubuntu Jaunty on Satellite A60 (PSA60E) - Fn keys and brightness do not work

    Hello, I am unable to use the Fn keys on my laptop, probably due to acpi problems (while the initialization of the system tells me "not connected to IO-APIC timer").I should update my bios (currently I have ' acpi bios v1.70 ") or what? Thank you ver

  • HP workstation xw4100 does not start - flashes 3 times

    Hello My HP workstation xw4100 worked well. I removed the cover and removed all the dust with a vacuum cleaner. I placed the cover and tried to boot my pc. It is unbootable. The led flashes red 3 times, stops and blinks red 3 times again. The pc is n

  • Help upgrade the RAM HP Pavilion n208tx

    Hello I have a model of HP Pavilion n208tx with one slot containing 4 GB 1600 MHz DDR3L SDRAM. I am the need for India to upgrade my system to 12 GB total RAM. Since I'm totally new to this sort of thing I need help regarding this. As I said, I want