Fill dropdownlist

hi:
in crm icwc 5.0 i have created my bsp application and copied the BuPaSearchB2B view, so the requirement is thah i have to add a dropdownlist and fill it with the following values,
'1', 'Titular'
'2', 'Compareciente'
son when it triggers an event depending on the selection, my problem is that i'm new in icwc so i don't know how to fill the dropdownlist with those values, so does anyone can give me a little example on this, or how to do it.
Thanks & regards

Here is the code. I modifed & tested. It works fine now.
<%@page language="abap" %>
<%@extension name="htmlb" prefix="crmic" %>
<crmic:content design="design2003" >
  <crmic:page title=" " >
    <crmic:form>
      <%
  DATA:
  selection  TYPE STRING,
  contactInfoType type string.
  data:i_formfields       TYPE tihttpnvp,
  wa_formfields      TYPE ihttpnvp.
  CALL METHOD request->get_form_fields
  CHANGING
  fields = i_formfields.
  READ TABLE i_formfields INTO wa_formfields WITH KEY name = 'contactinfotype'.
  contactInfoType = wa_formfields-value.
      %>
      <crmic:gridLayout id          = "mygrid"
                        rowSize     = "2"
                        columnSize  = "6"
                        cellSpacing = "1"
                        cellPadding = "1" >
        <crmic:gridLayoutCell columnIndex = "4"
                              rowIndex    = "1"
                              colSpan     = "3" >
          <crmic:dropdownListBox id        = "contactInfoType"
                                 selection = "<%= contactInfoType %>"
                                 onSelect  = "mySelectHandler" >
            <crmic:listBoxItem key   = "1"
                               value = "Titular" />
            <crmic:listBoxItem key   = "2"
                               value = "Compareciente" />
          </crmic:dropdownListBox>
        </crmic:gridLayoutCell>
        <%
  if contactInfoType = '1'. " titular
        %>
        <crmic:gridLayoutCell columnIndex = "1"
                              rowIndex    = "2"
                              colSpan     = "3" >
          <crmic:label design = "label"
                       for    = " "
                       text   = "Titular" />
        </crmic:gridLayoutCell>
        <%
  else.
        %>
        <crmic:gridLayoutCell columnIndex = "1"
                              rowIndex    = "2"
                              colSpan     = "3" >
          <crmic:label design = "label"
                       for    = " "
                       text   = "Compareciente" />
        </crmic:gridLayoutCell>
        <%
  endif.
        %>
      </crmic:gridLayout>
    </crmic:form>
  </crmic:page>
</crmic:content>
Let me know if you have an issue.
Raja T
Message was edited by:
        Raja T

