Choice of object fields

I use an ObjectChoiceField that allows users to select what is displayed on the screen. The user can select an option and press return or trackball and I can use the selection to change the display. However, whenever I navigate away from the screen (not the domain) I'm prompted to save, delete or cancel 'changes that I made' in terms of choice of object. How can I avoid this message?

Thanks for any advice.

Take a look at onSavePrompt in the class of the screen. You can overrided this to avoid the prompt.

Tags: BlackBerry Developers

Similar Questions

  • Click event does not work for the first choice of object field index

    Hello

    In my application, there is a ObjectChoiceField inMainScreen

    I want to get change Listner of ObjectChoiceField after clicking on index 0. When I am clicking on the second element of the choice field, I am able to move to another screen. But for the first selection of the element, it does not move on the screen.

    if(field == mOcfVehicle)
                {
                    Logger.out("MyProf", "vehicle choice field touched ");
                    int index = mOcfVehicle.getSelectedIndex();
                    Vector vecVID = store.getVehicleID("VehicleID");
                    final String strVehId = vecVID.elementAt(index).toString();
                    UiApplication.getUiApplication().invokeLater(new Runnable() {
    
                        public void run() {
                            // TODO Auto-generated method stub
                            UiApplication.getUiApplication().popScreen(MyProfScreen.this);
                            UiApplication.getUiApplication().pushScreen(new AddNewCarScreen(1, strVehId));
                        }
                    });
    //
                }
    

    Please help me...

    Here it happens little differently. I explain the requirement properly. Suppose that the I am A screen where I have the ObjectChoiceField. I added a choice of X. Now, when I am pressing on the field of choice and selection, it must pass on the screen (B) but that the choice of the field is choice (X) only one, it is not mobile. Now if, after the addition of the choice of two X and Y, if I select go, it's going to screen B. But when again, the field of choice has 2 options X and Y with X as the default selection. There is therefore no chance for me to choose the X.

    Therefore, I have added a Select called default choice. Now, if X is added, field of choice is the choice of towing display: Select and X. And while choosing X, it moves on the screen B.

    Hopefully now, it is good for understanding.

    And can help me please to this: http://supportforums.blackberry.com/t5/Java-Development/How-to-on-the-Camera-Flash-for-a-long-time-l...

    Thank you.

  • Custom object field validation (account name IS NOT NULL)

    Hello world

    It makes me crazy...

    I have a custom object, and I try to apply a simple informal rule. I have an account associated my custom object, and I want to make sure that when the Type field is 'account' account domain cannot be NULL.

    The type field and forget that this isn't a problem, I can't just post if there is an account or not, I think it's because it's a choice field. I tried some of the syntax is:

    [< AccountName >] IS NOT NULL
    '< AccountName >' IS NOT NULL
    Len ([< AccountName >]) > 0

    Any ideas?

    Thank you Oli @ Innoveer

    Hi Oli,

    Try this validation on your field name:

    = IIf([]='Account' AND [] = 'No Match Row Id','ERROR-AAAAAAAAAAAAABBBBBBBBBCCCCCCCCC',[])

    concerning

    Min

  • API bulk: creating custom objects, fields, and lists?

    Hi all

    I have searched and passed through the ticket of support for routing, but have not yet managed to find an answer to this question, so I thought that maybe the people who write the API would be the best ones to talk to

    Anyway, in summary, my question is:-

    Is it possible to create lists of contacts, the Contact fields and items customized by using the bulk API 1.0?

    I know, it is possible to create new contacts and add them to an existing list, but I want to create a new list with the bulk API and then add my contacts on this new list.

    Same kind of thing for the Contact fields. I want to be able to check if there is a Contact field and if not create one and then fill in the import.

    Once again, even for custom objects. I know I can do a GET for all currently available Custom objects, but can I create a new using the API as a whole?

    Any help would be most appreciated.

    Thank you

    Hi Chris,

    You cannot create contact fields, shared lists or the custom objects through the bulk API (which in fact is a RESTful API), they must exist already.

    You can use the REST or lists The SOAP API to create only shared the REST API to create the contact fields, but SOAP or REST currently supports the creation of custom data objects.

    If you don't have it already, please take a look here, building on The Eloqua Platform - A Resource Guide and there REST API - Documentation for kernel objects that will hopefully more questions.

    T.J.

  • How to add items to the list of object field

    I have an array of strings as shown below.

    String s [] = {'a', 'b', 'b', 'b', 'b', 'b', "a"};

    I want these elements in the field of the Objecat list with output picking up the elements of a String array.

    in other words, the ListField should only contains ' has 'and' b ' as list items

    How to add the elements of a String array to the listfiled without repeating the

    Chain of elements of the array.

    someone help me please...

    concerning

    use a vector as the data structure for the objectlistfield. Check contains() before adding the item in the vector.

  • problem of subject choice field

    Hi, you look at the choice of the last two items fields
    in the screenshot, I have the choice of subject field as you can see in the my first choice of object field is to have two options
    ON and OFF
    now, when I select the option OFF and I want to unfocusble my second choice of the object deposited DAILY in the photo update. and when I select i', able to focus my second choice of the deposited article from DAILY UPDATE

    Two options:

    (1) extend the second ObjectChoiceField to pick up a method setFocusable (Boolean flag) and set the type of a field of ChangeListener to the first ObjectChoiceField

    (2) extend the second ObjectChoiceField to check in his isFocusable(), the current value of the first ObjectChoiceField method.

  • First choice in ObjectChoiceField do not call FieldChangeListener.

    Hello everyone, I have a choice of object field to display a list of the cities. I gave the initial value for field as the first city in the list of cities. I put the changes for the field and hadling the event listener using fieldChanged().

    I use getSelectedIndex() to treat the choice more far. When I choose choice other than the first (0th position choice), it works fine. But when I choose the first, nothing happens. I debugged n saw that control comes not at all to the fieldChanged() method.

    My code is as below:

    mCityDropDown.setChangeListener (new FieldChangeListener() {}
                
    ' Public Sub fieldChanged (field field, int context) {}
                    
    if(Context == 0) {}
    return;
    }
    UiApplication.getUiApplication () .invokeLater (new Runnable() {}
                            
    public void run() {}
    Dialog.Inform ("Index:" + mCityDropDown.getSelectedIndex ());

    }
    });

    }

    });

    Can anyone tell if I am wrong somewhere n suggest me the solution. Thanks in advance.

    The default value of the change listener, it fires if something is changed.
    as the index is 0 before AND after there is no change.
    You must adapt your application logic to that.

  • the NTI in storage of persistence storage

    I have choice of object field and I store the index of the selected value in the persistent store but when I try to retrieve the value from persistent I'm classcastExccption

    String SELECTEDINDEXValue = Integer.toString(pickFont.getSelectedIndex());
    
                            storeindexvector.addElement(SELECTEDINDEXValue);
                            System.out.println("SELECTEDINDEXValue="+SELECTEDINDEXValue);
    
                            synchronized(fontIndexstore) {
                                try {
                                    fontIndexstore.setContents(SELECTEDINDEXValue);
                                    fontIndexstore.commit();
                                } catch (ControlledAccessException e) {
                                    // TODO Auto-generated catch block
                                    e.printStackTrace();
                                }
                            }
    

    and here, I got the content and putting classcastExccption

    second2222 = new Vector();
                synchronized(fontIndexstore) {
                    try {
                        if(second2222 == null){
                            System.out.println("--------------------nullllllllllllllllllll-------------------=");
                        }
                        second2222 = (Vector) fontIndexstore.getContents();
    
                        System.out.println("second2222 = "+second2222.size());
    
                        //System.out.println("---FONT STYLE----"+second2222.elementAt(0));
    
                    } catch (Exception e) {
                        // 0x4f61b274c07d41f1L
                        System.out.println("err="+e.toString());
                    }
                }
    

    you call setContent with a chain but cast the result of the getContents of a vector, it won't work.

  • delete the bitmap

    Hi guys,.

    (1) I have a little card field II to set the bitmap usingthis method

    imageField_2.setBitmap (image_2);

    Now when no bitmap is available I want to show an empty bitmap or not image

    mageField_2.setBitmap (null);

    but the problem is remains of previous bitmap even if I put this NULL bitmap. What should I do?

    (2) I added my screen choice of object field. The BB storm this choice of subject is not clickable. I want to say that I do not get a drop down list or 'Change option' in the menu. How ever I can change the options using the 'Space' of the virtual keyboard. What should do?

    ObjectChoiceField interValField = new ObjectChoiceField ('my domain',
    myStringArray, 0, ObjectChoiceField.USE_ALL_WIDTH
    );

    Many thanks for any help in this regard,

    Kind regards

    yosoh

    (1) usually, I remove the field to do this.  I suggest that you invalidate() on the ground after removing the Bitmap, then you would code:

    imageField_2.setBitmap (null);

    imageField_2.invalidate ();

    (2) do include (2).  Have you recompiled the application using JDE 4.7 or partners pack component?  You run in compatibility mode?  (Blue border with keyboard always show?)

  • ObjectChoiceField with label

    trying to line up a few grid controls.

    First column of the grid is rich text field that describs what information shows in the second column the grid and control is a control.

    Unfortunately, one of the control I want to use choice of object field. I have the null label / ""(empty string)

    Control of problem when he makes still has some space left and it is not aligned with the other control.

    http://PostImage.org/image/mfda9yumb/

    Requested help, pointers?

    There is a third party who make blackberry UI components?

    Here is the code I am using

    control = new ObjectChoiceField (null, choices, 0, Field.FIELD_LEFT |) USE_ALL_WIDTH);

    I also check what

    control = new ObjectChoiceField(null,choices,0,Field.FIELD_LEFT);

    Nothing seems to work, kind of weird!

    DrawStyle.LEFT cannot be used as constructor argument

    UPDATE: I've been playing around with this. It only happens when I place ObjectChoiceField inside the grid.

    So, while adding the ObjectChoiceField in the grid, added style to add it to the left

    Grid.Add (control, Field.FIELD_LEFT);

  • NumericChoiceField alignment in the GUI

    I can't move my numericChoiceFields anywhere, even though all my other fields will move where I want to go. Anyone know how I can do this? I'm just trying to focus.

    PS. I prefer to use NumericChoiceFields instead of ObjectChoiceField due to a large quantity of numbers.

    Thank you!

    Hello

    Try this code... .i have extended the choice of object field behaves as a numeric field and with style option

    package mypackage;

    Import net.rim.device.api.ui.component.ObjectChoiceField;

    SerializableAttribute public class CustomObjectChoiceField extends ObjectChoiceField {}

    public CustomObjectChoiceField (label As String, int i, int initialIndex, int j, long style) {}
    Super (label, new Object() {""}, initialIndex, style);
    initialValue int = i;
    objSize int = j + 1 - i;
    Object [] tmpChoice = new Object [objSize];

    for (int k = 0; k)
    tmpChoice [k] = Integer.toString (initialValue);
    initialValue = initialValue + 1;
    }
    this.setChoices (tmpChoice);
    }
    }

    Call to do such as:

    CustomObjectChoiceField chcFld = new CustomObjectChoiceField ("Test", 0, 10, 0, Field.FIELD_HCENTER);
    CustomObjectChoiceField chcFld1 = new CustomObjectChoiceField ("Test", 5, 100, 0, Field.FIELD_HCENTER);

    I hope this helps.

  • Problem with ObjectChoiceField

    Hi friends,

    I created a choice of object field and I try to load the values into this field of choice of object during execution. What I did, I used (setchoice) method to set a value to a time of execution. I can get the values of what I put in execution but the problem I m facing is, if we go after the last element in the choice of subject field it will be thanks to a special null pointer and his watch is not the first element of the array. Can U help pls how to overcome this problem and pls tell no matter what happens, the reason for this problem...

    Kind regards

    s.Kumaran.

    Ooops... It was a mistake to programming baisc. glad you figured it out. You can mark the thread as solved.

  • How can I customize the template of Contacts to include the fields of my choice?

    I have my contacts in an excel file and intend to import contacts into a CSV file. No problem. But Contacts model uses a lot of fields I don't need (such as Pager) and I see no way to customize more compared to what I need.  I want change, not the mapping of the fields to the options in the default template. In Contacts, in the view drop-down list, choose the folder to view the details. The selection becomes a column header and can be used as a filter. It seems to be more than 100 selections.  How to use these matach to a field in the Contact model? Example: 'Product name' is one of the details (column header) I choose, but there is no corresponding information in the Contact model, 'Product name' isn't one of the choices when mapping fields during import.

    Wrong forum.
    Ask here:
    http://answers.Microsoft.com/en-us/Office/Forum/Excel

  • I want to update the field of choice of option on the selection of another field of choice of option

    Hello...

    I want to update the field of choice of option on the selection of the value of the choice field another option.

    Thanks in advance

    Welcome on the support forums.

    use

    http://www.BlackBerry.com/developers/docs/6.0.0api/NET/rim/device/API/UI/component/ObjectChoiceField...

    to set the new choices in the field. It should update automatically, otherwise you could try to call invalidate.

  • How to get the values of the shape of the object in the form of process field?

    Hello

    I created the resource object and it has the shape of the object that are associated with him. When the user self praying for this user RO add information in the form object field ho can I get these values as a process?

    How to get the values of the shape of the object in the form of process field?

    Hello

    If you want to map the form field Number in the form of process field go process definition - Data Flow Mapping tab you can add the field map.

    Thank you
    Patricia

