Combox Box not displaying selected item

Below is the code I'm using to try to capture and display the
selected item from a ComboBox:
private function
changeProjectTypeSelection(event:Event):void{
projectTypeChange.text+=event.currentTarget.selectedItem.cboProjectType
+ " " +
event.currentTarget.selectedIndex + "\n";
Then the ComboBox:
<mx:ComboBox fontSize="12" x="93" y="83" width="110"
id="cboProjectType" dataProvider="{projectTypeArray}"
labelField="projectTypeName" selectedIndex="0"
click="changeProjectTypeSelection(event)"></mx:ComboBox>
Then the TextInput:
<mx:TextInput id="projectTypeChange" x="248.95" y="84"
width="121"/>
I know there's something wrong with the Actionscript code...
just haven't figured it out. Any suggestions would be greatly
appreciated!

I've almost got it...
private function
changeProjectTypeSelection(event:Event):void{
var i:int;
for(i=0;i<projectTypeArray.length;i++){
if(projectTypeArray.getItemAt(i).projectTypeName ==
event.currentTarget.selectedItem.projectTypeName){
projectTypeChange.text+=projectTypeArray.getItemAt(i).projectTypeName
+ "\n";
Alert.show(projectTypeArray.getItemAt(i).projectTypeName +
"FirstAlert");
//Alert.show(event.currentTarget.selectedItem.projectTypeName +
"SecondAlert");
I just can't seem to be able to reset the value in the
textInput field. I've tried setting it equal to spaces in several
places, but it won't change after the first selection. Any ideas?
Thanks for any suggestions!

Similar Messages

  • Could not find selected item in LOV

    hi i follow this sample http://www.scribd.com/doc/2633296/ADF-Learning-6-Dependent-List-Boxes ,but when i select my LOV am geting this error FacesCtrlListBinding> <getInputValue> ADFv: Could not find selected item matching value 100 of type: oracle.jbo.domain.Number in the list-of-values.
    am in jdeveloper 11.1.1.6.0

    the data type am selecting is number but displaying employee name my page is,the value 100 is the employeeid is in db
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1">
          <af:messages id="m1"/>
          <af:form id="f1">
            <af:panelHeader text="panelHeader 1" id="ph1">
              <f:facet name="context"/>
              <f:facet name="menuBar"/>
              <f:facet name="toolbar">
                <af:commandButton actionListener="#{bindings.CreateInsert.execute}"
                                  text="CreateInsert"
                                  id="cb1"/>
              </f:facet>
              <f:facet name="legend"/>
              <f:facet name="info"/>
              <af:panelFormLayout id="pfl1">
                <af:inputText value="#{bindings.DepartmentId.inputValue}"
                              label="#{bindings.DepartmentId.hints.label}"
                              required="#{bindings.DepartmentId.hints.mandatory}"
                              columns="#{bindings.DepartmentId.hints.displayWidth}"
                              maximumLength="#{bindings.DepartmentId.hints.precision}"
                              shortDesc="#{bindings.DepartmentId.hints.tooltip}"
                              id="it1" rendered="false">
                  <f:validator binding="#{bindings.DepartmentId.validator}"/>
                  <af:convertNumber groupingUsed="false"
                                    pattern="#{bindings.DepartmentId.format}"/>
                </af:inputText>
                <af:inputText value="#{bindings.EmployeeId.inputValue}"
                              label="#{bindings.EmployeeId.hints.label}"
                              required="#{bindings.EmployeeId.hints.mandatory}"
                              columns="#{bindings.EmployeeId.hints.displayWidth}"
                              maximumLength="#{bindings.EmployeeId.hints.precision}"
                              shortDesc="#{bindings.EmployeeId.hints.tooltip}"
                              id="it3" rendered="false">
                  <f:validator binding="#{bindings.EmployeeId.validator}"/>
                  <af:convertNumber groupingUsed="false"
                                    pattern="#{bindings.EmployeeId.format}"/>
                </af:inputText>
                <af:inputText value="#{bindings.Password.inputValue}"
                              label="#{bindings.Password.hints.label}"
                              required="#{bindings.Password.hints.mandatory}"
                              columns="#{bindings.Password.hints.displayWidth}"
                              maximumLength="#{bindings.Password.hints.precision}"
                              shortDesc="#{bindings.Password.hints.tooltip}"
                              id="it4">
                  <f:validator binding="#{bindings.Password.validator}"/>
                </af:inputText>
                <af:inputText value="#{bindings.UserId.inputValue}"
                              label="#{bindings.UserId.hints.label}"
                              required="#{bindings.UserId.hints.mandatory}"
                              columns="#{bindings.UserId.hints.displayWidth}"
                              maximumLength="#{bindings.UserId.hints.precision}"
                              shortDesc="#{bindings.UserId.hints.tooltip}" id="it2">
                  <f:validator binding="#{bindings.UserId.validator}"/>
                </af:inputText>
                <af:selectOneChoice value="#{bindings.DepartmentId1.inputValue}"
                                    label="#{bindings.DepartmentId1.label}"
                                    required="#{bindings.DepartmentId1.hints.mandatory}"
                                    shortDesc="#{bindings.DepartmentId1.hints.tooltip}"
                                    id="soc1" autoSubmit="true">
                  <f:selectItems value="#{bindings.DepartmentId1.items}" id="si1"/>
                </af:selectOneChoice>
                <af:selectOneChoice value="#{bindings.EmployeeId1.inputValue}"
                                    label="#{bindings.EmployeeId1.label}"
                                    required="#{bindings.EmployeeId1.hints.mandatory}"
                                    shortDesc="#{bindings.EmployeeId1.hints.tooltip}"
                                    id="soc2" partialTriggers="soc1">
                  <f:selectItems value="#{bindings.EmployeeId1.items}" id="si2"/>
                </af:selectOneChoice>
              </af:panelFormLayout>
            </af:panelHeader>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>my view is
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <!---->
    <ViewObject
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="VikUserViewObj"
      Version="11.1.1.61.92"
      InheritPersonalization="true"
      SelectList="VikUser.DEPARTMENT_ID,
           VikUser.EMPLOYEE_ID,
           VikUser.PASSWORD,
           VikUser.USER_ID"
      FromList="VIKUSER VikUser"
      BindingStyle="OracleName"
      CustomQuery="false"
      PageIterMode="Full"
      UseGlueCode="false">
      <Properties>
        <SchemaBasedProperties>
          <LABEL
            ResId="model.VikUserViewObj_LABEL"/>
        </SchemaBasedProperties>
      </Properties>
      <EntityUsage
        Name="VikUser"
        Entity="model.VikUser"/>
      <ViewAttribute
        Name="DepartmentId"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="DepartmentId"
        EntityUsage="VikUser"
        AliasName="DEPARTMENT_ID"/>
      <ViewAttribute
        Name="EmployeeId"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="EmployeeId"
        EntityUsage="VikUser"
        AliasName="EMPLOYEE_ID"/>
      <ViewAttribute
        Name="Password"
        PrecisionRule="true"
        EntityAttrName="Password"
        EntityUsage="VikUser"
        AliasName="PASSWORD"/>
      <ViewAttribute
        Name="UserId"
        PrecisionRule="true"
        EntityAttrName="UserId"
        EntityUsage="VikUser"
        AliasName="USER_ID"/>
      <ResourceBundle>
        <PropertiesBundle
          PropertiesFile="model.ModelBundle"/>
      </ResourceBundle>
    </ViewObject>Edited by: user0994 on 2012/10/20 9:07 PM
    Edited by: user0994 on 2012/10/20 9:29 PM
    Edited by: user0994 on 2012/10/20 10:41 PM

  • Bug (possibly?): SelectManyShuttle fails to display selected items

    Bug (possibly?): SelectManyShuttle fails to display selected items when valuePassThru="true" in ADF 10g
    Hello all,
    When run, the example below shows a Select Many Shuttle with four choices in the leading list. When items are shuttled to the training list and the page is submitted the trailing list is rendered with no items selected. Is this a bug?
    Configuration
    This example was constructed using jDeveloper 10.1.3.5.0.
    A new application was created using the Web Application [JSF, ADF BC] template although no business components are used.
    Steps to Reproduce
    1. Create the following backing bean class.
    package com.fmcna.adf.test.view;
    import java.util.ArrayList;
    import java.util.List;
    import javax.faces.model.SelectItem;
    public class ShuttleBean {
        public ShuttleBean() {
        private List availableItems;
        private List selectedItems;
        public void setAvailableItems(List availableItems) {
            this.availableItems = availableItems;
        public List getAvailableItems() {
            //populate with a List of SelectItem instances on the inital call to this method
            if(this.availableItems==null) {
                this.availableItems=generateSelectItemsList();
            return availableItems;
        public void setSelectedItems(List selectedItems) {
            this.selectedItems = selectedItems;
        public List getSelectedItems() {
            return selectedItems;
         * Build a List of SelectItem instances to be used by an af:selectManyShuttle
         * @return A List containing SelectItems instances
        private List generateSelectItemsList() {
            List initialItems = new ArrayList();
            initialItems.add(new SelectItem(new Integer(11),"First Choice"));
            initialItems.add(new SelectItem(new Integer(22),"Second Choice"));
            initialItems.add(new SelectItem(new Integer(33),"Third Choice"));
            initialItems.add(new SelectItem(new Integer(44),"Fourth Choice"));
            return initialItems;
    }2. Configure the ShuttleBean class as a session scoped managed bean as in the following faces-config.xml file.
    <?xml version="1.0" encoding="windows-1252"?>
    <!DOCTYPE faces-config PUBLIC
      "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
      "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config xmlns="http://java.sun.com/JSF/Configuration">
      <managed-bean>
        <managed-bean-name>ShuttleBean</managed-bean-name>
        <managed-bean-class>com.fmcna.adf.test.view.ShuttleBean</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>
      <application>
        <default-render-kit-id>oracle.adf.core</default-render-kit-id>
      </application>
    </faces-config>3. Create a JSP page containing an af:selectManyShuttle with a nested f:selectItems component. Wire the values for these components to the properties in the managed bean.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
    <f:view>
      <html>
        <head>
          <meta http-equiv="Content-Type"
                content="text/html; charset=windows-1252"/>
          <title>testShuttle</title>
        </head>
        <body><h:form>
            <af:selectManyShuttle value="#{ShuttleBean.selectedItems}" valuePassThru="true">
                <f:selectItems value="#{ShuttleBean.availableItems}"/>
            </af:selectManyShuttle>
            <af:commandLink text="Postback"/>
        </h:form></body>
      </html>
    </f:view>4. Run the JSP. Validate that the trailing list is initially empty.
    5. Shuttle one or more items to the trailing list and click the Postback button. Validate that when the page refreshes the trailing list is again empty.
    Thanks for any input you might be able to provide.
    Chris Mihalcik
    Edited by: user5384858 on Jun 14, 2010 1:06 PM

    I'm holding my Nano in my hot little hands with ALL of the things you listed, but here's the sad, simple truth: you CAN'T use iTunes to sync everything. It works well for:
    1) Music
    2) Videos (except sometimes in Vista)
    3) Photos (as long as they're not too large)
    but is terrible for:
    1) calendar
    2) contacts
    3) To-Do lists
    For the latter use something like "iGadget" (www.ipodsoft.com). I also edit/store notes w/iGadget plus it allows you to export files, etc.
    I gave up on syncing iTunes w/Outlook long ago. Good luck.

  • Could not find selected item matching value "null" in CoreSelectOneRadio

    Hello,
    I get the following error with my selectOneChoice components:
    WARNING Could not find selected item matching value "null" in CoreSelectOneRadio[UIXEditableFacesBeanImpl, id=dyna_2709976_11]
    It seem that the component looks for a selectItem object qith its value set to null, so I tried to add one with a null value to no avail. The error don't cause any problem on the rendered page but it might spam the log when many users will be connected. Anyone every got this error and found a fix to stop it from appearing?
    Regards,
    Simon Lessard

    you said you're using selectOneChoice but the error says radio. Is the information correct?

  • Could not find selected item matching value "New" warning message in ADF

    Hi,
    I have a selectOneChoice1 for a field which has the following fixed values in it. And while creating it, I selected the 'SelctionRequired' option so that this field will always have a value.
    New
    Pending
    Completed.
    While navigating to this page, I am trying to set the value to 'New' (Retrieved from the DB) in the backing bean. But when the page is rendered, the above field is empty with the above options in the list and jdev has the follwing error message in its log.
    WARNING: Could not find selected item matching value "New" in CoreSelectOneChoice[UIXEditableFacesBeanImpl, id=selectOneChoice1]
    Can any one help me with this issue?
    Thanks,
    Priya

    The value of a list binding is the zero-based integer position in the list that is selected, not the actual underlying value.
    The simplest way to set the value of an attribute is to use an attribute binding (which can be bound to the same attribute as the list binding). When you set the value of an attribute binding, it sets the value as you supply it. Otherwise, you'd need to set the list binding's value to the numerical "slot" number of the one you want to change the value to.

  • IPhone will not display calendar items more than one day in advance.

    iPhone will not display calendar items more than one day in advance. 
    I used to have a droid and loved the calendar on the main screen that used to show me the next few appointments coming up - so far I have only figured out how to put in to show for next day or 2 days or etc....
    is there any way to show tomorrow and next few days in notification, or is there a good app out there that will greet me. dont have 4s to ask just a 4
    i used google calendar and they all show up in calendar but REALLY need the functionality to see what is coming up, kind of like what you see in outlook or any other email program.
    please help out this noob.

    Is this what you're doing:
    OS X Yosemite: Recover your entire system

  • Document does not contain selectable items.

    Hello Gurus,
    My purchase team wanted to transfer plant from one plant to other.. and so they are creating STO , without any confirmation , while doing GRN 101 movement type Store person is facing error Document does not contain selectable items.
    Please help to resolve the same.

    Hi,
    1) this should be posted in MM forum, not here
    2) let the person go to MIGO , to menu Settings, click Default Values and check checkbox "Propose All Items"
    3) I guess if it is STO it would need goods issue first happening in source plant so that GR can happen in receiving plant (so first create Outbound Delivery in source plant, post goods issue against it and then do the GR with 101 against this delivery or PO itself)
    Regards,
    Tomek

  • PO does not contain selectable item

    Dear All,
    I have created PO(ME21N) and also released(ME29N) but while doing GR(MIGO) the error comes"PO does not contain selectable item".
    Please explain why error is coming where as i have filled all the mandatory data??
    Thanks and Regards,
    Baiju

    While doing the GRN against the PO, if you are getting the error message u201CPO doesnu2019t contain any selectable itemsu201D, following may be reasons:-
    1.PO may not be released.
    2.The confirmation control tab may be blank, in that case selects the relevant key. If you are preparing the GRN against inbound delivery then select the confirmation control as inbound and prepare inbound delivery using VL31N.
    3.If through rough GRN then prepare Rough GRN using VL41 and proceed.
    4.If the delivery completion flag under delivery tab is set, then also you will get the same error message. In that case, uncheck the delivery completion flag and proceed.
    Still issue persist, revert back.

  • WARNING: ADFv: Could not find selected item matching value ...

    Using Windows JDev 11.1; I have an entity object with an attribute which has a LOV configured to supply a select-one-choice render. The LOV query requires that a bind variable be supplied. When creating a new record in the entity via the VO, I can use the ViewImpl to create a new row, retrieve the RowSet which corresponds to the attribute LOV query, set the named where clause parameter, and I'm away. When updating however, I'm getting the following error reported:
    09/12/2009 2:44:04 PM oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding getInputValue
    WARNING: ADFv: Could not find selected item matching value EMPLOYER of type: java.lang.String in the list-of-values.
    I can't supply the bind variable value before the row is instantiated (and presumably populated with the current value/key) because the View Accessor RowSet is only accessible via the RowImpl. If after the query has executed, I apply the bind variable value, re-execute the RowSet query, I can see that it's populated, and I can create a RowSetIterator to loop through the LOV RowSet and confirm that the key/value is there. I can even setCurrentRow on the RowSet but I still find that the above error appears in the serve log output seemingly after all this code executes.
    So my question is what is the technique for supplying bind variables to attribute LOV View Accessors as part of an underlying EO object query.
    In the run-time, the list items appear unpopulated (current value and list items). If I reload the page, it all comes up fine, which could tend to suggest that a PPR event might fix me up, but I would prefer to know how this should be done.
    Thanks in advance.
    Edited by: robli on Dec 9, 2009 9:01 PM

    Hi,
    Is your issue resolved. I'm facing similar issue. I have created a viewaAccessors in EO, associated these to ViewObject attributes as List of Values.
    I created the table in UI using the ViewObject.
    I see those as selectOneChoice but not values (Empty list).
    If I create new record in the table by CreateInsert. table now shows the ListOfvalues.
    any Idea what am I missing.
    Thanks,
    Satya
    Edited by: stammine on Mar 2, 2010 4:09 PM

  • GR of Process order - Document does not contain selectable items

    Hi Guru's,
       While doing GR for process order, user is not able to do the GR because of the below message:
    Document XXXXXX does not contain selectable items
    The other user is able to do the GR. The status of process order is
    REL PCNF PRC EXPL EXTS GMPS MANC PDLV. There is overdelivery tolerance so, the delivered quantity is more than ordered qty.
    There is no auto GR setting, no COGI errors, no final delivery indicator, no authorisation issue.
    What could be the reason for this ?
    Thanks in advance.
    Regards
    Kalyan

    Hi Dee Joy,
      I am using MIGO for posting the GR. So, kinldy let me know what setting in MIGO needs to be done.
    Regards
    Kalyan

  • USF on iTunes U collections such as Sustainability and iteach Initiative are not displaying new items even days after they are uploaded to the collections. The items show in the Preview of the collections but not Live view. not displaying

    USF on iTunes U collections such as Sustainability and iteach Initiative are not displaying new items even days after they are uploaded to the collections. The items show in the Preview of the collections but not Live view. not displaying

    Greetings;
    This seems to an ongoing issue (see related discussion link).  We've been experiencing the same update lag since last Friday.  The new additions to the Collection appear and are accessible in both the iPad and iPhone applications, but even though they additions appear in "Quick View", the material doesn't appear in the Collection itself.  Apple is aware of the issue and is investigating.  All the best...
    Syd Rodocker
    Tennessee State Department of Education
    https://discussions.apple.com/message/15461971#15461971

  • Discussion Forum does not display the items in Answered question ,Unanswered question views.

    Hi All,
    Discussion Forum does not display the items in Answered question ,Unanswered question views. Please find the below screen
    what is the difference between Answered and unanswered view?
    I have marked  the discussion as question .
    have replied for the question those discussion are visible in Unanswered view and the answered view is showings as no item to show.
    Below screenshot is answered questions view.
    Can you please help on this .
    Thanks in advance ,
    Sunitha

    The discussion in which at least one of the replies is marked as "Best Reply" will show in the "Answered Questions" section.
    Blog | SharePoint Learnings CodePlex Tools |
    Export Version History To Excel |
    Autocomplete Lookup Field

  • Multi-Select Box Not Displaying Values Passed From Grid?

    Coldfusion 8
    I inherited an application and am trying to maintain and improve it... hit a snag today.
    I have a multi-select box that is not displaying what I expect.  The values come from a ColdFusion grid which is based off a database query.
    Here is the code for the select - does not work - nothing is selected:
    <cfselect name="USER_IDS" multiple="true" queryposition="below" selected="USER_IDS" query="ActiveUsersPlus" disabled="#disabled#" value="G_USER_WORK_UNIT_SK" display="G_USER_ID" >
    </cfselect>
    Now if I change the multiselect to a single select like below - it takes the first item in the field list (from the grid) and selects it in the drop down.
    <cfselect name="USER_IDS" multiple="false" queryposition="below" selected="USER_IDS" query="ActiveUsersPlus" disabled="#disabled#" value="G_USER_WORK_UNIT_SK" display="G_USER_ID" >
    </cfselect>
    Or if I assign a variable like this and use the multi-select code it seems to work as well.
    testlist = "22,26";
    <cfselect name="USER_IDS" multiple="true" queryposition="below" selected="#testlist#" query="ActiveUsersPlus" disabled="#disabled#" value="G_USER_WORK_UNIT_SK" display="G_USER_ID" >
    </cfselect>
    I have displayed the value of "User_IDs" in the grid and in the data entry part of the screen to see values of:  22,26
    to make sure that wasn't my issue.
    Do grids and multiselects require something additional?  Any advice on how to resolve?

    Problem was related to some javascript for the select box.  There was a function for a single select box but not a multiple select box - this fixed it: 
    if(theForm.elements[i].type == "select-multiple"){
                        var selectBox = theForm.elements[i];
                        var sbname = selectBox.name;
                        cpvalue = String(eval('record.data.' + sbname));
                        var NotifyArray = cpvalue.split(',');
                        for (var j=0; j < selectBox.length; j++) {
                            selectBox[j].selected = false;
                        for (var j=0; j < selectBox.length; j++) {
                            sbvalue = selectBox[j].value;
                            for (var k=0; k < NotifyArray.length; k++){
                                if (sbvalue == NotifyArray[k]){
                                    selectBox[j].selected = true;

  • Windows Phone 8.1 xaml, c# ComboBox does not display selection when first item is selected from full page list.

    I have 3 comboboxes on a xaml page and most of the time when I select the first item on the full page list displayed when the number of items are > 5, the screen returns to the combobox and the box is blank. The combobox.SelectedItem is valued but it
    does not display.  This does not happen every time and I have seen this using the emulator and my windows 8.1 phone.  If I select any other item in the list they always display but when I go back and select the first item the box is blank. 
    Does anyone know what I could be doing that is causing this?

    Thanks for your help.  When I run the code below and the page is displayed, I select an item from the page list and it displays fine and then I select the first item from the page list and I do not see that selected item in the box. 
    If I remove the SelectedIndex=0 it all works fine except I do not have an item selected for the initial display.  Below should show problem and should work copy/paste in universal blank app.
    ScrollViewer x:Name="scrollViewer1">
            <StackPanel x:Name="stackPanel1" Background="Transparent">
                <ComboBox x:Name="comboBoxTestTypes" Margin="20,117.75,0,465.25" SelectedValuePath="ItemDescription" Width="310" Height="Auto" FontSize="17"
           ItemsSource="{Binding}" HorizontalAlignment="Left" VerticalAlignment="Center">
                <ComboBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding ItemDescription}" />
                    </DataTemplate>
                </ComboBox.ItemTemplate>
            </ComboBox>
     </StackPanel>
        </ScrollViewer>
    public sealed partial class MainPage : Page
            public ObservableCollection<ItemDetail> itemDetail;
            public MainPage()
                this.InitializeComponent();
                this.NavigationCacheMode = NavigationCacheMode.Required;
                this.itemDetail = new ObservableCollection<ItemDetail>();
            protected override void OnNavigatedTo(NavigationEventArgs e)
                PageLoad();
            public class ItemDetail
                public string ItemDescription { get; set; }
                public string ItemName { get; set; }
            private async void PageLoad()
                await initializeTypes();
                var comboBoxTestTypesItemsSource = await GetTestTypes();
                comboBoxTestTypes.ItemsSource = comboBoxTestTypesItemsSource;
                comboBoxTestTypes.SelectedIndex = 0;
            private async Task initializeTypes()
                await addTestType("Item1");
                await addTestType("Item2");
                await addTestType("Item3");
                await addTestType("Item4");
                await addTestType("Item5");
                await addTestType("Item6");
            private async Task<ObservableCollection<ItemDetail>> GetTestTypes()
                //ObservableCollection<ItemDetail> list = new ObservableCollection<ItemDetail>();
                //Random rnd = new Random();
                //for (int i = 0; i < 50; i++)
                //    list.Add(new ItemDetail() { ItemDescription = "hello" + rnd.Next(0, 1001), ItemName = rnd.Next(0, 101).ToString() });
                await getSaveDataFileDataAsync("get");
                return itemDetail;
            private async Task addTestType(string description)
                int newIdAdd = 0;
                if (itemDetail != null && itemDetail.Count > 0)
                    newIdAdd = itemDetail.Max(mT => Convert.ToInt32(mT.ItemName)) + 1;
                var addTestType = new ItemDetail();
                addTestType.ItemName = newIdAdd.ToString();
                addTestType.ItemDescription = description;
                itemDetail.Add(addTestType);
                await getSaveDataFileDataAsync("save");
            private async Task getSaveDataFileDataAsync(string getSave)
                try
                    DataContractJsonSerializer jsonSerializer1 = null;
                    string dataFileName1 = "testFileName";
                    jsonSerializer1 = new DataContractJsonSerializer(typeof(ObservableCollection<ItemDetail>));
                    if (jsonSerializer1 != null && getSave == "get")
                        using (var stream1 = await ApplicationData.Current.LocalFolder.OpenStreamForReadAsync(dataFileName1))
                            itemDetail = (ObservableCollection<ItemDetail>)jsonSerializer1.ReadObject(stream1);
                    if (jsonSerializer1 != null && getSave == "save")
                        using (var stream1 = await ApplicationData.Current.LocalFolder.OpenStreamForWriteAsync(dataFileName1, CreationCollisionOption.ReplaceExisting))
                                jsonSerializer1.WriteObject(stream1, itemDetail);
                catch

  • Display selected items in dynamic list box

    I need to display the selected items in a dynamic list box -
    this worked great - but now client wants multiple selected. I do
    have the items comma delimited in single field (but I can change
    that if I need to) - so how do I make those items display as
    selected in list. I'm using asp and standard dreamweaver list based
    on a recordset.

    There is a better approach. I faced a similar problem and put all the logic in a Javascript function. I modified my code to suit your needs.
    My HTML will have the following.
    <body onLoad="javascript:initLanguages();">
      <form name="languageForm">
        <select size="1" name="languagesList">
        </select>
      </form>
    </body>I created a Javascript function
    <script language="Javascript">
      //-- put all your languages here in a Javascript Array if they are fixed.
      //-- If you get the langauges from a Java object (dynamic or configurable), generate the Javascript in that object and insert a scriptlet in the HTML that plugs in the generated Javascript into this HTML. If so, take care of the quotes and double quotes. They are tricky !!!
      var languageArray = new Array("Fran?ais", "English", "Espanol", "Deutsch", "Italiano");
      function initLanguages ()
        var listCounter = 0;
        for (var ind=0; languageArray != null && ind < languageArray.length; ++ind)
          var obj = eval("new Option" + languageArray[ind]);
          eval("document.languagesForm.languagesList.options[listCounter]=" + "new Option" + languageArray[ind]);
          if(document.languagesForm.languagesList.options[listCounter].value == "<%= selectedLanguage %>")
            document.languagesForm.languagesList.options[listCounter].selected = true;
          listCounter += 1;
    </script>
    selectedLanguage is something you get in the Java code
    <%
      selectedLanguage = myObj.getSelectedLanguage();
    %>

Maybe you are looking for

  • Printing 52 characters in xml punblisher report

    Hi We have requirment for payroll reports, that we will have to print concatined 11 segments(Total 52 characters) of cost centre in Excel using XML publisher. But the problem is whem I am prining this it is comming but has two line with a single cell

  • Multiple Digital Signatures on single profile.

    Hello, I have a question. Can I create multiple digital signatures on a single system. If Yes, I can create digital signature of any "Signature required person"  and I can sign for him, If I have his email id and Organization name, correct? It means

  • Missing/corrupted non-english characters in Preview

    I know there have been posts on this recently, but this is such a significant problem that I thought it worth keeping live. Preview does not display non-english characters in PDFs properly. Things like greek characters are either displayed as the eng

  • Export for web doesn't work (X and 7).

    I use the export for web feature a lot.  I find that I have to bounce back and forth between Quicktime 7 and X because sometime this feature will work and sometimes it doesn't.  There's no consistent reason I can figure out why the applications will

  • Creating a PDF

    I have posted this before but because I was away my reply to a responce was not answered so here goes again: I have Adobe Acrobat 8 Pro v 8.13(as part of CS3) and MS Word 2007 (as part of Office 2007)and have been trying to create a PDF file from a w