Change the default value for the field selection at run time

I would like to know how can I keep persistent information in Sib. My problem is I want to change the default value of the choice field when running so that when the user starts the application again, it can retrieve the new default value.

store values can be done using the persistence framework.
See Persistable, PersistantObject and PersistantStore in the API.

You can call setSelectedIndex on an objectchoicefield.

Tags: BlackBerry Developers

Similar Questions

  • Change the skin components at run time

    I have a button component that has a single image and a few color filters to change the colors for the different States and I need a way to change the image source when running according to some data. Is this possible? If not, I don't have to really do a custom just component to do this? Because that seems like way too much work for something so simple.

    This custom component that is "the way to a lot of work" probably would have taken much time to create as you spent to create this thread.

    package
    {
         import mx.binding.utils.BindingUtils;
    
         import spark.components.Button;
         import spark.components.Image;
    
         public class MyButton extends Button
         {
              public function MyButton()
              {
                   super();
              }
    
              [SkinPart]
              public var imageDisplay:Image;
    
              [Bindable]
              public var icon:Object;
    
              override protected function partAdded(partName:String, instance:Object):void
              {
                   super.partAdded(partName, instance);
    
                   if(instance == this.imageDisplay)
                   {
                        BindingUtils.bindProperty(this.imageDisplay, "source", this, "icon");
                   }
              }
         }
    }
    

    Now just assign 'imageDisplay' to the id of the image in your skin and your done.

    It wasn't so much work now, was it?

  • Setting the default value for a dynamic selection menu

    Hi I have a php with 2 forms to this topic page, you feed on the other to achieve a lock down (manufacturer > model). The menu then select I have a static default value 'Select a model aircraft', I want to set a value for the first menu select dynamic to read "select the manufacturer. When I add a static value to my list, it tells me I alreay have a dynamic behavior on this menu and choose another. I've included the code for two menus. Thank you in advance, I know it must be a stupid question, but it has left me speechless.

    Tom

    This is the menu that I want to add static value defaults to.

    < td width = "667" > < select name = "airMake" style = "" width: 200px; "" OnChange = "This.Form.Submit (); "id ="airMake">

    <? PHP

    {}

    ? >

    < option value = "<?" PHP echo $row_rsAirManufacturer ['aircraft_manufacturer']? > "<?" PHP if (!) strcmp () ($row_rsAirManufacturer ['aircraft_manufacturer'], ((isset($_POST["airMake"]))? $_POST ['airMake'] :""))) {echo "selected =-'selected\'" ;}?})) > > <? PHP echo $row_rsAirManufacturer ['aircraft_manufacturer']? > < / option >

    <? PHP

    } While ($row_rsAirManufacturer = mysql_fetch_assoc ($rsAirManufacturer));

    $rows = mysql_num_rows ($rsAirManufacturer);

    If ($rows > 0) {}

    mysql_data_seek ($rsAirManufacturer, 0);

    $row_rsAirManufacturer = mysql_fetch_assoc ($rsAirManufacturer);

    }

    ? >

    < / select >

    < table >

    < /tr >

    < / table > < / make >

    < do action = "quoteResult.php" method = "post" name = "quoteForm" > "

    < table width = "100%" border = "0" cellpadding = "5px" >

    < b >

    < td width = "260" style = "color: #000;" text-align: right; "> aircraft model: < table >

    < td colspan = "2" > < span id = "spryselect2" >

    This is the menu that works properly.

    < select name = "airModel" style = "" width: 200px; "id ="airModel">"

    < option value = "" <? " PHP if (!) () strcmp ("", ((isset($_POST["airMakeField"]))? ") $_POST ['airMakeField'] :""))) {echo "selected =-'selected\'" ;}?} > > < / option >

    <? PHP

    {}

    ? >

    < option value = "<?" PHP echo $row_rsAirModel ['aircraft_model']? > "<?" PHP if (!) strcmp () ($row_rsAirModel ['aircraft_model'], ((isset($_POST["airMakeField"]))? $_POST ['airMakeField'] :""))) {echo "selected =-'selected\'" ;}?})) > > <? PHP echo $row_rsAirModel ['aircraft_model']? > select a model airplane < / option >

    <? PHP

    } While ($row_rsAirModel = mysql_fetch_assoc ($rsAirModel));

    $rows = mysql_num_rows ($rsAirModel);

    If ($rows > 0) {}

    mysql_data_seek ($rsAirModel, 0);

    $row_rsAirModel = mysql_fetch_assoc ($rsAirModel);

    }

    ? >

    < / select >

    -Change

    So if the value of "airMake" is - 1, you know that no choice has been made.

  • A default value for a field in a table form, didn't get saved with line

    Hi people,

    I have a simple form on a table. A column, CUST_ID, must be filled when I create a branch to this form. So I change the element, set the source to 'Element (Application or page item name)' and then add the name of the source element. It works fine, the correct CUST_ID is entered in the CUST_ID field as expected. But when I add data to other fields and apply the changes, all data is saved on the line, except the CUST_ID. Am I missing simething simple here?

    Thank you very much

    -Adam vonNieda

    It's a slow Tuesday :)

    Return to the database and do not forget to enter the name of the field to the source value and specify the source used only when current value is Null to avoid that it be replaced by DML research.

    By default, enter PL/SQL Expression as type and: Field_Name (you load with). or you can also enter static text such as type and use & Field_Name. format instead, I think. Include the. After Field_Name.

  • How can I set a default value for a field from an LOV?

    The LOV are:

    Select txtName, ID
    of FAC_LK_PROJECT_PRIORITY
    order by 1

    I tried:
    Select the FAC_LK_PROJECT_PRIORITY priority code where txtname = "average";
    and set the type of default value to be the body of the PL/SQL function, but that did not work - I get this error:

    ORA-06550: line 2, column 1: PLS-00428: an INTO clause in this SELECT statement
    Error ERR-9131 in PLSQL function for default code point body, item = P19_PRIORITYID
    Ok

    The element is a list of selection w / db as the source column: PRIORITYID

    Assuming you want to provide a (default) value when the extraction process of line returns null for the element, a default value of body of the PL/SQL type function would be:

    declare l_id number := null;begin  for c1 in (select id from FAC_LK_PROJECT_PRIORITY priority where txtname = 'Medium') loop     l_id := c1.id;     exit;  end loop;  return l_id;end;
    

    Scott

  • Copy the default value from another field in the same page

    Hello

    I need to pass a value from one page to another page and I want to use this key as DEFAULT VALUE for a field.

    If I create a form tabular all it's ok, but if I create a normal page. I am not able to do that.

    1. 1. I call the page and I pass the value. I also have a FIELD of VIEW and I can see the correct value.
    2. 2. I create a field with attributes of this:
      1. a. source > Source = database column type
      2. b. sources > Source value or expression = FK_ID_DA (the column name)
      3. c. default > default = P27_PK_ID_DA (the field that contains the value)
    3. 3. on the screen, I see P27_PK_ID_DA and not the value

    Where is the error?

    Thank you very much

    TexasApexDeveloper wrote:

    You missed one: before the variable, without it, the default value is the string...

    Not sure that you can READ the other pages... Such that if you are on Page 27 and have a field that you want to use on page 30, page 27 is presented and its items in session state, you can 'see' on page 30.

    So, if you set the default value: P27_PK_ID_DA, then you should get by default, you are looking for...

    Only if the default value Type is set on the PL/SQL Expression. If the literal value "P27_PK_ID_DA" is seen then the Type of default value should currently be set static text with Substitutions of State of Session, in which case the value of session state must be referenced using the syntax of substitution string:

    &P27_PK_ID_DA.

  • How to add the default value for the "Full - Text Search" box

    Hi all

    I am looking for the ability to add a default value for the "Full text search" box in the search form.

    Example:

    When the user accesses the search page it get default values for some fields (defined in the rule as default values) such as

    xField1 = txt1 and xFiel2 = txt2.

    and Furthermore we need full-text = Hello world.

    Is this possible?

    Another way that we use is to open the search by URL with coreContentOnly = 1 as a form:

    http:// < Server >/cs/idcplg? IdcService = GET_DOC_PAGE & to Action = GetTemplatePage & to Page = STANDARD_QUERY_PAGE & coreContentOnly = 1 & to xField1 = txt1 & to xFiel2 = txt2

    It is possible to add full-text criteria here? Somethig like: & text = Hello World

    Thank you

    Leon

    It is not possible in a very obvious way, not to mention that it is a rather strange request.  I can't really imagine a realistic use for this case.

    Anyway, without a messy customization, you should provide a default query with an FTX inside element text setting (i.e. "IdcService = GET_DOC_PAGE & Action = GetTemplatePage & Page = STANDARD_QUERY_PAGE & QueryText =Hello World" "")

    To do this in a profile in the secondary effects of the profile section, add the following:

    <$dpPromote("QueryText",>Hello everyone") $>.

  • Syntax to set a default value for the metadata of Web site field

    In my profile, I have a rule where I did the infoOnly metadata xWebSites field and define a default value like this:

    < $dprDefaultValue = # active.xWebSites$ >

    Y at - it something I am doing wrong? Incorrect syntax?

    Thank you!!

    I found this in the documentation of the Site Studio:

    "To identify the ID of an article or a website, open the page to check content on the content server and click Browse next to the"Section of the Web Site." In the window choose the Web Site Section, select your Web site and notice the ID in brackets next to each section (Figure). »

    Can I set the default value for the ID?

  • Default value for the select list of type of form elements

    Hello

    I do not work with Apex that mutch, so this may be a simple question... but I still need help.
    I have a form, in this form, I have a question P19_ONTVANGER_ID, this is based on a LOV.
    This LOV is on a table that has a field of username with the value of APP_USER.
    The table looks like:
    ONTVANGER_ID this is the PK and is going to be the return value from the LOV.
    NAME is the display value for the LOV.
    USERID is the column APP_USER.

    What users would like to get is that if they create a new record, the default value for the P19_ONTVANGER_ID field is their own ONTVANGER_ID.
    But they must also be able to select another user.

    hope there is someone out there that can and will help me.

    Kind regards

    Rob

    APEX 4.0.2 Oracle 10

    Rob-v-M-Gn-Nl wrote:
    Until now, I had, but I need to select the value of the id of the table and the list of selection item appears the corresponding value.

    How can I do this?

    You can select the Type of default value as the body of the PL/SQL function

    and to add something like that

    declare
    v_return number;
    begin
      select your_id
        into v_return
      from your_table
      where some_column = :APP_USER;
     return v_return;
    exception when no_data_found then
     return null;
    end;
    

    http://www.asktheoracle.NET/PLSQL-function.html

  • Want to change the WordPad default values for font size and line spacing

    I use WordPad quite heavily because it is simple and fast.  But the new version of W - 7 seems to not allow you to change the default values for the font, size and line spacing.  The default values are not suitable for a large part of what I do and I'd like to find a way of quickly and easily, either make the changes permanent or change this to open with a single click of mouse or at most two.  Any suggestions?

    It is the "best" solution to workaround.  After you change your Default.rtf custom, simply move it to your system32 directory and add the "Default.rtf" at the end of the location of your target on the property sheet for your file WordPad.exe.

    Every time that you open its default location in the directory c:\program files\windows NT\Accessoires WordPad.exe, it defaults to now your Default.rtf custom.

  • Web site created by Muse. The greats until tweek of today. Web site insists now for open index.html in the tablet. Don't know how product, nor how to change the default value for pc of office/index.html. Would advise. Bob

    Web site created by Muse. The greats until tweek of today. Web site insists now for open index.html in the tablet. Don't know how product, nor how to change the default value for pc of office/index.html. Would advise. Bob

    Hi Bob

    I think that you have found the solution but if still you are facing the question, please give me the url of the site that opens another provision in the tablet.

    Please make sure desktop redirection is checked in the site properties page layout.

    Thank you

    Sanjit

  • How to select the default value for a choice of selection when page.jsff load

    Hello everyone, I am newbie have little problem

    I have problem with soc (selectOneChoice)
    in this case I ' to select the default value of af: SelectOneChoice (select first selectItem) when the page is finished loading

    < af:selectOneChoice label = "" Jenny Bahan: "id = 'soc1'"
    autoSubmit = 'true '.
    valueChangeListener = "#{WHStockSetReleaseBean.cekJenisBahan} '"
    Binding = "#{WHStockSetReleaseBean.v_jenisBahan}" >
    * < af:selectItem label = "GBB" value = "GBB" id = "si2" / > * = > i'want to select this value for the default (select first selectItem)
    < af:selectItem label = "GBP" value = "GBP" id = "si1" / >
    < / af:selectOneChoice >

    If someone help me to solve this problem

    THX
    agungdmt

    Hello

    try to set the attribute value to af:selectOneChoice like that.

    
    

    Kind regards
    Sicard.

  • Change the default value for mapping settings?

    Hello world

    I have a question belonging to the configuration of mappings in OWB.

    When I create a map and place (for example) a scoreboard operator, in the mapping language ist configuration is automatically set to "PL/SQL" and there are also parameters of execution as "maximum number of errors. By default, the value for this setting is 50.

    Is it possible to change this default value to 0? So that each new PL/SQL-mapping I have create a a "maximum number of errors = 0".

    Thank you
    Stefan

    Hello

    For now, the only options are as suggests really, apart from the repository of piracy. In version 11 GR 2, there is a new object to do precisely this kind of things, you can create a configuration template. The model can set the values you want as default values.

    See you soon
    David

  • BlackBerry Z10 well defined, I can't get the phone to ring and vibrate as the default value for all calls. I can put individual contacts, but I want to ring and vibrate for all.

    Although the value, I can not phone ring and vibrate as the default value for all calls. I can put individual to vibrate and ring contacts and it works but I want as the default for all incoming calls. Any help would be appreciated, thanks

    Sorry, I found the answer in the manual

    "Change your ringtone, sounds or alerts.

    GoTo settings\notifications to the bottom of the screen select application\phone

    You can activate vibrate out there, put the ringer default etc.

  • The default value for a property with data of type boolean

    Hi all

    Is it a system preference setting, where the default value for a property with data of type boolean can be a Virgin? I want to keep the value by default in a vacuum, but every time I save the property even after empty selection, the default value changes to FALSE.

    Capture.JPG

    In this case Boolean doesn't help you, you mayneed to create a chain of ownership and have true/false / "" as your list of values

Maybe you are looking for

  • Double open new tab option

    I'll be back to a parent, who also use the FF. Much to my amazement, it has as well an icon in the menu bar "open new tab" and tab "+" in the tab bar, while I can only drag from one to the other, but it seems not be kind to have both options. It is n

  • My hard drive crashed. Can I replace it and reload my XP Pro disc to a hard drive nine?

    My hard drive crashed.  Can I use my Windows XP installation with my same motherboard disc and a new hard drive?

  • "the igxprd32 display driver has stopped working normally please restart your computer" on intel gma 3150

    "the igxprd32 display driver has stopped working normally please restart your computer" on intel gma 3150, especially when I run 3d games or install Skype 5 and start on this video than the above message appears please advise solution and oblidge. Th

  • Photosmart C4385

    Hello I'm about to get rid of a Photosmart C4385 Printer.  I heard that some printers have internal hard drives that can store information that has been printed, and if the printer is in the wrong hands, it could be in serious trouble.  I was wonderi

  • (Redirected) Why not split the order?

    I have a Dell coming 8 Pro and Dell Inspiron 14 ''. I ordered the Dell keyboard and folio combo and a dell for laptop carrying pouch. According to the website of command, expected delivery is one month! It is 5/9 and waits for 6/12. To continue the r