DropDown problem

Hi all,
I fill a dropdown from database fields,that is working very nice.
Now, I would like to add a new line in first position in this dropdown.
I've read a few subject asking about it on the forum, but none has answered to my question, because of the JSP instructions don't seem to be the same....
Here is the interesting code of my JSP page :
<ui:dropDown binding="#{customer_search.dd1}" id="dd1"
items="#{customer_search.app_userDataProvider.options['app_user.EMPLOYEE_ID,app_user.LOGIN']}"
style="left: 600px; top: 504px; position: absolute; width: 192px" styleClass="edit-box"/> And this is the java source :
private void _init() throws Exception {
        if(getSessionBean1().getUser_seq() == 0){
                this.getExternalContext().redirect("./login.jsp");
        if(getSessionBean1().getAccess_level()!=1)
            lbl8.setVisible(false);
            dd1.setVisible(false);
        customer_listRowSet.setInt(1,getSessionBean1().getUser_seq());
        customer_listDataProvider.setCachedRowSet((javax.sql.rowset.CachedRowSet)getValue("#{customer_search.customer_listRowSet}"));
        app_userRowSet.setDataSourceName("java:comp/env/jdbc/mos_data");
        app_userRowSet.setCommand("SELECT app_user.SEQ,app_user.EMPLOYEE_ID,app_user.LOGIN FROM app_user WHERE app_user.SEQ<>? ORDER BY app_user.LOGIN");
        app_userRowSet.setInt(1,getSessionBean1().getUser_seq());
        app_userRowSet.setTableName("app_user");
        app_userDataProvider.setCachedRowSet((javax.sql.rowset.CachedRowSet)getValue("#{customer_search.app_userRowSet}"));
    private DropDown dd1 = new DropDown();
    public DropDown getDd1() {
        return dd1;
    public void setDd1(DropDown dd) {
        this.dd1 = dd;
    }Does anyone know what's the way to add a line in first position in this dropdown?
Thanks for your comments.
Nicolas

Using the employee table from the VIR database as an example.
Drop the employee table on the page
Add a read-only property named nameOptionsList of type com.sun.rave.web.ui.model.Option[] to the page.
Add this to the bottom of the init method.
        try {
            int listSize = employeeDataProvider.getRowCount() +1;
            log("row count " + listSize);
            this.nameOptionsList =  new Option[listSize];
            Option opt = new Option("none", "[Select One]");
            int i=0;
            nameOptionsList[i] = opt;
            employeeDataProvider.cursorFirst();         
            do {
                i++;
                String dbName =
                        (String)employeeDataProvider.getValue(
                        "EMPLOYEE.FIRSTNAME");
                log("dbName: " + dbName);
                String dbId =
                        employeeDataProvider.getValue("EMPLOYEE.ID").toString();
                opt = new Option(dbId, dbName);
                log("dbId:"+dbId);
                nameOptionsList[i] = opt;
            } while (employeeDataProvider.cursorNext());
        } catch (Exception ex) {
            throw new FacesException(ex);
        }This tutorial shows how to build an options list for a drop-down list or a listbox: http://developers.sun.com/prodtech/javatools/jscreator/learning/t

Similar Messages

  • Adobe Interactive forms for WD java Portal dropdown problem

    Hi  Forum Gurus,
    Need an urgent help from you.
    We are facing the Drop down data display problem in the MSS PCR SPEG standard adobe form.
    We are using to display the form via portal and have changed the layout from ZCI to Standard.
    The dropdowns for this form is not getting populated and is blank. However, we have not customized anything and we were able to see the data previously.
    Please come out with your ideas.
    Thank you in advance.
    Points will be rewarded.
    Regards,
    Laxmikant.
    Edited by: Laxmikant Pandit on Oct 2, 2008 10:20 AM

    Hello Friends,
    I am also getting the same error. Can anyone please help.
    Regards,
    Mickey.

  • How can I solve this nested IView / empty dropdown problem?

    Hello VC experts,
    I've got a VC model with a nested IView that contains drop down lists.
    As long as the nested IView was only used in one place, everything was fine.
    Then I used the nested IView in a second place, and this caused the following problems: After deployment, the dropdowns were empty in the place where the nested IView was already used previously, in the second place everything was OK. The dropdowns display an empty field, and when I click on them as if to select an item it 'drops down' but again there's just one line that is empty, i.e. white.
    Did you experience this before?
    How can I solve this?
    Kind regards,
    Florian

    Hello,
    Just had the idea that I could try posting the .gml file in here. Lets see if that works.
    <?xml version="1.0" encoding="utf-8"?>
    <GMLPACK kit="EP" version="700.11" build="0027" model_name="error_dropdown_nestediview" model_schema_version="1.01" reserved="VisualComposer04"><GMLUNITS><AAA3FUF name="error_dropdown_nestediview" modified="14/01/2008 12:00:37" metadata="LOGLOCATION:" orig_guid="GM127189c0daec11dca6307abae1e458be"><AAD3FUG name="iView 3FUG" parent="AAA3FUF" win_type="SUB" win_scale="AUTO" win_layout="AUTO" win_pattern="STD" win_navigator="STD1" win_caption="true" pos="700 175" author="Public" modified="14/02/2008 12:29:06" orig_guid="GM0c091400daf011dc9e907abae1e458be"><ACA3FUH name="Form1" parent="AAD3FUG" box_style="0" box_features="TTL EDT" box_size="320 160" form_layout="ABS" labels_align="BEFORE" overflow="EXC" pos="550 210" box_pos="8 8" orig_guid="GM0c091401daf011dcbb437abae1e458be" fields="{DD:{type:'10',add:'V',ctl:'8',show:'Y',text:'Dd',dsg:'15',ownEnum:'#ID[AXC3FUK]',useEnum:'#ID[AXC3FUK]',pos:'100 8',size:'120 16'}}"><AEA3FUI name="in" parent="ACA3FUH" role="IN" spec="UI_OBJ_IN" anchor="L15" pos="0 15" orig_guid="GM0c091402daf011dcbc867abae1e458be"/><AEA3FUJ name="out" parent="ACA3FUH" role="OUT" spec="UI_OBJ_OUT" anchor="R15" pos="80 15" orig_guid="GM0c091403daf011dcbf157abae1e458be"/><AXC3FUK name="ENUM[ACA3FUH:DD]" parent="ACA3FUH" enumMap="apple:apple;orange:orange" orig_guid="GM0c091404daf011dcb5a97abae1e458be"/></ACA3FUH></AAD3FUG><AAD3FUL name="iView 3FUL" parent="AAA3FUF" win_type="TOP" win_scale="AUTO" win_layout="AUTO" win_pattern="STD" win_navigator="STD1" win_caption="true" pos="435 235" author="Public" modified="14/02/2008 12:29:06" orig_guid="GM0c091405daf011dcaad47abae1e458be"><ACG3FUM name="iView 3FUG" parent="AAD3FUL" box_style="0" box_features="TTL" box_size="680 328" pos="445 200" box_pos="8 8" trg_unit="#ID[AAD3FUG]" orig_guid="GM0c091406daf011dca6c97abae1e458be" fields="{}"/><ACG3FUN name="iView 3FUG" parent="AAD3FUL" box_style="0" box_features="TTL" box_size="680 336" pos="660 200" box_pos="8 344" trg_unit="#ID[AAD3FUG]" orig_guid="GM0c091407daf011dca0567abae1e458be" fields="{}"/></AAD3FUL></AAA3FUF></GMLUNITS><enums/><IMAGES/><TRANSPORTLOG/></GMLPACK>
    I think if you save this as 'error_dropdown_nestediview.gml' you could reimport it into your model.
    Lets see.
    Best regards,
    Florian

  • Small Dropdown problem in Jdeveloper

    hi, i am using Jdeveloper 10.1.2.1.0. i have dropdown containing few fields and when i try to run the jsp page the first field in the dropdown is automatically get selected and i want some thing like, unless i select the dropdown and click on what i needed it should not take or consider any field in my query. can any one help me to find the solution for this.
    this is the source code in JSP for my dropdown.
    <tr>
    <td>
    <c:out value="${bindings['AssetGroup'].label}"/>
    </td>
    <td>
    <html:select property="AssetGroup1">
    <html:optionsCollection label="prompt" value="index" property="AssetGroup1.displayData"/>
    </html:select>
    </td>
    </tr>
    regards
    Nag

    This is happening because there is a default value set for the drop down list.
    A good start for you is to look through some standard html form examples of using drop down lists to get a good understanding of how they function. Then apply this knowledge to the ADF/JSP example that you have.
    Also look in the properties panel (usually lower right hand corner of JDeveloper) when you have selected the drop down list in question and you should see one called VALUE. This is the default value that is being set in your drop down, you should be able to edit it from here as well as via the code.
    As for catching the fact that a user has not selected something from the drop down or indeed not completed the form as you would like them to prior to submitting, I'm presuming that you are using ADF - you need to add a data action and over ride the validate function for the form.
    For example:
    if your form just requires the user to enter a username and password, and presently has a start.jsp page that forwards to a main.jsp page. You need to add a data action (and for example call it validate) between the two (i.e. start --> validate --> main). Then set the property of the validate data action to carry out validation, and then in the java bean that holds the data for the form (i.e. username and password) extend the data action method and write a validate method as appropriate, in this case ensuring that a username and password have been entered. This method will then through actionErrors that can be displayed on the login page if they are indeed caught.
    This is a bit tricky to explain, if I remember correctly the toy store example demonstrates this functionality.
    Hope this is of some help to you
    David

  • JSP dropdown problem

    Hi all,
    in my controller its like this:
    req.setAttribute(aName,aCollection);
    which should be used for dropdown list in my jsp.
    i used like this in my JSP:
    <html:select property="item" styleId="item">
    <html:option value="">Please Select</html:option>
    <%ArrayList aList = (ArrayList) request.getAttribute(aName);
    Iterator i = aList.iterator();
    while (i.hasNext()) {
         String itemValue = (String) i.next();%>
                             <html:option value="<%=itemValue%>">
                                  <%=itemValue%>
                             </html:option>
                             <%}%>
                        </html:select>
    when i run this on server it doesn't work.
    any ideas please le me know
    regards and thanks in advance

    I cant run the code from where I am, but your loop looks ok.
    I would suggest you check your html, is the following correct:
    <html:option value="">Please Select</html:option>
    You have open and closing "" together, I dont think this is correct.
    Also in your loop the syntax is different again:
    <html:option value="<%=itemValue%>">
    I cannot remember off hand which is correct.
    If you are really stuck, create a static list that works, then "view source" in the browser for your jsp generated list and compare the html output, this should show you exactly where you are going wrong.

  • Problem with dropdown

    Hi,
    My dropdown which i am using in a table , always selects the first value. Wen i click on other values , i am able to retrive the values and process them but again the first value of dropdown is selected and not the value which i selected.
    Thanks,
    Pris.

    Hi Pris,
    Please paste your code, so that we can help you.
    For same type of problem see this thread [DROPDOWN PROBLEM|Re: How to get a listbox return value;.
    May it helps you.
    Regards.
    DS.

  • Working of ComboBox in JSP

    I am new to jsp programming. I have no idea how to navigate if there is two dropdownlist. Here second one depends on the first one then should i have to design two pages with sam dessign?
    I have checked the url
    http://forum.java.sun.com/editwatches!default.jspa
    thsi page contains two comboboxes. I have selected java essentials from first combo. Then it got redirected to another page.
    with the url
    http://forum.java.sun.com/editwatches!default.jspa?filterCat=5
    When I checked the view source of http://forum.java.sun.com/editwatches!default.jspa
    I have seen something like this...
    <select name="filterForum"
    onchange="location.href='editwatches!default.jspa?filterForum='+this.options[this.selectedIndex].value+'&filterCat='+this.form.filterCat.options[this.form.filterCat.selectedIndex].value;">
    In the above code what do they mean by location?
    Please reply me
    Thanks in advance

    Hi,
    Well if you are looking for Dependent Dropdown problem...
    There are many solutions in order acheive this...
    checkout some of those...
    1).Save the present of the Form in a Bean with the scope of session and onChange of the first Combo box redirect it to a Controller(Servlet) Query the Database and save the results in the FormBean which we saved in the scope session and then redirect the formBean to the same JSP again...and now repopulate the second combo with new obtained results from the database and repopulate the rest of the form according to present FormBean state from the session.
    Here is a Typical example for you
    Assuming that a Servlet had already preloaded the first drop-down values from the database in a FormBean
    FormBean.java
    =============
    public class FormBean{
    private String firstDDValue = new String("");
    private ArrayList firstDDOptions = new ArrayList();
    private String secondDDValue = new String();
    private ArrayList secondDDOptions = new ArrayList();
    // Setters & getters for all the bean properties.
    }Form.jsp:
    =========
    <jsp:useBean id="formBean" class="com.formbeans.FormBean" scope="session"/>
    <%
      ArrayList fristDD = formBean.getFirstDDOptions();
      ArrayList secondDD = formBean.getSecondDDOptions();
      String firstDDValue = formBean.getFirstDDValue();
      String secondDDValue = formBean.getSecondDDValue();
      int FDSIZE = fristDD.size();
      int SDSIZE = secondDD.size();
    %>
    <form name="formBean">
    First DropDown:
    <select name="firstDropDown" onChange="if(this.value != '-1')window.location.href='ControlerServlet?firstDropDown='+escape(this.value);" >
    <option value="-1">Pick One</option>
    <%for(int i = 0;i < FDSIZE ; i++){
        String value = ((String[])firstDDOptions.get(i))[0];
        String text = ((String[])firstDDOptions.get(i))[1];
    %>
      <%if(value.equals(firstDDValue){)%>
       <option value="<%=value%>" selected="selected"><%=text%></option>
      <%}else{%>
       <option value="<%=value%>"><%=text%></option>
      <%}%>
    <%}%>
    </select>
    <BR/>
    <BR/>
    Second DropDown:
    <select name="secondDropDown">
    <option value="-1">Pick One</option>
    <%for(int i = 0;i < FDSIZE ; i++){
        String value = ((String[])secondDDOptions.get(i))[0];
        String text = ((String[])secondDDOptions.get(i))[1];
    %>
      <%if(value.equals(secondDDValue){)%>
       <option value="<%=value%>" selected="selected"><%=text%></option>
      <%}else{%>
       <option value="<%=value%>"><%=text%></option>
      <%}%>
    <%}%>
    </select>
    <BR/>
    <BR/>
    </form> NOTE: It would be a better practise if you can make use of JSTL tags to render the page in to make your View Page look more cleaner
    ControlerServlet.java
    =====================
    public doGet(request,response){
    String firstDropDown = request.getParameter("firstDropDown");
    HttpSession session = request.getSession();
    FormBean fb = (FormBean) session.getAttribute("formBean");
    fb.setFirstDDValue(firstDropDown); 
    fb.setSecondDDOptions(DAODelegate.getSecondDropDownData(firstDropDown));
    session.setAttribute(""formBean",fb);
    response.sendRedirect("/Form.jsp");
    }2).Make use of a Hidden IFrame by using which you reload the page and then Reload a Page after getting values from the database update the parent frame combo accordingly.
    3).Take help of AJAX call a Controller get the Response in XML/JSON and parse it and then update the second combo by the XML/JSON response.
    checkout an example by you can achieve this.
    index.jsp:
    =======
    <%@page language="java" %>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>Automatic Dependent Drop-Down Updation</title>
         <script language="javascript">
          // Global Variable for XmlHttp Request Object  
          var xmlhttp
          // Timer Variables
          var c = 0
          var t
           /* A function which calls a servlet  named AjaxServlet to get XmlData using XmlHttpObject */    
            function refreshCombo(txt){
                xmlhttp = null
                // code for initializing XmlHttpRequest Object On Browsers like  Mozilla, etc.
                if (window.XMLHttpRequest){
                     xmlhttp = new XMLHttpRequest()
                // code for initializing XmlHttpRequest Object On Browsers like IE
               else if (window.ActiveXObject) {
                   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP")
               if (xmlhttp != null){
                  // Setting the Servlet url to get XmlData
                   url = "AjaxServlet?req="+txt;
                   // Course of Action That Should be Made if their is a change in XmlHttpRequest Object ReadyState NOTE : it is 4 when it has got request from CGI
                   xmlhttp.onreadystatechange = getResponseAction;
                   // Open the Request by passing Type of Request & CGI URL
                   xmlhttp.open("GET",url,true);
                   // Sending URL Encoded Data
                   xmlhttp.send(null);
               else{
                 // Only Broswers like IE 5.0,Mozilla & all other browser which support XML data Supports AJAX Technology
                 // In the Below case it looks as if the browser is not compatiable
                  alert("Your browser does not support XMLHTTP.")
          /* Used for verifing right ReadyState & Status of XmlHttpRequest Object returns true if it is verified */
          function verifyReadyState(obj){
             // As Said above if XmlHttp.ReadyState == 4 then the Page Has got Response from WebServer
              if(obj.readyState == 4){
               // Similarly if XmlHttp.status == 200 it means that we have got a Valid response from the WebServer
                if(obj.status == 200){               
                    return true
                 else{
                    alert("Problem retrieving XML data")
          /* Action that has to take place after getting reponse */
          function getResponseAction(){
              // Verifying State & Status
              if(verifyReadyState(xmlhttp) == true){
                  // Building a DOM parser from Response Object
                  var response = xmlhttp.responseXML.documentElement
                  // Deleting all the Present Elements in the Drop-Down Box
                  drRemove()      
                  // Checking for the Root Node Tag
                  var x = response.getElementsByTagName("option")
                  var val
                  var tex
                  var optn
                  for(var i = 0;i < x.length; i++){
                     optn = document.createElement("OPTION")
                     var er
                     // Checking for the tag which holds the value of the Drop-Down combo element
                     val = x.getElementsByTagName("val")
    try{
    // Assigning the value to a Drop-Down Set Element
    optn.value = val[0].firstChild.data
    } catch(er){
    // Checking for the tag which holds the Text of the Drop-Down combo element
    tex = x[i].getElementsByTagName("text")
    try{
    // Assigning the Text to a Drop-Down Set Element
    optn.text = tex[0].firstChild.data
    } catch(er){
    // Adding the Set Element to the Drop-Down
    document.SampleForm.state.options.add(optn)
    /* Function removes all the elements in the Drop-Down */
    function drRemove(){
    document.SampleForm.state.options.length = 0;
    </script>
    </head>
    <body>
    <pre> <h1>Refresh Drop-Down <div id='txt'> </div> </h1></pre>
    <form name="SampleForm">
    <table align="center">
    <tr>
    <td>Country:</td>
    <td>
    <select name="country" onchange="refreshCombo(this.value)">
    <option value="india">INDIA</option>
    <option value="US">United States</option>
    <option value="UK">United Kingdom</option>
    <option value="Saudi">Saudi</option>
    </select>
    </td>
    </tr>
    <tr>
    <td>State:</td>
    <td>
    <select name="state">
    <option value="-1">Pick One</option>
    </select>
    </td>
    </tr>
    </form>
    </body>
    </html>
    AjaxServlet.java:
    =============
    * AjaxServlet.java
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    * @author RaHuL
    * @version
    public class AjaxServlet extends HttpServlet {
        /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
         * @param request servlet request
         * @param response servlet response
        protected void processRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            // Sets the content type made to xml specific
            response.setContentType("text/xml");
            response.setHeader("pragma","no-cache");
            response.setHeader("Cache-Control","no-cache");
            response.setHeader("Cache-Control","no-store");
           //Initializing PrintWriter
            PrintWriter out = response.getWriter();
            String req = request.getParameter("req");
            // Creating an instance of XmlBean Which generates XmlData From Business Logic specified
            XmlBean xml = new XmlBean(req);
            // Method to Generate XMLDATA
            String buffer = xml.getXmlData();
            // If Close of DB connections are succefull then write the content to the printstream
            if(xml.close() == true)
                out.write(buffer);   
            out.flush();                 
            out.close();
        protected void doGet(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            // Calls a Method called processRequest Which Processes the request which was made by the Browser Page
            processRequest(request, response);
    }XmlBean.java:
    ===========
    * XmlBean.java
    import java.sql.*;
    import java.util.*;
    import java.io.*;
    * @author RaHuL
    public class XmlBean {
        private Connection con = null;
        private PreparedStatement pstmt = null;
        private ResultSet rs = null;
        private String req;
        // Setting CLASSURL path to TYPE I Driver
        private String CLASSURL = "sun.jdbc.odbc.JdbcOdbcDriver";
        /* Specifing CONNECTION PATH to a DSN named TestDsn
         * Please Make Sure you create a DSN Named TestDsn to your database which holds EMP table
        private String CONNECTIONURL = "jdbc:odbc:TestDsn";
        boolean IS_ESTABLISHED = false;
        /** Creates a new instance of XmlBean and also establishes DB Connections */
        public XmlBean(String req) {
            try{
                this.req = req;
                Class.forName(CLASSURL);
                con = DriverManager.getConnection(CONNECTIONURL,"admin","");
                IS_ESTABLISHED = true;
            } catch(SQLException sqe){
                sqe.printStackTrace();
            } catch(Exception exp){
                exp.printStackTrace();
        /* Generates XmlData For the Business Logic Specified */
        public String getXmlData(){
            String XmlBuffer = "";
            if(IS_ESTABLISHED == true){
                try{
                    pstmt = con.prepareStatement("SELECT stateid,statename FROM EMP where countryid=' "+req+" ' " );
                    rs = pstmt.executeQuery();
                    if(rs != null){
                        XmlBuffer = XmlBuffer + "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
                        XmlBuffer = XmlBuffer + "<!--  Edited by Rahul Sharma -->";
                        // Root Node
                        XmlBuffer = XmlBuffer + "<dropdown>";
                        while(rs.next()){
                            String value = rs.getString(1);
                            String text = rs.getString(2);
                            // Sub-root Node
                            XmlBuffer = XmlBuffer + "<option>";
                            // node which holds value of drop-down combo
                            XmlBuffer = XmlBuffer + "<val>"+value+"</val>";
                            // node which holds text for drop-down combo
                            XmlBuffer = XmlBuffer + "<text>"+text+"</text>";
                            XmlBuffer = XmlBuffer + "</option>";
                        XmlBuffer = XmlBuffer + "</dropdown>";
                }catch(SQLException sqe){
                    sqe.printStackTrace();
                } catch(Exception exp){
                    exp.printStackTrace();
            return(XmlBuffer);
        /* Closes the DB Connection Conmpletely */
        public  boolean close(){
            if(IS_ESTABLISHED == true){
                try{
                    pstmt.close();
                    con.close();
                    return(true);
                } catch(SQLException sqe){
                    sqe.printStackTrace();
                } catch(Exception exp){
                    exp.printStackTrace();
            return(false);
    }Sample XML Reponse generated:
    <?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>
    <!--  Edited by Rahul Sharma -->
    <dropdown>
    <option>
    <val>DEL</val>
    <val>New Delhi</val>
    </option>
    <option>
    <val>HAR</val>
    <val>HARYANA</val>
    </option>
    </dropdown>for further reference you may use the below articles
    http://www.it-eye.nl/weblog/2005/12/13/ajax-in-struts-implementing-dependend-select-boxes/
    http://www.it-eye.nl/weblog/2006/04/04/implementing-dependent-select-boxes-in-jsf/
    Hope this might help,if that does do not forget to assign/distribute Duke Stars which you have promised :)
    REGARDS,
    RaHuL

  • Problem with DropDown in a table

    Hello,
    I have created a table with some elements and a drowndown. My problem is if I choose an entry in the drowndown menu in one row and select another row, evertime time the new chosen dropdown entry will overwrite all the other choosen entrys in the other dropdowns. How can I fix that? If I work with local simple types it works, but in my case I get the entrys from a context node mapped to an external RFC interface.
    Any ideas?
    Regards,
    Frank

    Hm, in my case, I get three rows but the entries for the drowdown are only shown in the first row, the dropdowns of the other two rows are empty. Here is the source code I use. The Node Po_Items_Copy is the table node and T_Coinnen_Copy the dropdown node:
    for (int i=0; i<3; i++){
    IPrivateKontierungView.IPo_Items_CopyElement Text = wdContext.createPo_Items_CopyElement();
              Text.setShort_Text_Copy("Test1"+i);
              wdContext.nodePo_Items_Copy().addElement(Text);
              for (int j=0; j<4; j++) {
                   IPrivateKontierungView.IT_Coinnen_CopyElement Dropdown = wdContext.createT_Coinnen_CopyElement();
                   Dropdown.setAufnr("Test2"+j);
                   wdContext.nodeT_Coinnen_Copy().addElement(Dropdown);
    Regards,
    Frank

  • Problem with Flash video/dropdowns in Mozilla

    Am trying to add a flash video to a webpage using a
    Dreamweaver extension called Active Slideshow Pro by DMXZone.
    The page can be viewed: www.faith.org.uk/Testindex.html
    In IE7 it works fine. The video shows and the dropdowns of
    the menu work correctly.
    In Mozilla Firefox the video works but the dropdowns do not
    show.
    If I remove the block of coding which is generated by the
    DMXZone extension:
    <object
    classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"
    width="514" height="129" id="testshow" align="middle">
    <param name="FlashVars"
    value="xmlFile=testshow.xml&preloaderBackColor=0x0099FF&preloaderBorderColor=0xCCCCCC"
    />
    <param name="movie" value="slideshowpro.swf" />
    <param name="quality" value="best" />
    <param name="scale" value="noscale" />
    <param name="wmode" value="transparent" />
    <param name="bgcolor" value="#000000" />
    <embed src="slideshowpro.swf" id="testshow"
    wmode="transparent" quality="best"
    flashvars="xmlFile=testshow.xml&preloaderBackColor=0x0099FF&preloaderBorderColor=0xCCCCCC "
    scale="noscale" bgcolor="#000000"
    type="application/x-shockwave-flash" width="514" height="129"
    pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    />
    </object>
    The page works in both browsers and the menu dropdowns appear
    correctly.
    I would be most grateful for anyone's advice on this.

    A discussion with Adobe support lends the idea that MPEG
    layer 4 might be an issue. That since these videos come from DVD
    perhaps encoded with MPEG layer 4 that that could be the reason tha
    all of them have this problem. (Some were done using AVI - I have
    to check and see if that makes a difference)
    BUT
    According to the PDF from Adobe Design - Flash Video Encoder
    Wizard - By Tom Green and Jordan L. Chilcott
    Flash should be able to convert an MPEG4 file. (Well it does
    but they all stop after 30 sec.) Now how do I solve this problem?
    All the videos still stop after 30 sec.s
    quote snip snip>>
    Flash Video Encoder Wizard
    By Tom Green and Jordan L. Chilcott
    The first thing you have to understand about the use of video
    in Flash® is the original
    video must be converted to a format Flash can read. This
    format is FLV (Flash Video)
    and you can either use Flash, the Flash Video Encoder, or
    third-party software to
    create the FLV file. If you use video-editing software such
    as Adobe® After Effects®,
    you can also export the file as a FLV file. If you are a
    Dreamweaver® user, the current
    version of Dreamweaver—Dreamweaver 8—contains a
    feature that allows you to add
    an FLV at the click of a button.
    The purpose of the Encoder, therefore, is to convert the
    video file to the FLV format.
    When you installed Flash Professional 8, the Flash Video
    Encoder application was
    also installed on your machine. If you also have QuickTime,
    Adobe After Effects,
    Avid Studio, or Final Cut Pro installed on your machine,
    they, too, were given the
    capability to use the Encoder when it was installed.
    If you will be converting a video to the FLV format, the
    video must be in one of
    these formats:
    • AVI—Audio Video Interleave
    • MOV—QuickTime 4 or later
    • MPEG—Motion Picture Experts Group

  • New insight into my dropdown list problems: loss of session info

    I tried again, this time with NetBeans 5.5.1 (with Tomcat 5.5.17) and stepped through my code; code executed as a result of selecting an item in the second, misbehaving dropdown box.
    I have this function:
        public void prerender() {
            SessionBean1 sb = this.getSessionBean1();
            sb.setPortfolio_id(0);
            this.getDropDown2().setSelected(ddsi);
        }This uses a private data member:
    Object ddsi = null;
    And here is my value changed event handler for this combobox:
        public void dropDown2_processValueChange(ValueChangeEvent event) {
            SessionBean1 sb = this.getSessionBean1();
            String sp_id = (String) this.getDropDown2().getValue();
            ddsi = event.getNewValue();
            String desc = (String) ddsi;
            Long Ldesc = new Long(desc);
            long p_id = Ldesc.longValue();
            sb.setPortfolio_id(p_id); 
            this.getFacesContext().getCurrentInstance().renderResponse();
        }As you can see, I am trying to ensure that the value selected is preserved and used the next time the item is rendered.
    sb.setPortfolio_id(p_id); is a trivial setter function (taking a long argument) for the property portfolio_id.
    When I step through this code, at every step along the way, I see the correct value for p_id! The correct value is passed to the session bean! And I even see the correct value in ddsi when the function "prerender" is executed. However, it seems that this information is lost when the page is actually rendered.
    And, when the servlet that produces the image that is to be displayed on the page checks the session bean, the session bean has the default value (0) for the portfolio_id property rather than the the value (30) that had been passed to the session bean.
    It is as if the session information has been lost, or a new session bean is provided each time the page is rendered.
    The only additional clue is this (found in Tomcat's output);
    com.sun.rave.web.ui.component.DropDown::The current value of component form1:dropDown2 does not match any of the selections.
    Did you forget to reset the value after changing the options?
    Why is this happening? I know full well that at the time the value in dropdown2 is changed, the value in dropdown1 has not, and therefore the value passed to dropDown2 IS in the list of selections. But, when the value in dropDown1 is changed, the list of options in dropDown2 is changed. I wonder if the valueChanged event handler for dropdown1 is being executed every time the page is rendered, forcing dropDown2 to "forget" what was selected, and somehow losing the session info at the same time?????????
    Any ideas?
    Thanks
    Ted

    Upgrading to itunes 7.0 just cost me 2 days of messing around and in the end I had to revert back to v6.0 and resore my lib.
    Apple CS was good but did not belly up the fact that 7.0 is defective in some cases and in the end told me I had a hardware problem!
    The main issue is that I could not get itunes 7.0 to see my ipod (very infrequently after a hard boot I would see it but would not be able to upload anything). Worked(s) 100% with v 6.0.
    This is very defintey 1/2 baked following in the steps of the other well known producers of sw that is not always functional/buggy the first time around.
    My computer is a x40 IBM laptop with xp sp2. Will have to wait a few more weeks to see how this pans out.
    IBM X40 Windows XP

  • Table Control Dropdown List Problem

    Hi,
    I have this problem with my table control.
    I now have an input field (with input help) called: Reference Table, as well as a table control.
    What i need is to select the table names (select from the Reference table input help) and the field names will be populated inside the table control (according to the field names inside the respective tables) as a dropdown list.
    Refer to this diagram if unclear: http://img166.imageshack.us/img166/1066/tablecontrolwt4.png
    Please give me sample codes as i really need help.
    Will reward marks if useful.
    thanks a lot.
    Below is my codes:
    *& Report  ZHERA_TABLE3
    REPORT  ZHERA_TABLE3_EVONNE.
    DATA: P_HERA TYPE DNTAB-TABNAME VALUE 'Z07P4_REF',
           ITAB_HERA TYPE TABLE OF Z07P4_REF,
           FIELD_COUNT TYPE I,
           WA_HERA LIKE LINE OF ITAB_HERA.
    SELECT * INTO TABLE ITAB_HERA FROM Z07P4_REF.
    START-OF-SELECTION.
    CALL SCREEN 3000.
    MODULE STATUS_3000 OUTPUT.
      SET PF-STATUS 'UI'.
      SET TITLEBAR 'TITLE'.
    ENDMODULE.                    "STATUS_8000 OUTPUT
    MODULE USER_COMMAND_8000 INPUT
    MODULE USER_COMMAND_3000 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK' OR 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'SAVE'.
          PERFORM UPDATE_TABLE.
      ENDCASE.
    ENDMODULE.                    "USER_COMMAND_8000 INPUT
    *&SPWIZARD: DECLARATION OF TABLECONTROL 'ZTABLE' ITSELF
    CONTROLS: ZTABLE TYPE TABLEVIEW USING SCREEN 3000.
    *&SPWIZARD: LINES OF TABLECONTROL 'ZTABLE'
    DATA:     G_ZTABLE_LINES  LIKE SY-LOOPC.
    DATA:     OK_CODE LIKE SY-UCOMM.
    *&SPWIZARD: OUTPUT MODULE FOR TC 'ZTABLE'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: UPDATE LINES FOR EQUIVALENT SCROLLBAR
    MODULE ZTABLE_CHANGE_TC_ATTR OUTPUT.
      DESCRIBE TABLE ITAB_HERA LINES ZTABLE-lines.
    ENDMODULE.
    *&SPWIZARD: OUTPUT MODULE FOR TC 'ZTABLE'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: GET LINES OF TABLECONTROL
    MODULE ZTABLE_GET_LINES OUTPUT.
      G_ZTABLE_LINES = SY-LOOPC.
    ENDMODULE.
    *&SPWIZARD: INPUT MODULE FOR TC 'ZTABLE'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: MODIFY TABLE
    MODULE ZTABLE_MODIFY INPUT.
      MODIFY ITAB_HERA
        FROM WA_HERA
        INDEX ZTABLE-CURRENT_LINE.
    ENDMODULE.
    *&SPWIZARD: INPUT MODULE FOR TC 'ZTABLE'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: PROCESS USER COMMAND
    MODULE ZTABLE_USER_COMMAND INPUT.
      OK_CODE = SY-UCOMM.
      PERFORM USER_OK_TC USING    'ZTABLE'
                                  'ITAB_HERA'
                         CHANGING OK_CODE.
      SY-UCOMM = OK_CODE.
    ENDMODULE.
      INCLUDE TABLECONTROL_FORMS                                         *
    *&      Form  USER_OK_TC                                               *
    FORM USER_OK_TC USING    P_TC_NAME TYPE DYNFNAM
                              P_TABLE_NAME
                              P_MARK_NAME
                     CHANGING P_OK      LIKE SY-UCOMM.
    &SPWIZARD: BEGIN OF LOCAL DATA----
       DATA: L_OK              TYPE SY-UCOMM,
             L_OFFSET          TYPE I.
    &SPWIZARD: END OF LOCAL DATA----
    *&SPWIZARD: Table control specific operations                          *
    *&SPWIZARD: evaluate TC name and operations                            *
       SEARCH P_OK FOR P_TC_NAME.
       IF SY-SUBRC <> 0.
         EXIT.
       ENDIF.
       L_OFFSET = STRLEN( P_TC_NAME ) + 1.
       L_OK = P_OK+L_OFFSET.
    *&SPWIZARD: execute general and TC specific operations                 *
       CASE L_OK.
         WHEN 'INSR'.                      "insert row
           PERFORM FCODE_INSERT_ROW USING    P_TC_NAME
                                             P_TABLE_NAME.
           CLEAR P_OK.
         WHEN 'DELE'.                      "delete row
           PERFORM FCODE_DELETE_ROW USING    P_TC_NAME
                                             P_TABLE_NAME
                                             P_MARK_NAME.
           CLEAR P_OK.
         WHEN 'P--' OR                     "top of list
              'P-'  OR                     "previous page
              'P+'  OR                     "next page
              'P++'.                       "bottom of list
           PERFORM COMPUTE_SCROLLING_IN_TC USING P_TC_NAME
                                                 L_OK.
           CLEAR P_OK.
        WHEN 'L--'.                       "total left
          PERFORM FCODE_TOTAL_LEFT USING P_TC_NAME.
        WHEN 'L-'.                        "column left
          PERFORM FCODE_COLUMN_LEFT USING P_TC_NAME.
        WHEN 'R+'.                        "column right
          PERFORM FCODE_COLUMN_RIGHT USING P_TC_NAME.
        WHEN 'R++'.                       "total right
          PERFORM FCODE_TOTAL_RIGHT USING P_TC_NAME.
         WHEN 'MARK'.                      "mark all filled lines
           PERFORM FCODE_TC_MARK_LINES USING P_TC_NAME
                                             P_TABLE_NAME
                                             P_MARK_NAME   .
           CLEAR P_OK.
         WHEN 'DMRK'.                      "demark all filled lines
           PERFORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
                                               P_TABLE_NAME
                                               P_MARK_NAME .
           CLEAR P_OK.
        WHEN 'SASCEND'   OR
             'SDESCEND'.                  "sort column
          PERFORM FCODE_SORT_TC USING P_TC_NAME
                                      l_ok.
       ENDCASE.
    ENDFORM.                              " USER_OK_TC
    *&      Form  FCODE_INSERT_ROW                                         *
    FORM fcode_insert_row
                   USING    P_TC_NAME           TYPE DYNFNAM
                            P_TABLE_NAME             .
    &SPWIZARD: BEGIN OF LOCAL DATA----
       DATA L_LINES_NAME       LIKE FELD-NAME.
       DATA L_SELLINE          LIKE SY-STEPL.
       DATA L_LASTLINE         TYPE I.
       DATA L_LINE             TYPE I.
       DATA L_TABLE_NAME       LIKE FELD-NAME.
       FIELD-SYMBOLS <TC>                 TYPE CXTAB_CONTROL.
       FIELD-SYMBOLS <TABLE>              TYPE STANDARD TABLE.
       FIELD-SYMBOLS <LINES>              TYPE I.
    &SPWIZARD: END OF LOCAL DATA----
       ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
       CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
       ASSIGN (L_TABLE_NAME) TO <TABLE>.                "not headerline
    *&SPWIZARD: get looplines of TableControl                              *
       CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_LINES_NAME.
       ASSIGN (L_LINES_NAME) TO <LINES>.
    *&SPWIZARD: get current line                                           *
       GET CURSOR LINE L_SELLINE.
       IF SY-SUBRC <> 0.                   " append line to table
         L_SELLINE = <TC>-LINES + 1.
    *&SPWIZARD: set top line                                               *
         IF L_SELLINE > <LINES>.
           <TC>-TOP_LINE = L_SELLINE - <LINES> + 1 .
         ELSE.
           <TC>-TOP_LINE = 1.
         ENDIF.
       ELSE.                               " insert line into table
         L_SELLINE = <TC>-TOP_LINE + L_SELLINE - 1.
         L_LASTLINE = <TC>-TOP_LINE + <LINES> - 1.
       ENDIF.
    *&SPWIZARD: set new cursor line                                        *
       L_LINE = L_SELLINE - <TC>-TOP_LINE + 1.
    *&SPWIZARD: insert initial line                                        *
       INSERT INITIAL LINE INTO <TABLE> INDEX L_SELLINE.
       <TC>-LINES = <TC>-LINES + 1.
    *&SPWIZARD: set cursor                                                 *
       SET CURSOR LINE L_LINE.
    ENDFORM.                              " FCODE_INSERT_ROW
    *&      Form  FCODE_DELETE_ROW                                         *
    FORM fcode_delete_row
                   USING    P_TC_NAME           TYPE DYNFNAM
                            P_TABLE_NAME
                            P_MARK_NAME   .
    &SPWIZARD: BEGIN OF LOCAL DATA----
       DATA L_TABLE_NAME       LIKE FELD-NAME.
       FIELD-SYMBOLS <TC>         TYPE cxtab_control.
       FIELD-SYMBOLS <TABLE>      TYPE STANDARD TABLE.
       FIELD-SYMBOLS <WA>.
       FIELD-SYMBOLS <MARK_FIELD>.
    &SPWIZARD: END OF LOCAL DATA----
       ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
       CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
       ASSIGN (L_TABLE_NAME) TO <TABLE>.                "not headerline
    *&SPWIZARD: delete marked lines                                        *
       DESCRIBE TABLE <TABLE> LINES <TC>-LINES.
       LOOP AT <TABLE> ASSIGNING <WA>.
    *&SPWIZARD: access to the component 'FLAG' of the table header         *
         ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
         IF <MARK_FIELD> = 'X'.
           DELETE <TABLE> INDEX SYST-TABIX.
           IF SY-SUBRC = 0.
             <TC>-LINES = <TC>-LINES - 1.
           ENDIF.
         ENDIF.
       ENDLOOP.
    ENDFORM.                              " FCODE_DELETE_ROW
    *&      Form  COMPUTE_SCROLLING_IN_TC
          text
         -->P_TC_NAME  name of tablecontrol
         -->P_OK       ok code
    FORM COMPUTE_SCROLLING_IN_TC USING    P_TC_NAME
                                           P_OK.
    &SPWIZARD: BEGIN OF LOCAL DATA----
       DATA L_TC_NEW_TOP_LINE     TYPE I.
       DATA L_TC_NAME             LIKE FELD-NAME.
       DATA L_TC_LINES_NAME       LIKE FELD-NAME.
       DATA L_TC_FIELD_NAME       LIKE FELD-NAME.
       FIELD-SYMBOLS <TC>         TYPE cxtab_control.
       FIELD-SYMBOLS <LINES>      TYPE I.
    &SPWIZARD: END OF LOCAL DATA----
       ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get looplines of TableControl                              *
       CONCATENATE 'G_' P_TC_NAME '_LINES' INTO L_TC_LINES_NAME.
       ASSIGN (L_TC_LINES_NAME) TO <LINES>.
    *&SPWIZARD: is no line filled?                                         *
       IF <TC>-LINES = 0.
    *&SPWIZARD: yes, ...                                                   *
         L_TC_NEW_TOP_LINE = 1.
       ELSE.
    *&SPWIZARD: no, ...                                                    *
         CALL FUNCTION 'SCROLLING_IN_TABLE'
              EXPORTING
                   ENTRY_ACT             = <TC>-TOP_LINE
                   ENTRY_FROM            = 1
                   ENTRY_TO              = <TC>-LINES
                   LAST_PAGE_FULL        = 'X'
                   LOOPS                 = <LINES>
                   OK_CODE               = P_OK
                   OVERLAPPING           = 'X'
              IMPORTING
                   ENTRY_NEW             = L_TC_NEW_TOP_LINE
              EXCEPTIONS
                 NO_ENTRY_OR_PAGE_ACT  = 01
                 NO_ENTRY_TO           = 02
                 NO_OK_CODE_OR_PAGE_GO = 03
                   OTHERS                = 0.
       ENDIF.
    *&SPWIZARD: get actual tc and column                                   *
       GET CURSOR FIELD L_TC_FIELD_NAME
                  AREA  L_TC_NAME.
       IF SYST-SUBRC = 0.
         IF L_TC_NAME = P_TC_NAME.
    *&SPWIZARD: et actual column                                           *
           SET CURSOR FIELD L_TC_FIELD_NAME LINE 1.
         ENDIF.
       ENDIF.
    *&SPWIZARD: set the new top line                                       *
       <TC>-TOP_LINE = L_TC_NEW_TOP_LINE.
    ENDFORM.                              " COMPUTE_SCROLLING_IN_TC
    *&      Form  FCODE_TC_MARK_LINES
          marks all TableControl lines
         -->P_TC_NAME  name of tablecontrol
    FORM FCODE_TC_MARK_LINES USING P_TC_NAME
                                   P_TABLE_NAME
                                   P_MARK_NAME.
    &SPWIZARD: EGIN OF LOCAL DATA----
      DATA L_TABLE_NAME       LIKE FELD-NAME.
      FIELD-SYMBOLS <TC>         TYPE cxtab_control.
      FIELD-SYMBOLS <TABLE>      TYPE STANDARD TABLE.
      FIELD-SYMBOLS <WA>.
      FIELD-SYMBOLS <MARK_FIELD>.
    &SPWIZARD: END OF LOCAL DATA----
      ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
       CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
       ASSIGN (L_TABLE_NAME) TO <TABLE>.                "not headerline
    *&SPWIZARD: mark all filled lines                                      *
      LOOP AT <TABLE> ASSIGNING <WA>.
    *&SPWIZARD: access to the component 'FLAG' of the table header         *
         ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
         <MARK_FIELD> = 'X'.
      ENDLOOP.
    ENDFORM.                                          "fcode_tc_mark_lines
    *&      Form  FCODE_TC_DEMARK_LINES
          demarks all TableControl lines
         -->P_TC_NAME  name of tablecontrol
    FORM FCODE_TC_DEMARK_LINES USING P_TC_NAME
                                     P_TABLE_NAME
                                     P_MARK_NAME .
    &SPWIZARD: BEGIN OF LOCAL DATA----
      DATA L_TABLE_NAME       LIKE FELD-NAME.
      FIELD-SYMBOLS <TC>         TYPE cxtab_control.
      FIELD-SYMBOLS <TABLE>      TYPE STANDARD TABLE.
      FIELD-SYMBOLS <WA>.
      FIELD-SYMBOLS <MARK_FIELD>.
    &SPWIZARD: END OF LOCAL DATA----
      ASSIGN (P_TC_NAME) TO <TC>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
       CONCATENATE P_TABLE_NAME '[]' INTO L_TABLE_NAME. "table body
       ASSIGN (L_TABLE_NAME) TO <TABLE>.                "not headerline
    *&SPWIZARD: demark all filled lines                                    *
      LOOP AT <TABLE> ASSIGNING <WA>.
    *&SPWIZARD: access to the component 'FLAG' of the table header         *
         ASSIGN COMPONENT P_MARK_NAME OF STRUCTURE <WA> TO <MARK_FIELD>.
         <MARK_FIELD> = SPACE.
      ENDLOOP.
    ENDFORM.                                          "fcode_tc_mark_lines
    FORM UPDATE_TABLE.
      "Update physical database table
      UPDATE Z07P4_REF FROM TABLE ITAB_HERA.
    ENDFORM.                    "UPDATE_TABLE
    Edited by: Evonne Gow on Jan 4, 2008 2:52 AM

    hey gary help me lei...
    Edited by: Evonne Gow on Jan 4, 2008 2:55 AM

  • Spry dropdown z-index problems in IE

    Hello
    I'm having some trouble with the spry horizontal dropdown in
    IE, and it's interaction with SmoothGallery. In every browser (with
    the exception on IE 6&7 of course) the higher z-index values of
    the menu cause it to overlay the JS image gallery below it. In IE
    however it does not.
    http://www.digitalrift.co.uk/projects/woods/
    Works fine on every browser tested so I can't see how it'd be
    a fault with the z-index values used. Anyone have a suggestion as
    to a workaround for good ol' IE?
    Thanks

    All right, well I just figured out my problem, and hopefully this will help anybody else. 
    I was positioning my images using <position: absolute;>  While this is definitely the easiest way to specifically place something on a page, Internet Explorer, it seems, assigns that z-value as the highest on the page, which is why my dropdown menus wouldn't appear on top of the image, but behind it. 
    The solution I found was changing the position attribute to "static" rather than "absolute".  The "static" attribute can't use position qualities like "top", "bottom", "left", and "right", but has to use margins and float to be specifically place. 
    While this isn't as easy as absolute positioning, using the static value will allow the Spry dropdown menu to appear over top of the images instead of behind them.

  • Problem with table cell editors - Dropdown by Index, getting lead selection

    Hi experts,
    I have a table editor with 5 columns
    1st column is a Drop Down byIndex.
    My contex looks like this
    AS_DATA(Parent Node cardinality 1.1, selection 0-1)
          HEADER (NODE)
          DETAILS(NODE cardinality 0..n, selection 0-1)
             ACTIVITY_TYPES (NODE cardinality 0..n selection 0-1 ) "node for drop down
             description - attribute
             unit
             quantity
    i have bound details node to table data source.
    i have a tool bar button 'Add Line item' which will add a new line item to the table.
    (i am adding a blank line to the table that is bound to table )
    Its working fine. but when ever i add more than one row, the selection made in the previous rows drop down is lost.
    its initializing. where could be the problem.
    My code
    data LO_ND_INV_TYPE type ref to IF_WD_CONTEXT_NODE.
      data LO_EL_INV_TYPE type ref to IF_WD_CONTEXT_ELEMENT.
      data LS_INV_TYPE type WD_THIS->ELEMENT_INV_TYPE.
      data LV_INV_TYPE type WD_THIS->ELEMENT_INV_TYPE-INV_TYPE.
      data LO_ND_DETAILS type ref to IF_WD_CONTEXT_NODE.
      data LT_DETAILS type WD_THIS->ELEMENTS_DETAILS.
      data LS_DETAILS like line of LT_DETAILS.
      data:  WD_NODE type ref to IF_WD_CONTEXT_NODE,
            LR_ELEMENT type ref to IF_WD_CONTEXT_ELEMENT.
      data LO_ND_INV_PATTERN type ref to IF_WD_CONTEXT_NODE.
      data LO_EL_INV_PATTERN type ref to IF_WD_CONTEXT_ELEMENT.
      data LS_INV_PATTERN type WD_THIS->ELEMENT_INV_PATTERN.
      data LV_INV_PAT type WD_THIS->ELEMENT_INV_PATTERN-INV_TYPE.
      data LO_ND_ACTIVITY_TYPES type ref to IF_WD_CONTEXT_NODE.
      data LT_ACTIVITY_TYPES type WD_THIS->ELEMENTS_ACTIVITY_TYPES.
      data LW_ACTIVITY_TYPES type WD_THIS->ELEMENT_ACTIVITY_TYPES.
        data LO_EL_ACTIVITY_TYPES type ref to IF_WD_CONTEXT_ELEMENT.
    *     navigate from <CONTEXT> to <DETAILS> via lead selection
        LO_ND_DETAILS = WD_CONTEXT->PATH_GET_NODE( PATH = `AS_DATA.DETAILS` ).
        LO_ND_DETAILS->GET_STATIC_ATTRIBUTES_TABLE(
          importing TABLE = LT_DETAILS ).
    * Append an empty row to lt_details
        append LS_DETAILS to LT_DETAILS.
        LO_ND_DETAILS->BIND_TABLE(
        NEW_ITEMS = LT_DETAILS ).
    * Get values for dropdown
    call method WD_ASSIST->GET_ACTIVITY_TYPE
          exporting
            I_INV_CAT_ID     = LV_INV_PAT
          importing
            ET_ACTIVITY_TYPE = LT_ACTIVITY_TYPES.
        LW_ACTIVITY_TYPES-ID = 'Select a Activity type'.
        LW_ACTIVITY_TYPES-TEXT = 'Select a Activity type'.
        insert LW_ACTIVITY_TYPES into LT_ACTIVITY_TYPES index 1.
        loop at LT_DETAILS into LS_DETAILS.
          LV_TABIX = SY-TABIX.
          LR_ELEMENT = LO_ND_DETAILS->GET_ELEMENT( LV_TABIX ).
          WD_NODE = LR_ELEMENT->GET_CHILD_NODE( 'ACTIVITY_TYPES' ).
    *lv_index = wd_node->get_lead_selection_index( ). " it is dumping at this statement when i try to get lead selection
          WD_NODE->BIND_TABLE( NEW_ITEMS =  LT_ACTIVITY_TYPES ). " data for dropdown
        endloop.
    any clue on what am i missing will be appreciated.
    I am getting dump when i try to get the lead selection
    Ajay

    You only have only one option in the DDI to display in the example. when you have multiple values
    i assume that by adding an empty row like this will lose the SELECTION MADE in DDI. (Correct me If i am wrong)
    somehow i believe that we need to bind the DD values using  SET LEAD SELECTION INDEX METHOD FOR THE DDI when they are already selected and trying to BIND.
    *LO_ND_DETAILS->GET_STATIC_ATTRIBUTES_TABLE(*
          *importing TABLE = LT_DETAILS ).*
    ** Append an empty row to lt_details*
        *append LS_DETAILS to LT_DETAILS.*
        *LO_ND_DETAILS->BIND_TABLE(*
        *NEW_ITEMS = LT_DETAILS ).*
    even though the above code will have the selected value, the SELECTIONS MADE will be initialize.
    you need to bind it explicitly.
    you have to create an element and bind the DDI values for adding an row as SARAVANAN said.
    or i guess you can continue with you code but need to use SET LEAD to display the correct SELECTIONS MADE
    loop at LT_DETAILS into LS_DETAILS.
          LV_TABIX = SY-TABIX.
          LR_ELEMENT = LO_ND_DETAILS->GET_ELEMENT( LV_TABIX ).
          WD_NODE = LR_ELEMENT->GET_CHILD_NODE( 'ACTIVITY_TYPES' ).
          WD_NODE->BIND_TABLE( NEW_ITEMS =  LT_ACTIVITY_TYPES ). " data for dropdown
    *" try to set the desired value in the DDI when you have multiple values using SET LEAD*
        endloop.

  • Problem with woodstock dropdown

    hi all
    i'm using netbeans 7.5
    my jsp code is
    <jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
    <webuijsf:page id="page1">
    <webuijsf:html id="html1">
    <webuijsf:head id="head1">
    <webuijsf:link id="link1" url="/resources/stylesheet.css"/>
    <script type="text/javascript">
    var req;
    var target;
    var isIE;
    function initRequeskt(url) {
    if (window.XMLHttpRequest) {
    req = new XMLHttpRequest();
    } else if (window.ActiveXObject) {
    isIE = true;
    req = new ActiveXObject("Microsoft.XMLHTTP");
    function validateUserId() {
    var url = "AjaxServlet";
    // Invoke initRequest(url) to create XMLHttpRequest object
    initRequest(url);
    req.onreadystatechange = processRequest;
    req.open("GET", url, true);
    req.send(null);
    function processRequest() {
    if (req.readyState == 4) {
    if (req.status == 200) {
    // Extract "true" or "false" from the returned data from the server.
    // The req.responseXML should contain either <valid>true</valid> or <valid>false</valid>
    var message = req.responseXML.getElementsByTagName("number")[0].childNodes[0].nodeValue;
    // Call "setMessageUsingDOM(message)" function to display
    // "Valid User Id" or "Invalid User Id" message.
    setMessageUsingInline(message);
    // If the user entered value is not valid, do not allow the user to
    // click submit button.
    function setMessageUsingInline(message) {
    document.getElementById("form1:textField2").setProps( {value: message } );
    function showDropDownValue() {
    document.getElementById('form1:textField1').setProps( {value: document.getElementById('form1:dropDownCountry').getSelectedValue()} );
    document.getElementById('form1:dropDownCity').refresh('form1:textField1');
    validateUserId();
    function showCalendarValue() {
    document.getElementById('form1:textField2').setProps( {value: document.getElementById('form1:calendar1').getProps().value} );
    function showChackboxValue() {
    document.getElementById('form1:textField3').setProps( {value: document.getElementById('form1:checkbox1').getProps().checked} );
    </script>
    </webuijsf:head>
    <webuijsf:body id="body1" style="-rave-layout: grid">
    <webuijsf:form id="form1">
    <webuijsf:dropDown binding="#{Page1.dropDownCountry}" id="dropDownCountry" items="#{myobj.dropDownCountryValue}"
    onChange="showDropDownValue(); " style="left: 192px; top: 216px; position: absolute"/>
    <webuijsf:textField binding="#{Page1.textField1}" id="textField1" onClick="showDropDownValue()"
    style="left: 336px; top: 216px; position: absolute" text="#{myobj.country_name}" visible="false"/>
    <webuijsf:calendar binding="#{Page1.calendar1}" id="calendar1" onClick="showCalendarValue();" style="left: 144px; top: 288px; position: absolute"/>
    <webuijsf:textField binding="#{Page1.textField2}" id="textField2" style="left: 336px; top: 288px; position: absolute"/>
    <webuijsf:checkbox binding="#{Page1.checkbox1}" id="checkbox1" label="Checkbox" onClick="showChackboxValue()" style="position: absolute; left: 192px; top: 360px"/>
    <webuijsf:textField binding="#{Page1.textField3}" id="textField3" style="left: 336px; top: 360px; position: absolute"/>
    <webuijsf:dropDown binding="#{Page1.dropDownCity}" id="dropDownCity" items="#{myobj.dropDownCityValue}" style="position: absolute; left: 528px; top: 216px"/>
    </webuijsf:form>
    </webuijsf:body>
    </webuijsf:html>
    </webuijsf:page>
    </f:view>
    </jsp:root>
    face-config
    <managed-bean>
    <managed-bean-name>myobj</managed-bean-name>
    <managed-bean-class>newpack.NewClass</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    dropDownCountry is name of countries
    dropDownCity is name of cities choosen by dropDownCountry
    when i change dropDownCountry, intseat of refreshing dropDownCity in dropDownCity in old cities too
    for example if i have choosen Italy in dropDownCountry then items of dropDownCity is rome, milan
    then if i switch dropDownCountry to England then items of dropDownCity must be london, liverpool
    and in my case when i switch from Italy to England items of dropDownCity is rome, milan, london, liverpool
    why dropDownCity items store old datas too
    anyone can help?

    martin.wainamoinen wrote:
    I noticed that the page gets reinstanciated on every refresh and everything gets reset, don't know if this is default behaviourThe managed bean is apparently request scoped. I think it's time to throw away the "visual editor" you're using or to switch to "source code" mode or so and start with writing code yourself. Do not do drag'n'drop, you would become code-blind and you would constantly fight with trivial and obvious problems at code/specification level.

  • Problem in dropdown by index in table

    Hi all,
    i have created one table with dropdownby Index field .
    In DISPLAY....i am able to get all values corresponding to the selection.In debugging i am getting all entries for dropdown field but while display i am getting first DD value.
    And in CREATE ....when i am selecting first value in DD field for 1st row and then selecting another value for 2nd row it is taking second value for all rows.means whatever i select...same value is populated in all DD field of rows.
    Thanks
    Kiran

    >
    kiran162 wrote:
    > Sorry..i did not get you..so how can i set values for DDBI.I mean to say what i need to add in my code.Any specific statement to set index values??
    >
    > Thanks
    > Kiran
    nope, it has to be arranged in the context level. I suspect that you have problem there.
    See for example the context structure.
    node_sflight
          carrid
          connid
          node_booking (cardinality 0..n)
             sconnid
             sdate
             stext
    node_sflight is binded to the tabple datasource property of the table.
    you have a column booking with DDBI as cell_editor, bind this source property to the node_booking.
    bind the text property to the one of the attribute in node_booking like stext.
    You need to fill the data node_booking for every row in the node_sflight.

Maybe you are looking for