How to set selection in UIPickerView after view has loaded?

I have a UIPickerView working just fine, and I can set the current selection when a button is clicked, but how can I set the current selection when the view appears?
I've tried to set the selection in viewDidLoad, viewDidAppear and viewWillAppear to no avail, I've also tried to do it in initWithNibName. Again no joy.
As far as I can tell, the sequence of events is that my nib gets loaded by the view, my UIPickerViewDelegate interface methods are called to configure the picker, but what message can I pick up after all that has occured to set the selection?

Hey Paul-
I use this in one of my apps and it works great. Once the view loads, the picker gets set to the value I want with a nice animation. Let's say you want to set it to row 3.
- (void)viewWillAppear:(BOOL)animated {
[myPicker selectRow:3 inComponent:0 animated:YES];
Of note: If you have the function - (void)viewWillAppear without the :(BOOL)animated part, it won't throw an error on compile, nor will it get called. Yes, I learned that firsthand.
Hope this is what you are looking for.

Similar Messages

  • Selecting a row after dataset has loaded

    I have a situatioin where my server side logic supplies logic
    to provide a possition in the XML to be selected.
    EG:
    <script>
    var dsImages = new
    Spry.Data.XMLDataSet("/gallery.xml","/images/image");
    </script>
    and the server supplys a variable to say that "image 12 is
    selected"
    inline doesn't work as I guess the Javascript is firing
    before the dataset is loaded:
    EG:
    <script>
    var dsImages = new
    Spry.Data.XMLDataSet("/gallery.xml","/images/image");
    dsImages.setCurrentRow(12);
    </script>
    so I want to be able to fire a callback(?) function once the
    dataset is loaded
    Is this possible? or is there another solution do achive this
    someone know of?

    I found the answer in the previous post to this. (
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=602&threadid =1251912&enterthread=y)
    Observers!

  • How to set filters to a Result view

    Hi All,
       How to set filters to a result view in web UI.
    Thanks & Regards
    Nitish.

    Hi Nitish Kumar,
    if you want to sort the table fields like ascending , Descending create one event ex: eh_on_sorting.
    in that get the event using thtmlb_event. then check whether sorting is necessary or not.
    then get the name of column to be sort by using tableview->column_key.
    based on that arrange the field ascending or descending using tableview->column_sort_directin.
    ascending or descending.
    then sort the collection using collection_wrappor->sort( lv_attrname .. etc).
    here is the sample code..
    data: lv_bo               type ref to if_bol_bo_property_access,
             lv_thtmlb_tableview type ref to cl_thtmlb_table_view,
             lv_attr_name        type name_komp,
             lv_sort_order       type char1,
             lv_stable           type abap_bool value abap_false.
       try.
           lv_thtmlb_tableview ?= iv_htmlb_event_ex.
         catch cx_sy_move_cast_error.
           exit.
       endtry.
       if lv_thtmlb_tableview is bound.
    *   check whether its realy a sorting event
         check lv_thtmlb_tableview->event_type = cl_thtmlb_table_view=>co_header_click.
    *   get name of column to be sorted
         lv_attr_name  = lv_thtmlb_tableview->column_key.
         check lv_attr_name is not initial.
    *   get sorting direction
         case lv_thtmlb_tableview->column_sort_direction.
           when 'U'.
             lv_sort_order = cl_bsp_wd_collection_wrapper=>sort_ascending.
           when 'D'.
             lv_sort_order = cl_bsp_wd_collection_wrapper=>sort_descending.
           when others.
             return.
         endcase.
    *   sort
         try.
             me->collection_wrapper->sort( iv_attr_name     = lv_attr_name
                                           iv_sort_order    = lv_sort_order
                                           iv_stable        = lv_stable
    *                                  IV_SORT_CALLBACK =
           catch cx_crm_cic_parameter_error.
    *     could be a renamed attribute or field which does not belong to the collection
         endtry.
    *   in case of single selection restore the selected row index
         if   me->selection_mode = selmode_single
           or me->selection_mode = selmode_lineedit.
           if me->selected_index <> '0'.
             me->selected_index = me->collection_wrapper->get_current_index( ).
           endif.
         endif.
       else.
         exit.
       endif.
    Thanks & Regards,
    Srinivask

  • How can I select a date to view in Calendar while I am in month view?

    I am looking at month view in Calendar on my iPad. I touch a date. Intuitively, I expect that date to open up in Day or Week view, but it doesn't! On my iphone, it works just fine. Am I missing something?
    How can I select a date to view while in Month view and have it go to Day or Week view?
    Thanks for any help.

    I would try this:
    In Lr import one photo into a different folder that you can see in the list.
    Then in your OS (mac Finder / Win Explorer) move the photo to the folder that you cannot see.
    In Lr the photo will now appear with a question mark on its frame. Click directly on the question mark and select <Locate photo>. Navigate to the folder, open it, and click on the photo.
    Maybe this will help Lr to recognize the folder.
    If this doesn't help try renaming the folder in your OS.

  • How to set Where clause in the View Object of the MessageChoice ?

    Hi,
    How to set Where clause in the View Object of the
    MessageChoice ?
    Example:
    <bc4j:rootAppModuleDef name="EdEscolaCampusView1AppModule"
    definition="ed00050.Ed00050Module"
    releaseMode="stateful" >
    <bc4j:viewObjectDef name="EdEscolaCampusView1" >
    <bc4j:rowDef name="CreateEdEscolaCampusView1" autoCreate="true" >
    <bc4j:propertyKey name="key" />
    </bc4j:rowDef>
    </bc4j:viewObjectDef>
    <bc4j:viewObjectDef name="ListaTipLocalView1"
    rangeSize="9999">
    </bc4j:viewObjectDef>
    </bc4j:rootAppModuleDef>
    </bc4j:registryDef>
    messageChoice declaration:
    <bc4j:messageChoice name="SeqTipoLocalCampus"
    attrName="SeqTipoLocalCampus"
    prompt="Local do Campus">
    <contents>
    <bc4j:optionList attrName="SeqTipoBasico"
    textAttrName="NomTipoBasico"
    voName="ListaTipLocalView1"/>
    </contents>
    </bc4j:messageChoice>
    I would like set where clause of ViewObject, with dinamic parameters (using attribute1 = :1), before populate messageChoice.
    thanks...
    Danilo

    Hi Andy,
    I try set a where clause using the message:
    Set where Clause parameter using UIX , but my UIX Page have 2 messageChoice's of different ViewObject's, then I need implement this Java Class:
    //Nome da Package da Tela Detail
    package br.com.siadem.siaed.ed00050;
    // Importa as Bibliotecas necessárias
    import oracle.jbo.ViewObject;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.client.Configuration;
    import oracle.cabo.servlet.BajaContext;
    import oracle.cabo.servlet.Page;
    import oracle.cabo.servlet.event.PageEvent;
    import oracle.cabo.servlet.event.EventResult;
    import oracle.cabo.data.jbo.servlet.bind.*;
    import oracle.cabo.ui.data.BoundValue;
    import oracle.cabo.ui.data.DataBoundValue;
    import javax.servlet.http.HttpServletRequest;
    import br.com.siadem.siaed.util.*;
    import javax.servlet.http.Cookie;
    import oracle.cabo.data.jbo.def.NestedAppModuleDef;
    import oracle.cabo.data.jbo.def.ViewObjectDef;
    import oracle.cabo.data.jbo.def.AppModuleDef;
    // Classe que configura os parametros para a execução da Query,
    // utilizando variáveis de Sessao
    public class FunPreQueryLista
    public static EventResult FunConfiguraQuery(BajaContext context, Page page, PageEvent event) throws Throwable
    // TrataDadosSessao - Classe utilizada para retornar os valores das variáveis de sessão genéricas
    // Ex: CodCliente, CodMunicipio etc...
    TrataDadosSessao varDadosSessao = new TrataDadosSessao();
    // 1o. Parametro Configurado - Através da classe TrataDadosSessao, utilizando um método Get
    // <alterar>
    String valor1 = varDadosSessao.getCodCliente();
    String valor2 = varDadosSessao.getCodMunicipio();
    //Cria o objeto que retorna o ApplicationModule
    ApplicationModule am = ServletBindingUtils.getApplicationModule(context);
    // Início das Configurações da Query da Lista
    //Cria o objeto que retorna o view object da lista desejada
    //alterar
    ViewObject TipoLocal = am.findViewObject("ListaTipoLocalView1");
    //Configuração dos parametros definidos na query do view Object
    //alterar
    TipoLocal.setWhereClauseParam(0,valor1);
    TipoLocal.setWhereClauseParam(1,valor2);
    // Executa a Query
    TipoLocal.executeQuery();
    // Fim das Configurações da Query da Lista
    // Início das Configurações da Query da Lista
    //Cria o objeto que retorna o view object da lista desejada
    //alterar
    ViewObject TipoDestLixo = am.findViewObject("ListaDestinoLixoView1");
    //Configuração dos parametros definidos na query do view Object
    //alterar
    TipoDestLixo.setWhereClauseParam(0,valor1);
    TipoDestLixo.setWhereClauseParam(1,valor2);
    // Executa a Query
    TipoDestLixo.executeQuery();
    // Fim das Configurações da Query da Lista
    // Retorna o Resultado para a Página
    return new EventResult(page);
    The code works very well...
    And, I'm sorry for my two repost's in UIX Forum about this in a few time.
    Thank very much...
    Danilo

  • How to set selected radioButton

    Hi,
    There are tons of examples on the websites to show you how to detect selected radioButton or click event. But It is not easy to find aone example to show you how to set selected radioButton.
    Here is my code, but not working, Is it not well handle on it for Flex?
    [Bindable]       
    private var selectedRadioButton:RadioButton;
    private function initSelect(): void {
            selectedRadioButton = rb1;
    <mx:RadioButtonGroup id="rbg" selection="{selectedRadioButton}"
                       change="rbg_change(event);" />
                    <mx:HBox>
                  <mx:RadioButton id="rb1"
                          label="Active" group="{rbg}" />
                  <mx:RadioButton id="rb2"
                          label="Lock" group="{rbg}" />
    </mx:HBox>
    Thanks

    it's simple set its selected property true. For instance
    myRadioButtonSelectedOnStart.selected="true"
    Sincerely,
    Michael
    El 14/05/2009, a las 10:32, "master.card" <[email protected]> escribió:
    >
    Hi,
    >
    There are tons of examples on the websites to show you how to detect 
    selected radioButton or click event. But It is not easy to find aone 
    example to show you how to set selected radioButton.
    >
    Here is my code, but not working, Is it not well handle on it for 
    Flex?
    >
    private var selectedRadioButton:RadioButton;
    private function initSelect(): void {
            selectedRadioButton = rb1;
    <mx:RadioButtonGroup id="rbg" selection=""
                       change="rbg_change(event);" />
                    <mx:HBox>
                  <mx:RadioButton id="rb1"
                          label="Active" group="" />
    >               <mx:RadioButton id="rb2"
    >                       label="Lock" group="" />
    </mx:HBox>
    >
    >
    >
    Thanks
    >

  • How to set capital letter automatically after enter.. during email

    how to set capital letter automatically after enter.. during email
    as it defaults to lower case all the time..  just like above
    However would like to know how to change so its like the H in the word However automaticlly
    thanks.

    thanks.
    i tried this..
    in transformations the three options are in ghost txt.. not bold.
    tried them all.. and no change..

  • How to set-up a Timestamp for BI Delta Load in 0CLM_INVOICE datasrc at R/3?

    Hi Experts,
    Kindly let me know How to set-up a Timestamp for BI delta load at R/3 for the Data source 0CLM_INVOICE ?
    Since the Timestamp for Upload of BI Delta is " . . : : ", we are not getting any delta value to BW.
    I would like to know in where we need to maintain the DATE & TIME to fix the above problem.
    Thanks.
    Regards,
    Jayaprakash J

    Dear Jayprakash,
    Chech the below links, it may help you in your case :
    Re: 0FI_AA_11 Delta load failure
    http://wiki.sdn.sap.com/wiki/display/BI/GeneralErrorIn+BI
    Actaully you need not have to maintain the timestamp. Just try to replicate your datasource and the try to load the delta again.
    Hopefully it will work.
    Regards,
    Rahul
    Edited by: Rahul on Dec 10, 2010 10:23 AM

  • How do i select the "submit" after i enter my wireless passwork on the tv screen for apple tv setup?

    how do i select the "submit" from the remote after i enter my wireless password on the tv screen for apple tv set up?

    The 5 digit code is every time different. That does not matter. Just integrate every device into your network.
    You can connect many computers to Apple TV but syncronisation works exactly with one computer. That's why I use "streaming". But you can sync one computer, then another, and so on. The content on your Apple TV is the content from your computer that has synced last. But you can not mix it.
    The new Apple TV has no syncronisation. Everything is streamed,
    Regards,
    Torsten,
    Germany

  • How to set selected Language from Portal dropdown in Logon to User profile

    Hi Gurus,
    I select a language in Portal Language dropdown in the Logon Page.
    After login in the content is getting displayed in the browser language.
    I want the portal content to be displayed in the selected language in the portal LogonPage.
    I checked the thread Logon page change to add a dropdown for language
    The is the requirement for me too .
    Kindly suggest me on how to set the language in the Portal user Profile so that the portal contents gets displayed in the selected languages from the dropdown .
    Thanks in Advance

    Hi Prasanna,
    The language that the portal is displayed in depends on the following
    heirarchy, with the languages at the top of the list taking precedence
    over those at the bottom:
    1. Component (iview) language (defined in the portalapp.xml)
    2. Portal Mandatory language (defined in the prtDefault.properties)
    3. User language (defined in the user#s profile).
    4. Request language (defined by the browser).
    5. Portal Default language (defined in the prtDefault.properties)
    6. System Default language (default locale defined by the OS).
    So for example, if you have your portal user language (as in point 3)
    set to Russian, but the language of the iView that is the logon page
    (as in point 1) set to English, that logon page will be displayed in
    English.
    Keeping the above in mind, please make the necessary changes to the
    configurations and check if it helps.
    Regards,
    Sowmya
    Edited by: Sowmya K on Jun 2, 2011 11:32 AM

  • How to set selected file in FileChooser showSaveDialog to default file name

    Hi,
    How do I set selected file in JavaFX 2.0 FileChooser showSaveDialog, so I can prompt the user with a suggested default file name?
    I am converting a Java Swing application I wrote a few years ago to JavaFX 2.0.
    In the Swing application, I use setSelectedFile() as follows:
    JFileChooser jFileChooser = new JFileChooser();
    jFileChooser.setSelectedFile(new File(backupfile));
    jFileChooser.setCurrentDirectory(new File(outputDirectory));
    FileFilter filter = new FileNameExtensionFilter("Comma Delimited (*.csv)", "csv");
    jFileChooser.addChoosableFileFilter(filter);
    jFileChooser.setFileFilter(filter);
    filter = new FileNameExtensionFilter("XML Document (*.xml)", "xml");
    jFileChooser.addChoosableFileFilter(filter);
    jFileChooser.setAcceptAllFileFilterUsed(false);
    jFileChooser.setDialogTitle("Export File");
    int returnVal = jFileChooser.showDialog(jFrame, "Export");
    This would show a file chooser with the file name text field pre-populated with a default backup file name.
    I can't find an equivalent in JavaFX.
    Also, in the Swing application, I was able to determine which extension filter was selected at run time using getFileFilter().getDescription() as follows:
    String extension = jFileChooser.getFileFilter().getDescription();
    if (extension.equals("XML Document (*.xml)")) { ...
    I can't find an equivalent in JavaFX.
    Thanks,
    Barry

    You can use the open sequence file method on the application manager (then you only need to wire the file path)
    Rodéric L
    Certified LabVIEW Architect

  • How-to set the title of  a View

    Hi,
    I'm a very newbie of Obj-C and InterfaceBuilder.
    From three days I'm fighting with my iPhone app to set the title of a view.
    I've the MainWindow.xib with a UITabBarController; each tabbar's viewcontroller is on a separate xib (i.e.: the GUI of every button of the tabbar is on a different xib file).
    In IB I set up the top bar property to Translucente etc... In Xcode, in the viewDidLoad I set the self.title to something... but the top bar is never shown!!
    I also tried to set self.navigationItem.title... but nothing...
    To see the top bar do I have to use a NavigationController inside every "button" of the tab bar?? Or is the top bar property of IB not working??
    Thanks to all...

    Wenwen,
    View Function dropdown "standard view" is just making the ALV to display the ALV standard configuration (so it will display the ALV the way is designed).
    now if you want to change that to your OWN VIEW you just need to click in the SETTINGS (ALV TOOLBAR at the right end) and then configure your ALV the way you want to be display. After that click SAVE AS and you can name the VIEW to your own and also you can click INITIAL VIEW checkbox in order to display always that for youl.
    Please note that this is a user base personification so this will be only available for you.
    if you want to have your own view for every user then you need to enhanced the ALV in a POST-EXIT method and do not allowed user personification.
    you can disable user personification at the application level in the parameters tab.
    hope this help!
    Jason PV

  • How to set selection screen

    I have a question that ...
    i have 2 options --
    when select 1st option , show group1 screen
    when select 2nd option, show group2 screen
    like the follow ..which is pretty work!....but i have another question that how to set the screen field ..
    my question is that if i select group1 screen...i want to set
    if S1_EBELN = '' and S1_IHREZ = ''.
        message e398 with 'pls input one of these two options!'.
      elseif S1_EBELN ne '' and S1_IHREZ ne ''.
        message e398 with 'Only one of these two options input is allowed&#65281;'.
      endif.
    i've tried to insert these statement within the LOOP...but not work ......
    so can anyone know how to set?
    PARAMETERS:
    R1 RADIOBUTTON GROUP OPT1 USER-COMMAND R DEFAULT 'X'.
    PARAMETERS:
    R2 RADIOBUTTON GROUP OPT1.
    SELECTION-SCREEN BEGIN OF BLOCK RPT1 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS: S1_BUKRS FOR EKKO-BUKRS MODIF ID ABC. 
    SELECT-OPTIONS: S1_EBELN FOR EKKO-EBELN MODIF ID ABC . 
    SELECT-OPTIONS: S1_IHREZ FOR EKKO-IHREZ MODIF ID ABC .  
    SELECTION-SCREEN END OF BLOCK RPT1.
    SELECTION-SCREEN BEGIN OF BLOCK RPT2 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS:  S2_BUKRS FOR EKKO-BUKRS MODIF ID DEF.
    SELECT-OPTIONS: S2_MBLNR FOR MKPF-MBLNR MODIF ID DEF.   
    SELECT-OPTIONS: S2_XBLNR FOR MKPF-XBLNR MODIF ID DEF .   
    SELECTION-SCREEN END OF BLOCK RPT2.
    IF R1 = 'X'.
        LOOP AT SCREEN.
          IF screen-group1 = 'DEF'.
            screen-input = '1'.
            SCREEN-required = '1'.
            SCREEN-INVISIBLE = '1'.
            screen-input = '0'.
            screen-output = '1'.
            screen-active = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
    ELSEIF R2 = 'X'.
        LOOP AT SCREEN.
          IF screen-group1 = 'ABC' .
            screen-active = '0'.
            screen-input = '0'.
            screen-output = '1'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.

    Modified ur code .
    tables : ekko, mkpf.
    PARAMETERS : R1 RADIOBUTTON GROUP RG USER-COMMAND R DEFAULT 'X'.
    PARAMETERS : R2 RADIOBUTTON GROUP RG .
    SELECTION-SCREEN BEGIN OF BLOCK RPT1 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS: S1_BUKRS FOR EKKO-BUKRS MODIF ID ABC.
    SELECT-OPTIONS: S1_EBELN FOR EKKO-EBELN MODIF ID ABC .
    SELECT-OPTIONS: S1_IHREZ FOR EKKO-IHREZ MODIF ID ABC .
    SELECTION-SCREEN END OF BLOCK RPT1.
    SELECTION-SCREEN BEGIN OF BLOCK RPT2 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS: S2_BUKRS FOR EKKO-BUKRS MODIF ID DEF.
    SELECT-OPTIONS: S2_MBLNR FOR MKPF-MBLNR MODIF ID DEF.
    SELECT-OPTIONS: S2_XBLNR FOR MKPF-XBLNR MODIF ID DEF .
    SELECTION-SCREEN END OF BLOCK RPT2.
    at selection-screen output.
    IF R1 = 'X'.
    LOOP AT SCREEN.
    IF screen-group1 = 'DEF' .
    screen-active = '0'.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ENDIF.
    IF R2 = 'X'.
    LOOP AT SCREEN.
    IF screen-group1 = 'ABC' .
    screen-active = '0'.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ENDIF.
    at selection-screen .
    if r1 = 'X'.
    if s1_ebeln[] is initial and s1_ihrez[] is initial..
    message e001(zxx) with 'pls input one of these two options!'.
    endif.
    if NOT s1_ebeln[] IS initial.
    IF NOT s1_ihrez[] IS INITIAL.
    message e001(zxx) with 'only one entry in Ebeln or Ihrez is
    allowed'.
    ENDIF.
    ENDIF.
    endif.
    START-OF-SELECTION.
    WRITE:/ 'hi'.
    ***add on
    split the text into two texts .
    <b>if NOT s1_ebeln[] IS initial.
    IF NOT s1_ihrez[] IS INITIAL.
    message e001(zxx) with text-001 text-002.
    *'only one entry in Ebeln   = text-001
    or Ihrez is allowed'.       = text-002.</b> 
    regards,
    vijay

  • How to set page break for Narrative view???

    Hi All,
    I have created a report in Narrative view using HTML code. I am stuck how to set page break based on a column in Narrative view. If anybody is aware of the issue pls let me know how to overcome this situation. Or if this can be done using HTML code itself pls let me know how to do it.
    Thanks & Regards
    Thenmozhi

    Hi Honey,
    I am not sure on ur requirement but you can achieve page break with a column using pivot view by dragging that column into section area and editing section properties to Insert Page break option.

  • How to set selected all checkboxes in all dataTable's rows?

    Hi there,
    I'm trying to perform this simple task: having a dataTable with a column containing checkboxes, how can I allow (with a button, a "super" checkbox or so) to simultaneously set selected all checkboxes in all rows?
    And - is it possible to do so without calling the submit of the page?
    Thanks to everyone!

    Yes, the paging for <h:dataTable> works pretty good, it manages the task through four methods created in the java code -- DataTable1_firstPageAction(), DataTable1_previousPageAction(), DataTable1_nextPageAction(), DataTable1_lastPageAction() -- without adding any javascript in the jsp page.
    Maybe I could test if a java script similar to the <ui:table>'s one fit also the dataTable...
    thanks

Maybe you are looking for

  • Maximum number of allowed pages in Pivot Table exceeded Configured Limit:

    When trying to create Calculated Item on Pivot table Page section Item like Division dim the calculated item is 'All' -> sum * and Customer again the calculated item is 'All -> sum * . it performs the first calculation (for division) but in the next

  • Deleting BBM contact

    Hello everyone.. I have a problem with my BBM. When I trying to delete a BBM contact, It can't be removed. It's happen only in 1 contact. When I try to delete another contact, it's successful.. I have tried to reboot my BB and it doesn't work.. What

  • Pictures are not shown when saving to PDF.  Cannot Preview Print Job.

    Help! Pictures are not shown when saving to PDF.  Cannot Preview Print Job.

  • Acrobat 7 wont pdf from IE8

    Hi I am trying to PDF online reports from Internet Explorer 8. Adobe acrobat starts the PDF then sort of hangs. There is no error message. On checking the print job I find the status as error. it works fine when using firefox but the reports dont wor

  • Flash to PDF ?

    I saw a PDF recently that looked like Flash. It had working buttons for viewing different screens and printing, etc. How can I do that. I have Flash 8. I found the link below but am not sure if I'm on the right track. Can somebody please help me. I w