DropDownList and setLeadSelection

Hi everyone,
I create da dropdownlistbykey and its value is bound to a simple type I created in the dictionary.
I am not able to set the leading selection to position 1 which is the frst value defined in the disctionary.
Here is the details of the node :
node DataSource
value attribute A
value attribute B
value attribute Currency which is bound the the simple type
I want to display the first value defined in the simple type in Currency.
Should I create another node under DataSource especialy for Currency ?
Thanks for the help.
Regards.

Hi,
  Say your enumerated simple type is like this:
Value|Description
1    |Value1   
2    |Value2
3    |Value3
Now if you say setSelectedKey("2"), the entry Value2 in your dropdown will be selected. Whatever you are entering as a parameter to setSelectedKey(), should be a key in the enumeration.
<i>But what happened if you defined a Node and a value attribute in it.</i>
What about this? I didn't understand. All you should be doing in this case is bind the selectedKey property to Node.nodeAttribute. Here is nodeAttribute is of type simpletype. Make sure the cardinality of the node is 1...1.
Regards,
Satyajit.

Similar Messages

  • Populate Multiple DropDownLists and a ListBox

    Hello All,
    Can someone please help me with the following.
    What I have are two dropdownlists and a listbox. What I am trying to do is based upon a selection made in DropDownList1 clear all items in DropDownList2 and replace them only those items that relate to the selection made in DropDownList1, then select from the available items now in DropDownList2 and populate ListBox1.
    This is what I came up with so far, but can't get it to work.
    Using a "change" event javascript the following is what I have in DropDownList1:
    Dropdown2.rawValue = xfa.event.newText;
    if (this.boundItem(xfa.event.change) == 0) { //DATABASE 1
    Dropdown2.clearItems();
    Dropdown2.addItem("DIRECTORY 1");
    Dropdown2.addItem("DIRECTORY 2");
    Dropdown2.addItem("DIRECTORY 3");
    Dropdown2.addItem("DIRECTORY 4");
    Dropdown2.addItem("DIRECTORY 5");
    } else if (this.boundItem(xfa.event.change) == 1){ //DATABASE 2
    Dropdown2.clearItems();
    Dropdown2.addItem("DIRECTORY 6");
    Dropdown2.addItem("DIRECTORY 7");
    Dropdown2.addItem("DIRECTORY 8");
    Dropdown2.addItem("DIRECTORY 9");
    Dropdown2.addItem("DIRECTORY 10");
    In my DropDownList2 change event I have the following:
    ListBox1.rawValue = this.boundItem(xfa.event.change);
    Can someone please help me with this?

    Hello William,
    I know your post is over a year old, but, were you able to ever figure this out?
    Any help would be appreciated.
    Thank you in advance.
    - Vivianne

  • Thai Lang Dropdownlist and Listbox show "???????"

    Hi gurus,
       My office use SAP/R3 4.6C patch level 21, SAP Gui 620 patch 45-67 and Windows XP sp2 or sp3 when I'm use tcode MIRO or other tcode have screen include dropdownlist or listbox field, it has show "???????" but other field is correct.
       Please suggest me or solution.
       Best regard
       Akkapong
       CAT
    Edited by: Akkapong Pirachai on Aug 21, 2008 4:13 PM
    Edited by: Akkapong Pirachai on Aug 21, 2008 4:15 PM

    The SAP/R3 4.6C is old release , "patch level 21" It is a patch what components, may be you need to patch it?
    Why you use 620 gui to ? Try to 640 or 710 with latest patches-->
    ftp://ftp.sap.com/pub/sapgui/win
    Regards.

  • Report Builder 3.0 DropDownList and @UserID Parameter?

    I can populate a report fine using a Stored Procedure and @UserID parameter. The problem is I'm trying to populate a DropDownList with the same @UserID parameter, but the DropDownList never populates, thus the report never populates.
    Q. How can I populate the DropDownList before the actual report Stored Procedure is run?

    Hi pointeman,
    What’s the meaning of DropDownList? Are you saying the ComboBox control with DropDownList as DropDownStyle in Visual Studio? Are you want to use the ComboBox to display the @UserID parameter drop-down list? As per my understanding, I think we can directly
    add ReportViewer control to display the report with parameter drop-down list to achieve your requirement.
    For more information about how to display reports to an application, please refer to the following document:
    http://msdn.microsoft.com/en-us/library/ms252104.aspx
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Reg - dropdownlist  and Table

    hi all
    i have a requirement in my application
    i have view with two UI element one is a Table i.e., a Nested Tree Table which is on top and a DropDownKey list below the table.  The Dropdown contains Student, Employee, Faculty and so on.  When  i select a particular key element in dropdown corresponding data should be displayed in the table above.
    what i think for this i need to go for GridLayout Viewset
    and my problem should i make 3 different tables for different keys or else one table with 3 different java classes i.e., whenever i select a key that corresponding data should be loaded dynamically into the table at runtime.
    please guide me
    Thanks and Regards
    khaja

    hi Shubhadip
    thanks for your guidance but it did work out im getting Tab0 in my dropdown when i select Student and Tab1 in my dropdown when i select Employee but the tables are not changing accordingly . i will explain clearly what i did
    first ive created a TabStrip in my topview of Gridlayout viewset.  in that tabstrip ive create 2 Tabs named Tab0 and Tab1 which are tables and in the context of TabStrip ive two values nodes Std and Emp.and in the properties of Tabstrip view i have option selectedTab with Tab0 and Tab1 as options
    Next in the second view which is below the Tabstrip view
    i created a dropdownkey ui with Select as context value attribute.then event handler go
    could u please go through and find out what went wrong with me
    implementation of Dropdownkey listview
    public void onActiongo(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActiongo(ServerEvent)
         String str1=wdContext.currentContextElement().getSelect();
                   if     (str1.equalsIgnoreCase("Student"))
                        wdContext.currentContextElement().setSelect("Tab0");
                   else
                        wdContext.currentContextElement().setSelect("Tab1");
    regards

  • Non-reproducable issue dynamic domain based dropdownlist and bind parameter

    [JDeveloper 10.1.3. SU5]
    [JHeadstart 10.1.3. build 91]
    Hi,
    Some dropdown lists in our application, which are based on a dynamic dropdown list using a bind parameter (value for the parameter set in Application Definition File, property 'Query Bind Parameters', i.e. theCodeType=LANGUAGE) most of the time work fine, but sometimes (not structural, not reproducable) do not fill and throw the error "Missing IN or OUT parameter at index: 1".
    This is the case for example in LOV's with Advanced search: one of these advanced search fields uses such a dropdown. When entering the LOV, the error is sometimes raised (and the dropdown list is empty), but when you cancel and try again, it always fills successfully without error. So the mechanism works almost always, but in rare cases gives this error, but not always...and a retry always works as well.
    Sounds like a known error?
    Toine

    I have run into a similar issue recently, using Jdeveloper 10.1.3.1.0 (currently the latest release)
    It's intermittent and next to impossible to repeat. Here's the debug-output:
    ...sql query) QRSLT WHERE SOMEID = :Bind_Someid
    06/12/11 15:12:37 [7494] Bind params for ViewObject: SomeView2
    06/12/11 15:12:37 [7495] Binding param "Bind_Someid": 212
    06/12/11 15:12:37 [7496] ViewObject: SomeView2 close single-use prepared statements
    06/12/11 15:12:38 [7497] QueryCollection.executeQuery failed...
    06/12/11 15:12:38 [7498] java.sql.SQLException: Missing IN or OUT parameter at index:: 1
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
         at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1566)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2996)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3043)
         at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:857)
         at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:666)
         at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3655)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:742)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:687)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2657)
         at oracle.jbo.server.ViewRowSetIteratorImpl.refresh(ViewRowSetIteratorImpl.java:2915)
         at oracle.jbo.server.ViewRowSetImpl.notifyRefresh(ViewRowSetImpl.java:2085)
         at oracle.jbo.server.ViewRowSetImpl.refreshRowSet(ViewRowSetImpl.java:4839)
         at oracle.jbo.server.ViewRowSetIteratorImpl.notifyDetailRowSets(ViewRowSetIteratorImpl.java:3408)
         at oracle.jbo.server.ViewRowSetIteratorImpl.notifyNavigationToRow(ViewRowSetIteratorImpl.java:3549)
         at oracle.jbo.server.ViewRowSetIteratorImpl.notifyNavigation(ViewRowSetIteratorImpl.java:3509)
         at oracle.jbo.server.ViewRowSetIteratorImpl.internalSetCurrentRow(ViewRowSetIteratorImpl.java:3293)
         at oracle.jbo.server.ViewRowSetIteratorImpl.setCurrentRow(ViewRowSetIteratorImpl.java:1000)
         at oracle.jbo.server.ViewRowSetIteratorImpl.activateIteratorState(ViewRowSetIteratorImpl.java:3851)
         at oracle.jbo.server.ViewRowSetIteratorImpl.getRangeSize(ViewRowSetIteratorImpl.java:627)
         at oracle.jbo.server.ViewRowSetImpl.getRangeSize(ViewRowSetImpl.java:2251)
         at oracle.jbo.server.ViewObjectImpl.getRangeSize(ViewObjectImpl.java:6090)
         at oracle.adf.model.binding.DCIteratorBinding.initSourceRSI(DCIteratorBinding.java:1550)
         at oracle.adf.model.binding.DCIteratorBinding.callInitSourceRSI(DCIteratorBinding.java:1421)
         at oracle.adf.model.binding.DCIteratorBinding.getRowSetIterator(DCIteratorBinding.java:1404)
         at oracle.adf.model.binding.DCIteratorBinding.setRangeSize(DCIteratorBinding.java:2642)
         at oracle.adf.model.binding.DCBindingContainer.internalRefreshControl(DCBindingContainer.java:2487)
         at oracle.adf.model.binding.DCBindingContainer.refresh(DCBindingContainer.java:2260)
         at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.prepareModel(PageLifecycleImpl.java:99)
         at oracle.adf.controller.faces.lifecycle.FacesPageLifecycle.prepareModel(FacesPageLifecycle.java:73)
         at oracle.adf.controller.v2.lifecycle.Lifecycle$8.execute(Lifecycle.java:210)
         at oracle.adf.controller.v2.lifecycle.Lifecycle.executePhase(Lifecycle.java:116)
         at oracle.adf.controller.faces.lifecycle.ADFPhaseListener.mav$executePhase(ADFPhaseListener.java:33)
         at oracle.adf.controller.faces.lifecycle.ADFPhaseListener$4.after(ADFPhaseListener.java:331)
         at oracle.adf.controller.faces.lifecycle.ADFPhaseListener.afterPhase(ADFPhaseListener.java:94)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:254)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:231)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:200)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:122)
         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:106)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:619)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Once the problem occurs, it is persistent and is not resolved except by logging the user out (session.invalidate()) or starting a new session.
    Is there anything I can do to resolve this?

  • 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.

  • Help with Flex and DropDownList

    Hello everybody, i need another help
    i'm triyng to do the next in flex: using DropDownListi and Mysql DB, I want select to a product from a DropDownList after i select a corresponding brand for example:
    * Coca Cola
      -- Coca Cola Light
      -- Coca Cola Zero
      -- Coca Cola Regular
    * Pepsi
      -- Pepsi Light
      -- Pepsi regular
    those are products that i have on my DB, i get see on my first DropDownList all brand's but i can select any product, because i don't know how made that relation between DropDownList's, here is my code, can any body help me? PLEASE ????
    <?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="500" minHeight="600" backgroundColor="#F4BE55"
                      xmlns:employeeservice="services.employeeservice.*">
         <fx:Style source="Prueba8.css"/>
         <fx:Script>
              <![CDATA[
                   import com.adobe.serializers.utility.TypeUtility;
                   import mx.controls.Alert;
                   import mx.controls.Text;
                   import mx.events.FlexEvent;
                   import mx.rpc.events.ResultEvent;
                   import spark.events.IndexChangeEvent;
                   protected function marDr_creationCompleteHandler(event:FlexEvent):void
                        getMarcaResult.token = employeeService.getMarca();
                   protected function proDp_creationCompleteHandler(event:FlexEvent):void
                        getProductoByMarcaResult.token = employeeService.getProductoByMarca('Pep');
              ]]>
         </fx:Script>
         <fx:Declarations>
              <s:CallResponder id="getMarcaResult"/>
              <employeeservice:EmployeeService id="employeeService"
              fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)"
                     showBusyCursor="true"/>
              <s:CallResponder id="getProductoByMarcaResult"/>
         </fx:Declarations>
         <s:Label x="137" y="10" text="Prueba 1  -  Ejemplos" fontWeight="bold" fontSize="20"/>
         <s:DropDownList x="99" y="97" prompt="Selecciona Marca ..."
                             width="169" id="marDr"
                             creationComplete="marDr_creationCompleteHandler(event)"
                             labelField="marca"
                             cornerRadius="7"
                             borderColor="#BC660A"
                             chromeColor="#C76F20"
                             focusColor="#AA7A06"
                             selectionColor="#DFA055"
                             rollOverColor="#FFAB3E">
              <s:AsyncListView list="{getMarcaResult.lastResult}"/>
         </s:DropDownList>
         <s:DropDownList x="65" y="247" prompt="Seleccione el producto ..."
                             id="proDp" width="205"
                             creationComplete="proDp_creationCompleteHandler(event)"
                             labelField="ds_producto">
              <s:AsyncListView list="{TypeUtility.convertToCollection(getProductoByMarcaResult.lastResult)}"/>
         </s:DropDownList>
    </s:Application>
    and this is my service
    <?php
    class EmployeeService {
      var $username = "test";
      var $password = "12345";
      var $server = "192.168.0.194";
      var $port = "3306";
      var $databasename = "proyect";
      var $connection;
      public function __construct() {
        $this->connection = mysqli_connect(
                           $this->server, 
                           $this->username, 
                           $this->password,
                           $this->databasename,
                           $this->port
        $this->throwExceptionOnError($this->connection);
      public function getMarca() {
         $stmt = mysqli_prepare($this->connection,
              "select co_marca,
                      no_marca
               from cmm_d_marca");    
          $this->throwExceptionOnError();
          mysqli_stmt_execute($stmt);
          $this->throwExceptionOnError();
          $rows = array();
          mysqli_stmt_bind_result($stmt, $row->cod, $row->marca);
          while (mysqli_stmt_fetch($stmt)) {
              $rows[] = $row;
              $row = new stdClass();
              mysqli_stmt_bind_result($stmt,  $row->cod, $row->marca);
          mysqli_stmt_free_result($stmt);
          mysqli_close($this->connection);
          return $rows;
      public function getProductoByMarca($searchStr) {
         $stmt = mysqli_prepare($this->connection,
              "select id_producto,
                      co_marca,
                      ds_producto
              from cmm_f_producto
              where co_marca like ?");
          $this->throwExceptionOnError();
          mysqli_stmt_bind_param($stmt, 's', $searchStr);
          $this->throwExceptionOnError();
          mysqli_stmt_execute($stmt);
          $this->throwExceptionOnError();
          $rows = array();
          mysqli_stmt_bind_result($stmt, $row->id_producto, $row->co_marca,
                                  $row->ds_producto);
          while (mysqli_stmt_fetch($stmt)) {
              $rows[] = $row;
              $row = new stdClass();
              mysqli_stmt_bind_result($stmt, $row->id_producto, $row->co_marca,
                                  $row->ds_producto);
          mysqli_stmt_free_result($stmt);
          mysqli_close($this->connection);
          return $rows;
    ?>
    Please somebody help me i need a solution a soon as possible please . thank's.
    Juedvaga

    Hello evrybody, look I upload my project and i need help.
    all that i want is made dependents-->   combobox or dorpdownlist.
    there are 2 links into megaupload:
    Project : http://www.megaupload.com/?d=X6V25N8O
    DataBase : http://www.megaupload.com/?d=T6TLI3OL
    Please i need help this i have to finish this point to start with another point.

  • How to get textbox text inside Repeater based on specific row dropdownlist selection using JavaScript

    Hi All,
    I have dropdownlist and textbox controls inside repeater control. Suppose when i select specific dropdownlist i want get the value of selected item and mean while i want to get the textbox text which in the same row.
    <script type="text/javascript">
    var ddlType;
    function ddl(ddl) {
    ddlType = ddl.value;
    alert(ddlType);
    </script>
    <asp:Repeater ID="RepterDetails" runat="server"
    onitemdatabound="RepterDetails_ItemDataBound"
    onitemcommand="RepterDetails_ItemCommand" >
    <ItemTemplate>
    <tr>
    <td>
    <asp:DropDownList ID="ddlTypeName" runat="server" onchange="ddl(this)"></asp:DropDownList>
    </td>
    <td>
    <asp:TextBox ID="txtCode" runat="server" Text='<%#Eval("otaRoomTypeCode") %>' />
    </td>
    </tr>
    </ItemTemplate>
    </asp:Repeater>
    Using the javascript i got the selected dropdownlist selected value, how to get the textbox text which is in the same row.
    Please give me advice and please find the repeater control screenshot.
    Thanking You, Nagendra.

    This forum if for C# issues, please move your post to asp.net forum:  http://forums.asp.net/
    Thanks
    Fouad Roumieh

  • ALV with dropdown in column and other questions

    hi,
    I created an editable alv with configuration model via external context mapping.
    now I have a column which contains strings and my aim is to show this whole column as a dropdownlist. the possible values of this dropdown are fetched in a database table at  runtime and each cell in this column got its own selected value in this dropdownlist.
    changes of the selected values should be written in the database table in a later step.
    1. what changes do I have to do?
    should I remove my external mapping concerning the alv and use the setData method? or what is the easiest way to get my dropdownlist in this column instead of normal text (string) ?
    2. should I choose dropdownbykey or by index?
       I suppose I have to change the context when changing the selected value in the dropdownlist and the read out the changed context element and update my database table?
    3. how could I access rows (= tuples) in an alv?
    4. how can I avoid that a row could be deleted, inserted or added with the normal functions of the alv?

    Hi Thorsten,
    If the possible list of values in the dropdown is different for each row, you need a drop down by index. Else this can be done using a dropdown by key itself.
    The only change that you need to do is create a cell editor of type dropdown for that particular column and configure your ALV model.
    The sample code for changing the cell editor would be:
        l_alv_model = l_ref_interfacecontroller->get_model( ).
      DATA:
         lr_column_settings TYPE REF TO if_salv_wd_column_settings,
         lr_column type ref to CL_SALV_WD_COLUMN.
         lr_dropdown TYPE REF TO CL_SALV_WD_UIE_DROPDOWN_BY_KEY.
      lr_column_settings ?= l_alv_model.
      lr_column = lr_column_settings->get_column( <column name> ).
      CREATE OBJECT lr_dropdown EXPORTING 
      SELECTED_KEY_FIELDNAME= '<fieldname>'
      lr_column->set_cell_editor( lr_dropdown ).
    Here, you can substitute the field name with your field name that has to be displayed as a dropdown.
    The dropdown list can be populated in the wddoinit method by attaching a value set to the attribute in the context node info. Everything else will be like you do in a normal table. You can so a get_static_attributes of your elements and persist in tables. Whenever you change the selected value, the context will be updated immediately. You can have a user defined function like 'Save' or something where you can just read the context and process the data.
    If you do not want to display any of the normal functions, you can do the following:
    data: lt_functions type SALV_WD_T_FUNCTION_STD_REF,
            ls_function type SALV_WD_s_FUNCTION_STD_REF.
    lt_functions = l_alv_model->if_salv_wd_function_settings~get_functions_std( ).
    loop at lt_functions into ls_function.
    ls_function-r_function->set_visible( CL_WD_UIELEMENT=>E_VISIBLE-NONE ).
    endloop.
    The above code will hide all the standard functions. If you want to hide specific ones, do a get_function(id) and set_visible.
    Hope this helps.
    Regards
    Nithya

  • Using a DropDownList to filter data

    I am working on my first aspx/CR that uses controls on the page to filter the displayed data. I have a crystal report that by default pulls all warehouse data. It is comprised of two separate views. I have added a DropDownList to the aspx page to allow the user to select a single warehouse. I have the crystalReportViewer hidden by default and on the SelectedIndexChanged event of the DropDownList, I have the code to set the crystalReportViewer to visible. I have the code in the ConfigureCrystalReports() section to define the selection criteria. My code is as follows:
        private void ConfigureCrystalReports()
            if (!IsPostBack)
                crystalReportViewer.Visible = false;
            else
                string warehouse = ddlWarehouse.SelectedValue;
                string selectFormula = "{VW_CURRENT_INVENTORY_GL.WH}=" + warehouse;
                crystalReportViewer.SelectionFormula = selectFormula;
    <snipped>
        protected void ddlWarehouse_SelectedIndexChanged(object sender, EventArgs e)
            crystalReportViewer.Visible = true;
    The page loads with no errors and the report is hidden, but when I select a valid warehouse, I get this error because it's not capturing the value in the dropdownlist correctly:
    A number, currency amount, boolean, date, time, date-time, or string is expected here. Details: errorKind Error in File CURRINV_GL_NOLOT_PROD {7FCFCEBF-94D6-4DF0-BA8E-816763C625B8}.rpt: Error in formula Record Selection: '{VW_CURRENT_INVENTORY_GL.WH}=Select Warehouse' A number, currency amount, boolean, date, time, date-time, or string is expected here. Details: errorKind
    If I put Response.Write(selectFormula) right after the selectFormula is set, it's not getting the value in the DropDownList - it's keeping the generic "Select Warehouse" which is the default value in the dropdownlist. I tried moving that definition to the SelectedIndexChanged event, but it's not working correctly. I tried adding crystalReportViewer.DataBind() in the selectedindexchanged event but it's still not getting the updated value in the dropdownlist. I need that to fire anytime they change the value in the dropdownlist and then have the report refresh with the new data.

    I got this working right after I submitted this question. I ended up moving the whole selectFormula definition to the SelectedIndexChanged event and it works like a charm.

  • The Init() method of abstract pagebean always it excute, and i lost data.

    Hi,
    I have applicaction to buid in NetBean 6.1 and JDK 1.6 using Visual Web Java Server Pages. This application to present a view that have a 2 calendar component, 1 dropdownlist, button component and table component.
    The table component show rows where calendar1.date > date1 and calendar2.date < date2 and estado(DropDownList)= status1
    In the init() method of abstractpagebean i set de initial calendar's date that follow
    java.util.Calendar dateAntes = GregorianCalendar.getInstance();
    java.util.Calendar date = GregorianCalendar.getInstance();
    dateAntes.add(java.util.Calendar.MONTH, -1);
    GregorianCalendar gc = new GregorianCalendar(2000, 11, 20);
    //tablePhaseListener = getSessionBean1().getTablePhaseListener();
    calendar1.setSelectedDate(dateAntes.getTime());
    calendar2.setSelectedDate(date.getTime());
    With this initial dates dates i show the table row thw follow
    String command = "SELECT ALL codreqgmc, fechareq,cliente.nomclie,estado.Descripcion as Estado, " +
    "requerimiento.codtecnico, requerimiento.rutclie, requerimiento.codestado " +
    "FROM requerimiento,cliente,estado " +
    "WHERE requerimiento.rutclie=cliente.rutclie and requerimiento.codestado=estado.codestado and fechareq>=" + "'" + formatoFecha.format(calendar1.getSelectedDate()) + "'" +
    "AND fechareq<=" + "'" + formatoFecha.format(calendar2.getSelectedDate()) + "'";
    try {
    getSessionBean1().getRequerimientoRowSet().setCommand(command);
    getSessionBean1().getRequerimientoRowSet().getCommand();
    getSessionBean1().getRequerimientoDataProvider().refresh();
    } catch (Exception e) {
    error("No puede levantar comando");
    log("Cannot switch to person " +
    estados.getSelected().toString(), e);
    The DropDownList implement the ProcessValueChange Event with AutoSubmit On Change properties. At Change choise of DropDown List Component it trigger a event that and execute estados_processValueChange method that to show a table rows accord to the new filter (include the new calendar date if necessary that follow:
    String command = "SELECT ALL codreqgmc, fechareq,cliente.nomclie,estado.Descripcion as Estado, " +
    "requerimiento.codtecnico, requerimiento.rutclie, requerimiento.codestado " +
    "FROM requerimiento,cliente,estado " +
    "WHERE requerimiento.rutclie=cliente.rutclie and requerimiento.codestado=estado.codestado and fechareq>=" + "'" + formatoFecha.format(calendar1.getSelectedDate()) + "'" +
    "AND fechareq<=" + "'" + formatoFecha.format(calendar2.getSelectedDate()) + "'";
    try {
    getSessionBean1().getRequerimientoRowSet().setCommand(command + " AND requerimiento.codestado =" + "'" + (String) estados.getSelected() + "'");
    getSessionBean1().getRequerimientoRowSet().getCommand();
    getSessionBean1().getRequerimientoDataProvider().refresh();
    } catch (Exception e) {
    error("No puede levantar comando");
    log("Cannot switch to person " +
    estados.getSelected().toString(), e);
    The Table component have a column of checkbox type for select a particular(s) row(s). With a Button it to choose all the rows that has been to set checkbox, in the session bean to save this selected rows and link to another page that show the details about seletec rows.
    The Problem
    Every time that i press the button, after to the select the rows, for another page showme detail, this page is empty because it execute the init method before the button_action, to re initialize and erase the user selection and lost it
    I try with another component that trigger event, por exmaple dropdownlist, and it the same, even to press the pagin in teh table it execute init meth, re-initialize and erase all.
    Result prove
    1.- I execute the application for first time:
              Execute      Init()
    2.- I Chage choos en the DropDownList
              Execute      Init() and
              after           estado_processValueChange()
    3.- I change choos again in the DropDownList
              Execute      Init() and
              after           estado_processValueChange()
    4.- I press pagin button in table
              Execute      Init()
    5.- I press button detail, for detail
         Execute      Init() ----> I reinitialize and lost the user select.
         after          Butoon_action
    How ia can to preven that every time it execute init(),
    Why alway it execute init method?, the init methd() is for initialize application and not RE INTIALIZED
    Why is the relation INIT(); PREPROCESS(), PRERENDER(), PROCESSVALUECHANGE, BUTTON_ACTION. What it execute first, what secodn?
    I need execute init method only one , at first time
    I hope i undertandme, i not native english.
    Thank for advance

    Anupama,
    Do you mean init or wdDoInit? You cannot call the later as well as you cannot call any WD-framework methods that start with "wd" prefix.
    By the way, wdDoInit in component controller (do not confuse with custom controller or interface controller) is called before any other method in any controller. So I hardly believe that it is not called when your view become available.
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • Setting filterFunction on ArrayCollection acting as provider for DDL--and change handler not firing?

    Hi All,
    I've got a Spark DropDownList (I'm on Flex SDK 4.0, Flash Builder 4).
    That DropDownList has an ArrayCollection as its dataProvider property, and in response to user gestures, I change the filterFunction on the ArrayCollection (and call ArrayCollection.refresh()) to update the list of items in the DropDownList.  This works fine.
    However, what I wasn't expecting was that neither my change event handler, nor my valueCommit event handler gets called when the selected item in the DropDownList changes due to the filterFunction filtering out items from the ArrayCollection.
    In other words, let's say I have items A, B, and C in ArrayCollection (and thus, also as items in my DropDownList).  Item A is currently selected, but I then set the ArrayCollection.filterFunction to something, and call ArrayCollection.refresh().  Items A and B are filtered out by the filterFunction, and it disappears from the DropDownList, causing item C (the next available item after A and B) to be selected.  But, even though the selected item has changed, neither my change handler nor my valueCommit handler get called.
    I know the handlers are working, because the change handler gets called when the user selects a new item from the DropDownList, and the valueCommit handler gets called when the selectedIndex is changed programmatically in code, as expected.
    Is this a known issue?  Is there an event I can listen to so I can know when the selected item has changed in this circumstance?
      -Josh

    I'm not on a beta.  I'll try post a short test case as soon as I am able, but I'm in the final week before a major project deadline and as a result I've got to stay pretty focused on that :-)

  • Country ,state and city checklist XML by JAVA

    Hi friends,
    I have textboxes for entering the country ,state and city values and all these 3 fields are related by primary/foreign keys.
    I wan now store and retrieve values entered by users for country state and city by xml files .I also wan all these 3 field to be interrelated so that based on value of country I can populate the related states dropdownlist and based on value of state I can populate the related cities dropdownlist.Can some one pls answer my question about STORING AND RETRIEVING COUNTRY STATE AND CITY FIELDS USING XML FILES?
    I also did this application using string(short cut) way but is not efficient and all I want is direct modification in XML file by java?
    I didnt put my codes here bcos it so long and still if any one want my codes i wll email u sperately.
    All I need is any example approach for this kind?
    Any one help will be appreciated...

    Using XMLEncoder
    by Philip Milne
    This article covers advanced use of XMLEncoder, showing how it can be configured to create archives of any Java objects -- even when they don't follow the JavaBeans conventions. We include examples of how to make properties 'transient' and how to create archives that call constructors with arguments, use static factory methods, and perform non-standard initialization steps. We also cover exception notification, the 'owner' property (which can be used to a link an archive to the outside world), and methods for creating internationalized archives.
    http://java.sun.com/products/jfc/tsc/articles/persistence4/index.html

  • How to select items with selectedItem and selectedIndex?

    Hello.
    I'm trying to selected and item in both a dropdownlist and combobox using selectedItem or selectedIndex properties. They don't work
    Browing internet I found a lot of people with the same problem, that was already know in 2008.
    The easy commands ddcompontent.selectedIndex = value or ddcomponent.selectedItem = item don't work.
    Can anyone help me?
    I couldn't find any solution.
    thank you
    Pbesi

    Without seeing your code it's hard to tell where you are going wrong.
    I have comboboxes which I need to set to the last value selected.
    I wrote a function like this, and it works fine for my needs.  Given you know the value you want to select.  if you know the index of the item already then you should just be able to set that.
    private function setCmb(cbx:ComboBox, val:String):void
    var arrC:ArrayCollection = cbx.dataProvider as ArrayCollection; 
    for (var i: int = 0; i < arrC.length; i++) { 
    var pe:String = arrC.getItemAt(i) as String; 
    if ( val == pe) {cbx.selectedIndex = i;
    break;}

Maybe you are looking for

  • How to use Flash Skin in Dreamweaver 8

    Hi, I'd like to use a Flash Video Skin (SteelExternalPlaySeekMute) that came with Flash 8, in Dreamweave. I copied the skin file (SteelExternalPlaySeekMute.swf) into Dreamweaver's Configuration>Templates>Video_Control folder, but although I see the s

  • Pdf form imported to be Interactive in WDA?

    Hello WDA Group,    I have a .pdf file that was created in Netweaver Dev Studio. The XML file is also available. Is it possible to somehow put this somewhere.... possibly in a MIME folder for a specific WDA, then import and use it as an Adobe Interac

  • Help!!!  2009 Macbook Starts up in OS X Disk Utilities

    So I was trying to fix Microsoft Word. I was looking up one of the forums and it told me to press the "option" key when I start it up. Not too sure what I did but I clicked on the hrd drive with my name on it and  but now every time I start it up, it

  • Game Map Making

    I got a problem, not too sure how to go about doing this coding wise. What i do is load in an image (a strip of multiple images), make it a bufferedImage, Then i paint my Canvas by doing a dbl for loop, getting the subimage, and painting that. So now

  • WAD Graph-  Value Axis display value with commas

    Hi Gurus, In the WAD graph Value Axis displaying the value from 0 to 40000 like below 40000. 30000. 20000. 10000.         0. But we want to display with comma for every 3 digits(1000). like 40,000. 30,000. 20,000. 10,000.           0. Please do needf