Similar Messages

  • Dropdownlist dependency

    I need to make a series of dropdownlist, each one depend on the previous list selection.
    How can I fill dropdownlist values dynamically, by database (excel, access,xml) file??
    thanks in advance

    Did you ever receive a reply to this question?  I have exactly the same need ... a simple (non-elegant) way of dynamically populating a drop-down list based on the selection in a previous drop-down.  I'm a newbie to LiveCycle Designer and XML file creation, so would appreciate an example or complete description.  Thanks!

  • How do I get a web part to display items from a dropdownlist?

    I have a DropDownList that am filling with items from a list. The part of my code that am using to read the list and populating the drop down works just fine. I am now trying to figure out how to display the contents of the drop down on a web part. I know
    it sounds like a straight forward and easy thing to figure out, but I have blanked out. Does anyone have a snippet I can take a look at? This is how I am currently reading from a list to create the drop down...
    protected override void CreateChildControls()
    string title = string.Empty;
    EditorChoices = new DropDownList();
    string siteUrl = "mySite";
    using (SPSite site = new SPSite(siteUrl))
    SPWeb web = site.RootWeb;
    SPList list = web.Lists["testList"];
    SPQuery testQuery = new SPQuery();
    testQuery.Query = "<Query><Where><Geq><FieldRef Name='Title'/>" +
    "<Value Type='Number'>10</Value></Geq></Where></Query>";
    foreach (SPListItem item in list.GetItems(testQuery))
    title = Convert.ToString(item["Title"]);
    EditorChoices.Items.Add(title);
    Controls.Add(EditorChoices);
    base.CreateChildControls();
    ChildControlsCreated = true;
    I basically want to display the items returned from the query, which are now in the dropdownlist, to be displayed on my custom webpart. I really appreciate the help.
    Thanks
    UPDATE: My dropdownlist is a web part property. So when editing the web part, the drop down control appears in the web part property. Now that part is working just fine. The part am having an issue with is, the second part of my requirement is that I want
    to display that same information within the drop down on the web part. Not as another drop down, but just to display them as a vertical text list on the web part.

    Hello,
    >I want to be able to display all the entteries in the dropdown,
    Could you please provide more information? as per your description fisrt part is done, which was filling data in dropdown list. So what is next?
    If you want to get selected value from dropdown or filter value then you may try this link:
    http://bilbrobloggins.com/sharepoint/dropdown-list-box-filter-web-part-in-sharepoint-ndash-part-three/
    http://tmullenssharepoint.wordpress.com/2013/04/12/sharepoint-custom-web-part-properties-from-sharepoint-list/
    Correct me if i misunderstood
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Auto Fill Shipping Address from Billing Address on a New Form in SharePoint 2013

    I have a new form on SharePoint that has a few fields:
    Billing Address 1 (Single Line of Text)
    Billing Address 2 (Single Line of Text)
    Billing Address City (Single Line of Text)
    Billing Address State (Drop Down Menu)
    Billing Address Zip (Single Line of Text)
    Shipping Address is the Same (Yes/No Check Box)
    Shipping Address 1 (Single Line of Text)
    Shipping Address 2 (Single Line of Text)
    Shipping Address City (Single Line of Text)
    Shipping Address State (Drop Down Menu)
    Shipping Address Zip (Single Line of Text)
    The object is that a user would fill in the Billing Address Fields, then click the "Shipping Address is the Same" check box and the Shipping Address Fields would auto fill with the Billing Address Fields.
    I've tried using a CEWP and editing the form file in SharePoint Designer 2013. I just don't know how to make this Dynamic auto fill work! Any help is greatly appreciated!!!!

    Use a custom web part
    Design the form controls and in "Shipping Address is the Same" check box check event or button click,
    copy the same data into a label form contains the same fields but in form of labels instead of textbox and dropdownlist.
    try this solution and let me know.
    Ahmed Said Moussa SharePoint Consultant

  • Flex 4: Custom ScrollBar not working in Custom DropDownList

    Hello,
    I'm having an odd issue that I just cannot figure out. I have a custom DropDownList .as component (to pass color values) and a custom skin. In this skin I am using a custom Scroller (same AS file component with mxml skin). When I use this configuration, clicking on the scrollbar just closes the DropDown. If I remove the skin from my custom scrollbar it works, which leads me to believe it has something to do with the DropDown skin. Even if I revert my custom Scroller to the spark Scroller, it still doesn't work. I've narrowed it down to what seems like a problem with my DropDownList skin.
    Not really sure what code to put here, but all I've been doing is right clicking my project and making new ActionScript components and MXML skins from the default skin. Here is my DropDownList skin, not sure if I should paste any other code? I have no idea what would be causing this, so I don't really know what code to place.
          [HostComponent("ccm.DropDown.DropDownList")]          

    Woops, the code didn't place correctly, here it is:
    <s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:fb="http://ns.adobe.com/flashbuilder/2009" alpha.disabled=".5" xmlns:Scroller="ccm.Scroller.*" xmlns:DropDown="ccm.DropDown.*">
        <fx:Metadata>
              [HostComponent("ccm.DropDown.DropDownList")]
         </fx:Metadata>
        <!-- host component -->
         <fx:Script fb:purpose="styling">
              <![CDATA[           
                   import flash.filters.BitmapFilterQuality;
                   import flash.filters.BitmapFilterType;
                   import mx.controls.Alert;
                   import spark.filters.*;
                   /* Define the content fill items that should be colored by the "contentBackgroundColor" style. */
                   static private const contentFill:Array = [];
                    * @private
                   override public function get contentItems():Array {return contentFill};
                    * @private
                   override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
                        openButton.setStyle("cornerRadius", getStyle("cornerRadius"));
                        super.updateDisplayList(unscaledWidth, unscaledHeight);
              ]]>
         </fx:Script>
         <s:states>
              <s:State name="normal" />
              <s:State name="open" />
              <s:State name="disabled" />
         </s:states>
         <!---
         The PopUpAnchor control that opens the drop-down list.
         <p>In a custom skin class that uses transitions, set the
         <code>itemDestructionPolicy</code> property to <code>none</code>.</p>
         -->
         <s:PopUpAnchor id="popUp"  displayPopUp.normal="false" displayPopUp.open="true" includeIn="open"
                           left="0" right="0" top="0" bottom="0" itemDestructionPolicy="auto"
                           popUpPosition="below" popUpWidthMatchesAnchorWidth="true" >
              <!---
              This includes borders, background colors, scrollers, and filters.
              @copy spark.components.supportClasses.DropDownListBase#dropDown
              -->
              <s:Group maxHeight="134" minHeight="22" >
                   <s:Rect id="fill" left="1" right="1" top="1" bottom="0" bottomLeftRadiusX="16.5" bottomRightRadiusX="16.5" topLeftRadiusX="16.5" topRightRadiusX="16.5" >
                        <s:fill>
                             <s:SolidColor color="0xFFFFFF" />
                        </s:fill>
                        <s:filters>
                             <s:GlowFilter
                                  color="0x000000"
                                  alpha=".35"
                                  blurX="6"
                                  blurY="6"
                                  strength="1"
                                  quality="{BitmapFilterQuality.HIGH}"
                                  inner="true"
                                  knockout="false"/>
                        </s:filters>
                   </s:Rect>
                   <!--- @private -->
                   <Scroller:Scroller id="scroller" left="8" top="8" right="8" bottom="8" hasFocusableChildren="false" minViewportInset="1"
                                          showButtons="false"
                                          trackColor="{hostComponent._trackColor}"
                                          thumbColor="{hostComponent._thumbColor}"
                                          skinClass="ccm.Scroller.ScrollerSkin">
                        <!--- @copy spark.components.SkinnableDataContainer#dataGroup-->
                        <s:DataGroup id="dataGroup" itemRenderer="ccm.DropDown.DropDownItemRenderer">
                             <s:layout>
                                  <s:VerticalLayout gap="0" horizontalAlign="contentJustify"/>
                             </s:layout>
                        </s:DataGroup>
                   </Scroller:Scroller>
              </s:Group>
         </s:PopUpAnchor>
         <!---  The default skin is DropDownListButtonSkin.
         @copy spark.components.supportClasses.DropDownListBase#openButton
         @see spark.skins.spark.DropDownListButtonSkin -->
         <DropDown:DropDownButton id="openButton" left="0" right="0" top="0" bottom="0" focusEnabled="false"
                                        skinClass="ccm.DropDown.DropDownButtonSkin"
                                        buttonColor="{hostComponent._buttonColor}"
                                        /> 
         <!--- @copy spark.components.DropDownList#labelDisplay -->
         <s:Label id="labelDisplay" verticalAlign="middle" maxDisplayedLines="1"
                    mouseEnabled="false" mouseChildren="false"
                    left="12" right="30" top="2" bottom="2" width="75" verticalCenter="1" />
    </s:SparkSkin>

  • How to fill the dropdown list in a input field

    Hi all,
    I have three input fields, Month, Material type and material.
    My requirement is to search material based on material type.  So if i select one material type from the dropdown list, corresponding material should be populate in the material dropdown.
    Pls suggest to this requirement i have
    Regards
    Jeswin

    Hi,
    Refer Below Blog Step By Step For fill data in dropdownlist Getting Data From SAP BI Systems.
    Visual Composer :Get drop down list values  from BI InfoObject master data
    The Below Link is the For getting data from SAP ECC Systems For Both Value Help And DropDown list.
    Visual Composer: Value Help Data Service
    Go Through Above Links
    Points Are Welcome
    tahnks
    SubbaRao Chinta

  • Is it possible to populate listbox/dropdownlist items using loadXML method?

    Is it possible to populate listbox/dropdownlist items using loadXML method? (If I have xml data in some string variable)
    Any sample?
    Thanks

    Hi Steven,
    Yes, Its possible which behaves as system CFL.
    Design the form like cfl having grid, choose button, cancel button and edittext of find. When you tab on edittext on form open the CFL form and after load form fill the grid by Datatable using sql query. Write code for select grid line on click of grid. Write the code on choose button which retrive value from grid.
    Thanks,
    Mahesh

  • In edit mode in gridview everytime ihave to select dropdownlist otherwise its store first value

    <asp:GridViewID="GVTrouserJobWork"runat="server"  
    AutoGenerateColumns="False"CssClass="Gridview"HeaderStyle-BackColor="#4B6D9D
    "DataKeyNames="TrouserJobID"
    OnRowCancelingEdit="GVTrouserJobWork_RowCancelingEdit"OnRowDeleting="GVTrouserJobWork_RowDeleting"
    OnRowEditing="GVTrouserJobWork_RowEditing"OnRowUpdating="GVTrouserJobWork_RowUpdating">
    <Columns>
    <asp:TemplateFieldHeaderText="StyleNo"
    <asp:LabelID="lblStyleNo"runat="server"Text='<%#Eval("StyleNo")
    %>'/>
    <asp:DropDownList Width="60px"  DataSource='<%# GetStyleNo() %>' DataTextField="StyleNo"
                                        DataValueField="StyleNo" ID="StyleNo"
    runat="server">
                                    </asp:DropDownList>
    </EditItemTemplate>
    <ItemTemplate>
    <asp:LabelID="lblStyleNo1"runat="server"Text='<%#Eval("StyleNo")
    %>'/>
    </ItemTemplate>
    </asp:TemplateField>
    </Columns>
    </asp:GridView>
    public
    DataSetGetStyleNo() {
    SqlConnectionmyConnection =
    newSqlConnection(ConfigurationManager.ConnectionStrings["constring"].ToString());
    SqlCommandcmd =
    newSqlCommand();
                    cmd.Connection = con;
                    cmd.CommandText =
    "StleMasterList";
                    cmd.CommandType =
    CommandType.StoredProcedure;
    SqlDataAdapterad =
    newSqlDataAdapter("StleMasterList",
    myConnection);
    //SelectDDCompanyName
    DataSetds =
    newDataSet();
                    ad.Fill(ds,
    "StleMasterList");
    return
    ds;
    StleMasterList = Select StyleNo from Stylemaster
    protectedvoid
    GVTrouserJobWork_RowUpdating(objectsender,
    GridViewUpdateEventArgse)
    intTrouserOrderID =
    Convert.ToInt32(GVTrouserOrderDetail.DataKeys[e.RowIndex].Value.ToString());
    DropDownListStyleNo = (DropDownList)GVTrouserOrderDetail.Rows[e.RowIndex].FindControl("StyleNo");
    SqlCommandcmd =
    newSqlCommand("update
    TrouserOrders set StyleNo='"+
    StyleNo.SelectedValue.ToString() + "'where
    TrouserOrderID="+ TrouserOrderID, con);
     cmd.ExecuteNonQuery();
     con.Close();
    lblresult.ForeColor =Color.Green;
    lblresult.Text = " Details Updated successfully";
    GVTrouserOrderDetail.EditIndex = -1;
    BindTrouserOrderDetails();
    Actually I get dropdown in editmode but when without selecting dropdownlist if I update it it select first value of dropdown list.
    if have two dropdownlist in gridview and I want to update only one I cant do this every time I have to select both
    dropdownlist .

    Hello Fresherss,
    I think the ASP.NET forum will be more suitable for this thread:
    http://forums.asp.net/
    There are ASP.NET experts who will help you better.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Insert into dropdown list filled from database

    Hi,
    I have a dropdownlist which is filled from a database. I want to insert an empty/dummy option at index 0. I couldn't find when the rowset execute in the code( the autogenerated constructor have datasorce and command setup but no execute()), and don't how to modify the data from the database. Any help or suggestions? thanks.
    John

    It doesn't work if the selectOneMenu uses a converter. (I assume it works if the used values are just strings.)
    Then you get on selecting the extra added selectItem a
    Validation Error: {0}Value is not validJSP source:
    <h:selectOneMenu binding="#{main.ddlReps}" converter="#{main.ddlRepsConverter}" id="ddlReps" styleClass="blackfont7">
      <f:selectItem itemLabel="Alle reps" itemValue="0"/>
      <f:selectItems binding="#{main.ddlRepsSelectItems}" id="ddlRepsSelectItems" value="#{main.hdusersRowSet.selectItems['SID,USERNAME']}"/>
    </h:selectOneMenu>SID is a number(3) type field in an Oracle table
    Converter used:
    private BigDecimalConverter ddlRepsConverter = new BigDecimalConverter();
    public BigDecimalConverter getDdlRepsConverter() {
        return ddlRepsConverter;
    public void setDdlRepsConverter(BigDecimalConverter bdc) {
        this.ddlRepsConverter = bdc;
    }I thought I could outsmart this but no:
    <f:selectItem itemLabel="Alle reps" itemValue="#{main.dummy}"/>With the following code in the java code of the page:
    private int dummy = 0;
    public int getDummy() {
        return this.dummy;
    }But then the converter starts giving errors.
    Roland

  • 2 way databinding between DataGrid and DropDownList

    I am not getting anywhere with what I thought is the most simplest basic thing in the world.
    I have a ArrayCollection "employees" which is used to fill a DataGrid. The department is listed as an Integer value. I would like to display however the name of the department, which is in a second ArrayCollection "departmentsArray". So the itemRenderer (which is not yet implemented in this code) needs to match the "idn" value with the "departmentid" value and then display the name of the department. However, when the user clicks on the DropDownLists and selects a new department, the departmentid value in the employee array needs to get updated too.
    I am assuming that this can be done with 2 way databinding, but I am not getting this to work and would greatly appreciate if someone could show me how the code would have to look for this.
    Michael
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                      xmlns:s="library://ns.adobe.com/flex/spark"
                      xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
         <fx:Declarations>
              <!-- Platzieren Sie nichtvisuelle Elemente (z. B. Dienste, Wertobjekte) hier -->
         </fx:Declarations>
         <fx:Script>
              <![CDATA[               
                   import mx.collections.ArrayCollection;
                   [Bindable]
                   private var employees:ArrayCollection = new ArrayCollection([
                        {idn:1, firstname:'Lisa', lastname:'Tran', departmentid:1},
                        {idn:2, firstname:'Michael', lastname:'Orchard', departmentid:2},
                        {idn:3, firstname:'Wolfgang', lastname:'Prettyer', departmentid:2},
                        {idn:4, firstname:'Julia', lastname:'Stancau', departmentid:3},
                   [Bindable]
                   private var departmentsArray:ArrayCollection = new ArrayCollection([
                        {idn:1, department:'Video'},
                        {idn:2, department:'Web'},
                        {idn:3, department:'Print'},
              ]]>
         </fx:Script>
         <s:DataGrid x="57" y="90" width="410" requestedRowCount="4" dataProvider="{employees}">
              <s:columns>
                   <s:ArrayList>
                        <s:GridColumn dataField="idn" headerText="ID"></s:GridColumn>
                        <s:GridColumn dataField="firstname" headerText="Vorname"></s:GridColumn>
                        <s:GridColumn dataField="lastname" headerText="Nachname"></s:GridColumn>
                        <s:GridColumn dataField="departmentid" headerText="Department"></s:GridColumn>
                   </s:ArrayList>
              </s:columns>
         </s:DataGrid>
    </s:Application>

    Thanks for the info.
    I've only seen info about Snow Leopard syncing (and it doesn't really specify 2 way) to Exchange (which is not LDAP)
    Addressbookserver (www.addressbookserver.com) is also not LDAP.
    I really need this to work (2 way sync) with an LDAP server.
    Thanks.

  • Fill the second Dropdown List based on user selection

    Hi All,
    I am using Web Services to populate Dropdownlists. This works fine for me.
    I have a table with the column "Core Category" and "SUB Category", "Core Category" can have 1 or more SUB Categories.
    The SQL statement in the Web Service for "Core Category" looks like this: "Select DISTINCT [core category] from table", this returns a list of categories.
    In this example, I want to achieve the following:
    When I select a "Core Category' in the first Dropdownlist, the application fires an event or action to fill the second Dropdownlist "SUB Category" with ONLY values that belongs to the selected "Core Category" in the first Dropdown list.
    Is this possible with Visual Composer? Please let me know how I can achieve this?
    Many Thanks,
    Ridouan

    Hi Ridouan,
    Yes it is possible. [Example of Ship and Engine|http://img146.imageshack.us/img146/2968/shipenginezt9.jpg]. Kindly note there is a web service for getting ship and on basis of ship-id selected, engine is filled, which is also deliverd by web service
    The intial state of application is ship drop down is enabled but not the engine, that gets enabled only when ship is selected.
    Here the steps: Please replace it with your fields:
    1. Place the 2 drown down controls.
    2. For Ship, Select the web service in the dynamic list of the dropdown, remember at runtime, if those input parameters are not valid it will give the data service error, make use of if statement.
    3. Define Store -> shipid, engineid and boolean show_engine  - default false
    4.  Action of ship -> ASSIGN action -> true to show_engine from data store
    5.  Value of ship ->
    =store@SHIP
    6.For engine, Select the web service in the dynamic list of the dropdown, remember at runtime, if those input parameters are not valid it will give the data service error, make use of if statement. Where the paramter for shipid is to be filled
    =IF(store@SHIP!="",UPPER(store@SHIP),"AVRA")
    7. Value of engine ->
    =store@ENGINE
    Let me know, if helps.
    Best regards,
    Dharmi
    Edited by: Dharmi Tanna on Jun 27, 2008 3:23 PM

  • 7.1: Filling choice of DropDownByKey widget

    This is a question for NW Mobile 7.1
    Dear all,
    we want to use the DropDownByKey widget of WebdynPro for Java on the mobile client.
    we want to fill the list of choices from a table in our data base
    we have a data model, data service, and an operation that returns a result set with just one column
    we are able to display this result set in a single column table (for testing)
    now we want to fill the choices of the DropDownByKey widget with that result set
    how would we do this? I could not find any documentation that helps.
    The examples in the documentation only refers to java lists of strings (like the names of the months) which are then added to the choice list using "put" for each value of the list.
    Any ideas?
    Thanks in advance, Andre
    Edited by: André Gerdts on Jun 19, 2008 3:49 PM
    to clarify: we are developing for PDAs
    A.

    Hi Jan,
    this information is very helpful and we got it to work in the case that all the records of the helper table should be used to fill the dropdown list.
    In the declaration of the helper, it is only possible to specify a data object and the relevant columns. As far as we can see, it is not possible to be more selective to only use certain records based on a filter with input from some other dynamic value.
    The case:
    - we have 4 DropDownLists.
    - the selected value of one DropDown widget determines the subset of allowed values for the next DropDown widget
    - all super sets of allowed values are in Data Objects downloaded from the backend. Simplified, they consist of just 2 columns: filter column and value column. We need to select on the filter column to only load the the values from the value column
    we don't see that we can abstract such a query with an input parameter in such a way, that we can specify it as the helper table.
    Is this a limitation of the feature? or did we miss something?
    Cheers, Andre

  • Expand select dropdownlist

    I am trying to expand a open dropdownlist upon clicking on a statictext.
    var w = new Window ("dialog");
    var ss1 = w.add ("statictext", undefined, "Current Name: ", "alignment:left");
    var g0 = w.add("group {orientation: 'row', alignChildren: ['fill', 'fill'], margins: 0}");
    var lbCategoryCodes1 = g0.add("dropdownlist", undefined, ["test 1", "testerterg"]);
    b = w.add('button', undefined, "OK");
    ss1.addEventListener('mousedown', function(kev)
        var event = ScriptUI.events.createEvent('MouseEvent');
        event.initMouseEvent('mousedown', true, true, w);
        lbCategoryCodes1.dispatchEvent(event);
      },false/*==bubble*/);
    w.show();
    Does not work.
    How do I?

    withoutdix,
    I hope, I understood you right.
    Do you want to do something like this?
    var w = new Window ("dialog");
    var ss1 = w.add ("statictext", undefined, "Current Name: ", "alignment:left");
    var lbCategoryCodes1 = w.add("dropdownlist", undefined, ["test 1", "testerterg"]);
    lbCategoryCodes1.selection = 0;
    var item = lbCategoryCodes1.selection;
    b = w.add('button', undefined, "OK");
    lbCategoryCodes1.onChange = function () {
        item = lbCategoryCodes1.selection;
        return item;
    w.show();
    try {
        alert(item);
    catch (e) {}
    Have fun
    Otherwise see Peter Kahrels Script-ui.pdf for more details.

  • DropDownList as a custom renderer

    Any idea how to create a custom renderer based on DropDownList for dataGrid?
    Thanks

    I'm sorry but that went a little over my head, could you point me in the direction of an example, alternativly I have extracted the following example from my application showing what I have so far. If I skin my ItemRenderer for the DropDownList, I'm worried it will upset the ItemRenderer for each of the items in the list!
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx"
                   minWidth="955" minHeight="600"
                   creationComplete="application1_creationCompleteHandler(event)"
                   viewSourceURL="srcview/index.html">
        <fx:Script>
            <![CDATA[       
                import mx.collections.ArrayCollection;
                import mx.events.FlexEvent;
                [Bindable]
                protected var acArrayCollection:ArrayCollection = new ArrayCollection();
                protected function application1_creationCompleteHandler(event:FlexEvent):void
                    var obj:Object;
                    for (var i:int = 0; i<10; i++)
                        obj = new Object();
                        obj.idx1 = i;
                        obj.item = i;
                        obj.idx2 = i;
                        acArrayCollection.addItem(obj);
            ]]>
        </fx:Script>
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <mx:DataGrid x="10" y="10" dataProvider="{acArrayCollection}" editable="true">
            <mx:columns>
                <mx:DataGridColumn headerText="" dataField="idx1" width="50" editable="false" textAlign="center"/>
                <mx:DataGridColumn headerText="DataGridColumn" dataField="item" width="260"
                                   itemRenderer="itemRenderer.IRDropDownList" rendererIsEditor="true"
                                   editorDataField="selectedItem"/>
                <mx:DataGridColumn headerText="" dataField="idx2" width="50" editable="false" textAlign="center"/>
            </mx:columns>
        </mx:DataGrid>
    </s:Application>
    <?xml version="1.0" encoding="utf-8"?>
    <s:MXDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                              xmlns:s="library://ns.adobe.com/flex/spark"
                              xmlns:mx="library://ns.adobe.com/flex/mx"
                              focusEnabled="true">
        <fx:Script>
            <![CDATA[
                import mx.events.DragEvent;
                import spark.events.DropDownEvent;
                import spark.events.IndexChangeEvent;
                [Bindable]
                public var selectedItem:int;
                protected function dropdownlist1_changeHandler(event:IndexChangeEvent):void
                    selectedItem = dropDown.selectedIndex;
                override public function set data(value:Object):void
                    super.data = value;
                    selectedItem = value.item;
            ]]>
        </fx:Script>
        <s:DropDownList id="dropDown" left="3" right="3" width="100%"
                        itemRenderer="itemRenderer.IRLabel"
                        selectedIndex="{selectedItem}"
                        change="dropdownlist1_changeHandler(event)">
            <s:dataProvider>
                <s:ArrayCollection>
                    <fx:String>Option 1</fx:String>
                    <fx:String>Option 2</fx:String>
                    <fx:String>Option 3</fx:String>
                    <fx:String>Option 4</fx:String>
                    <fx:String>Option 5</fx:String>
                    <fx:String>Option 6</fx:String>
                    <fx:String>Option 7</fx:String>
                    <fx:String>Option 8</fx:String>
                    <fx:String>Option 9</fx:String>
                    <fx:String>Option 10</fx:String>
                    <fx:String>Option 11</fx:String>
                    <fx:String>Option 12</fx:String>
                </s:ArrayCollection>
            </s:dataProvider>
        </s:DropDownList>
    </s:MXDataGridItemRenderer>
    <?xml version="1.0" encoding="utf-8"?>
    <s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:mx="library://ns.adobe.com/flex/mx"
                    autoDrawBackground="true">
        <fx:Script>
            <![CDATA[
                [Bindable]
                public var bgColor:int;
                [Bindable]
                public var myHoverColor:int;
                [Bindable]
                public var mySelectColor:int;
                [Bindable]
                public var myColor:int;
                override public function set itemIndex(value:int):void {
                    super.itemIndex = value;
                    if ((value%2) == 0) {
                        bgColor= 0xFFFFFF;
                    if ((value%2) == 1) {
                        bgColor= 0xE0E0E0;
                override public function set data(value:Object):void
                    super.data = value;
                    if (value == "Option 5")
                        labelDisplay.setStyle("color","#FFFFFF");
                        bgColor = 0x808080;
                        myHoverColor = 0x808080;
                        mySelectColor = 0x808080;
                        myColor = 0xFFFFFF;
                        labelDisplay.left = 3;
                    else
                        labelDisplay.setStyle("color","#000000");
                        //myBackColor = 0xFFFFFF;
                        myHoverColor = 0x5050A0;
                        mySelectColor = 0x7070C0;
                        myColor = 0x000000;
                        labelDisplay.left = 13;
            ]]>
        </fx:Script>
        <s:states>
            <s:State name="normal" />
            <s:State name="hovered" />
            <s:State name="selected" />
        </s:states>
        <s:Rect id="bgRect"
                includeIn="normal,hovered,selected"
                left="0" right="0" top="0" bottom="0">
            <s:fill>
                <s:SolidColor
                    color = "{bgColor}"
                    color.selected="{mySelectColor}"
                    color.hovered="{myHoverColor}"/>
            </s:fill>
        </s:Rect>
        <s:Label id="labelDisplay"
                 color="{myColor}"
                 right="3" top="4" bottom="3"/>
    </s:ItemRenderer>

  • Dropdownlist selection value

    Hallo,
    I have placed a dropdownlistbox in a tableview. The dropdownlist is binded to another table than tableview table.
    How can I set the value of selection property of dropdownlist?.
    Greetings,
    abu

    Hi Abu
    What do you mean by "binded"?  If you mean a foreign-key relationship, you can define foreign-key relations in ABAP dictionary, using transaction code <b>"SE11"</b>. While you are viewing the table structure and the cursor is on the field for which the relation will be defined, press the button having a key figure on it. Follow next steps.
    If it is to update a field of another table, then you should also insert your code in the flow logic of the screen. However, I think, it is not a suitable way to insert such codes manually in these screens. Can't you add this field while designing the view?
    On screens, dropdown list values are filled at the PBO automatically if one of the following applies:
    1. A domain with fixed values
    2. A foreign-key relationship
    3. A POV coding for the field
    Or you can manually set its values at the PBO utiling "VRM_SET*" function module and modifying related property of the field in the screen painter to get values from the program.
    Anyway, it is possible that I have misunderstood at this time of night. If so, can you clarify the issue?
    *--Serdar

Maybe you are looking for

  • Editing exported navbar

    Hi, I've created a .png nav bar, with pop-down menus, which I want to use across my website. I've exported it to an html page in dreamweaver, and it all works fine. However, I'd also like to be able to edit the original .png in a way that changes it

  • How do I change an AppleID to be able to update previously downloaded apps once a new AppleID has been set up?

    I bought an iPad just before the change to iOS5.  The personnel at the Apple Store used their computer to get an AppleID set up so I could access the App Store.  I recently got an iPhone which operates on iOS5, which updates by direct download.  In t

  • Upgraded to yosemite and its asking me for iCloud password to an old ID

    I just upgraded to Yosemite on my mac mini.  When I turn on the computer it asks me for a password to an id that no longer exists.  when I try to use mail, it is apparently using the old ID so it defaults to an iCloud email address and none of my con

  • Handling special characters through proxy

    Hi Gurus, we hvae a scenario sap to file, sending material information from SAP through outbound prpxy and palcing that detaisl in FTP loation using file adapter. Here probelm is one of the fields desc and text we are passing material Description and

  • IB Toolbar Design question

    I'm trying to mimic the toolbar design of preview.app. How do I get a toolbar item that does the next/previous page, or zoom in/out? It LOOKS like it's a segmented control, with two images. However, I can't seem to get the labels for the individual b