Maybe you are looking for

  • Indicating the time the caller to destination

    The latest version does not show the time in the time zone of your called party. How can I get that back as I speak constantly around the world and it's a great help to see what time of the day or night they are in relation to me.

  • The first graphing calculator HP will not update. Stuck at x 2 + y2 = 1

    I tried to update my brand-new first HP Calculator graphic using a version update of the HP connectivity Kit.  The update failed and the calculator will reset but not exceed x 2 + y2 = 1.  I tried to use the following manual method of a post on Educa

  • Satellite A60 - issue CPU upgrade

    Hi there people. I have upgraded memory on old enough computer a60 laptop my gf, but want to upgrade the processor as well now that she is running the celeron 2.8.The laptop manual says I can have the following processor: Intel celeron up to 2.8 ghz

  • Droid browser

    I personally found that Chrome Beta is one of the best browsers for Droid Turbo. Chrome regularly kept crashing and thus would be Firefox, as they would not allow you to zoom in. Beta chrome still has this problem, but it isn't on all Web sites.

  • E1500 and Motorola SB6141 cable modem

    I just got a new cable modem, Motorola SB6141 and when I connect the pc directly to the modem I get the blue light referring it works at high speed Gigabit Ethernet, but when I connect the E1500 light changes to amber which refers to just fast ethern