JSP drop down problem; iam confused

Hi All,
can anybody help me out in creating this jsp page. Iam confused what to do and where to start building this page.
Here is what i need to do :
This new page will have two list boxes side by side and will have two arrows in between. In the left hand box will be a list of "Firm Divisions" that can be selected by using the mouse and arrow button. The user will be able to select one or more of the "Firm Divisions". After the desired "Firm Divisions" are selected the user will click on the SUBMIT button and a message will appear to confirm the request has been sent. The user will then click on the OK button and will be brought back to the previous screen( i.e Pop up a conformation box with a required OK button ).
CAN ANYBODY HELP ME IN BUILDING THIS JSP PAGE. I can do the backend processes but iam stuck creating this jsp page.

yes, put at least 2 buttons(or images with <a href>) one for remove and the other for add, and call a JavaScript function while clicked (onClick event)= onClick="javascript:removeFromList();"
function addToList(){
form=document.form;
itemText=form.right_list.options[form.right_list.selectedIndex].text;
itemValue=form.right_list.options[form.right_list.selectedIndex].value;
form.right_list.options[form.left_list.selectedIndex]=new Option(itemText,itemValue);
function removeFromList(){
form=document.form;
if (form.left_list.selectedIndex!=-1){
form.left_list.options[form.left_list.selectedIndex]=null;
got the idea?
Nelson.

Similar Messages

  • Execute option missing from JSP drop down menu

    I'm going through a Java Web Development class and trying to produce a small web app through Sun Java Studio Enterprise 7 2004Q4. I have two servlets, a couple of classes and two JSPs. At seemingly random times the "Execute" and "Execute (force reload)" options from the drop down menu you get when you right click a JSP fails to show up. It isn't grayed out, it just isn't there. Most of the time these options are there. And they can be there one time and then for the same project, same set of JSPs everything, they just disappear.
    Can anyone tell me what dumb thing I'm doing to cause this?
    And can anyone tell me how to fix it once I've done it?
    Thanks
    DR Crowley

    First of all thank you for all the time you are spending on this. Believe me I know how frustrating it can be to figure out what is happening when you can't reproduce the problem.
    On to your questions: I am running Windows XP Professional. I have checked and made sure that the extension is still .jsp and that it isn't changing. No I don't have the IDE set up to show extensions, however the icon beside the file is the jsp icon and when I go to Windows explorer (where I do have it set to show known extensions) it is a .jsp file and does not have the ever exasperating hidden extension that windows is infamous for. Sun Studio seems to recognize the file as a proper jsp (due to the icon).
    As to your further questions. I am executing it by right clicking on the jsp file itself. And the jsp file is in the documents folder not in the web/inf folder.
    At this point we are out of the class and it isn't nearly as important that I get an fix. We (our company) will probably not do jsp files and servlets thourgh Sun Java Studio Enterprsise. Instead we are looking at using Sun Java Studio Creater to do the view layer.
    Thanks for all your help and the time you took to try to figure this out.

  • Spry horizontal drop down problem in IE

    I would appreciate some help with a project I'm working on. My spry horizontal drop down menu looks best in Apple Safari on a Mac and looks worst in IE 8 on a PC. There are also some problems apparent in Firefox for both PC and Mac.
    The problem in IE is that the horizontal bar is not the correct height even though I have set the height in the css:
    ul.MenuBarHorizontal a
        display: block;
        cursor: pointer;
        color: #FFF;
        text-decoration: none;
        font-family: "Arial Narrow", Arial, Helvetica;
        font-size: 10pt;
        padding-top: 0.7em;
        padding-bottom: 0em;
        font-weight: normal;
        background-repeat: repeat-x;
        background-image: url(/2011images/gradientnav.jpg);
        height: 30px;
    The drop downs are the correct size, just the top menu bar that is not the right size.
    The menu bar is the correct height in Firefox and Safari, but in Firefox the menu bar is a few pixels higher than it should be.
    Here's the page I'm working on.
    http://westernstage.com/2011index.html

    This may help http://foundationphp.com/tutorials/sprymenu/customize1.php
    Also have a look here http://www.dwcourse.com/dreamweaver/ten-commandments-spry-menubars.php#one
    Gramps

  • Drop Down Problem in Google Chrome

    Hi,
    Total newbie to Dreamweaver and spry menu bars. I just finished my new site and I need help solving one small problem. When browsing the page on Google chrome, the "Galleries" menu will not drop down is selected in one if the children pages. I have searched for an answer but have not been successful. This is the link to my page: http://www.polvodeluz.com
    Here is my html code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Polvo De Luz</title>
    <link href="styles/polvo.css" rel="stylesheet" type="text/css" />
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="styles/polvo_menu.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div id="container">
      <h1>Polvo De luz: Images</h1>
      <div id="bandera"><a href="index.html"><img src="Page Images/bandera.jpg" width="968" height="85" alt="polvo de luz" /></a>
        <ul id="MenuBar1" class="MenuBarHorizontal">
          <li><a class="MenuBarItemSubmenu" href="#">Galleries</a>
            <ul>
              <li><a href="people/peoplep.html">People</a></li>
              <li><a href="earth/earthe.html">Earth</a></li>
              <li><a href="life/lifel.html">Life</a></li>
              <li><a href="analogue/analogue.html">Analogue</a></li>
            </ul>
          </li>
          <li><a href="info.html">Info</a></li>
          <li><a href="pricing.html">Pricing</a>      </li>
          <li><a href="contact.html">Contact</a></li>
        </ul>
      </div>
      <div id="main_image"><a href="index.html"><img src="Page Images/Ale.jpg" name="ale_image" width="968" height="655" id="ale_image" /></a>
      <div id="main_text">
          <h2>Light Is Dust</h2>
          <p>To see an object is to perceive the light particles that are bouncing from the object into our eyes. What we see is a third-party representation of that which exists. All we see is POLVO DE LUZ.  </p>
      </div>
      </div>
      <div id="footer">Copyright © 2011 Miguel Morales</div>
    </div>
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    </html>
    This is the code for the index page. I will appreciate any help. Please let me know if more information is needed.

    Hi Alex,
    thanx for your answer, it is helpful.
    My first row is working but when i insert a second row using the insert button, first row remains unchanged but i dont find the names in drop down in second row.
    i should get al those names again in the drop down for second row also.
    and i dint used any coding in wddomodify method. i only added a onactionon_select & on_insert methods.
    Rgds.
    Parteek.

  • Drop down problem -javax.faces.FacesException: Can't instantiate class: ''.

    Hi,
    I am using jsf 1.1
    I am trying to populate a simple drop down in MyJsp.jsp with the List values generated in ContactsListBean.java. I am copying the code here for reference.
    when I launch the page (forwarding to this MyJsp.jsp in index.jsp) I am getting this error below. Can anyone help me out what is it that I am doing wrong?? I am unable to trace out what's wrong. I have even tried the same logic with h:selectOneListbox also but I get the same error..
    Any help/advice would be highly appreciated, Thanks in advance.
    org.apache.jasper.JasperException: javax.servlet.jsp.JspException: javax.faces.FacesException: javax.faces.FacesException: Can't instantiate class: ''.
    *     org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)*
    *     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)*
    *     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)*
    *     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)*
    *     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)*
    *     com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)*
    *     com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)*
    *     com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)*
    *     com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)*
    *     com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)*
    *     javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)*
    *     org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:686)*
    *     org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:656)*
    *     org.apache.jsp.index_jsp._jspService(index_jsp.java:71)*
    *     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)*
    *     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)*
    *     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)*
    *     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)*
    *     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)*
    *     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)*
    MyJsp.jsp
    <%@ page language="java" pageEncoding="ISO-8859-1"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
         <title>My JSF 'MyJsp.jsp' starting page</title>
         <meta http-equiv="pragma" content="no-cache">
         <meta http-equiv="cache-control" content="no-cache">
         <meta http-equiv="expires" content="0">   
         <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
         <meta http-equiv="description" content="This is my page">
         <!--
         <link rel="stylesheet" type="text/css" href="styles.css">
         -->
    </head>
    <body>
       <f:view>
             This is my JSF JSP page. <br><h:form>
         <h:selectOneMenu id="loc1" value="#{contactsListBean.selectedLocation}">
                 <f:selectItems id="ll1" value="#{contactsListBean.locationList}"/>
                    </h:selectOneMenu> 
        </h:form>
    </f:view>
    </body>
    </html>
    ContactsListBean.java
    public class ContactsListBean {
         private java.util.List locationList = new ArrayList();;
         private java.lang.String selectedLocation;
         public ContactsListBean() {
              System.out.println("Construnction list....");
              locationList.add(new SelectItem("test1","test1",""));
              locationList.add(new SelectItem("test2","test2",""));
              locationList.add(new SelectItem("test3","test3",""));
         public java.util.List getLocationList() {
               System.out.println("returning LIST OF SIZE "+locationList.size());
               return locationList;
         public void setLocationList(java.util.List locationList) {
              this.locationList = locationList;
              System.out.println("got list size..."+locationList.size());
         public java.lang.String getSelectedLocation() {
              return selectedLocation;
         public void setSelectedLocation(java.lang.String selectedLocation) {
              this.selectedLocation = selectedLocation;
    faces-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
                                  "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config>
    <managed-bean>
      <managed-bean-name>contactsListBean</managed-bean-name>
      <managed-bean-class>ContactsListBean</managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
      <managed-property>
       <property-name>locationList</property-name>
       <property-class>java.util.List</property-class>
       <value/>
      </managed-property>
      <managed-property>
       <property-name>selectedLocation</property-name>
       <property-class>java.lang.String</property-class>
       <value/>
      </managed-property>
    </managed-bean>
    </faces-config>
    web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
      <context-param>
        <param-name>javax.faces.CONFIG_FILES</param-name>
        <param-value>/WEB-INF/faces-config.xml</param-value>
      </context-param>
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
      </servlet-mapping>
      <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
      </welcome-file-list>
    </web-app>

    Your class is now been put in a package? Good, now the next step is to remove all of those managed-property entries from the faces-config.xml. It makes no sense because 1) you already created the list in the backing bean and 2) you didn't assign any value to the item in the managed property.

  • Jsp drop down

    hi everyone,
    i m using jsp and struts... n new to these technologies..
    i want to populate a drop down menu on jsp... from the values in the action class...
    i need to know..
    1) whether this approach is correct.. bcoz i m reading values from a file in my action class... do u suggest to put it into some model layer ??
    2) how can i achieve the functionality ie. populating the combo box from action class/model layer
    need ur help guys..will b really thankful
    Message was edited by:
    aryan.kapoor

    <html:select property ="fileVal" size="1" style="width: 250px">
    <option value="" selected>Default</option>
    <html:optionsCollection property="fileValues" value="id" label="name"/>
    </html:select>     have corressponding getter/setters in action form class.
    In your BO (model), process the file and have the data collection. You can have a Data Transfer Object (DTO) to store the data.
    from your action (controller), call the BO and set the data for the drop-down.

  • Spry Drop Down Problem in Internet Explorer

    I have built my spry drop down and it is working in all browsers except for IE.  I really need help with this. Attached is my code or you can view it at roemtech.com/menubarattempt.html.  It is rendering it vertically and stacking the buttons on top of each other.  Check it out in Internet explorer to see what I mean. Thanks so much for the help.
    JBelsher
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Template Model</title>
    <link href="webelements.css" rel="stylesheet" type="text/css" />
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <style type="text/css">
    .BulletAlignment { text-align: left;
    </style>
    </head>
    <body>
    <div class="container">
      <div class="header">
        <div align="right" class="FirstNameText"><strong><em>The First Name in Classroom Audio Systems</em></strong></div>
        <div style="background-color:#000; width:1024px; float: left;">
          <div>
    <ul id="DropDown" class="MenuBarHorizontal">
                        <li><a href="index.html">Home</a></li>
              <li><a href="Classroom-Audio-Systems.html" class="MenuBarItemSubmenu">Products</a>
                <ul>
                  <li><a href="classroom-audio-amplifiers.html">Amplifiers</a></li>
                  <li><a href="classroom-audio-speakers.html">Speakers</a></li>
                  <li><a href="classroom-audio-accessories.html">Accessories</a></li>
                </ul>
              </li>
              <li><a href="classroom-audio-specs.html">Specs</a> </li>
              <li><a href="classroom-audio-tips.html">Tech Tips</a></li>
              <li><a href="classroom-audio-contacts.html">Contacts</a></li>
            </ul>
          </div>
        </div>
        <div style="height:30px;"></div>
      </div>
    <!--End Header-->
    </div>
    <!--End of Content-->
      <div class="footer"><span style="padding-top:10px; font-size: 12px;">&copy; 2010 Roemtech LLC, All Rights Reserved 1491 N. Kealy Ave. Suite 8, Lewisville, Texas 75057</span></div>
    </div>
    <script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("DropDown", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
      </script>
    </body>
    </html>

    It needs to be versions 6 and higher of Internet Explorer.  I will attach my CSS below.  Just note all of the notes are still in there from dreamweaver.  Thanks for looking at this.
    James
    @charset "UTF-8";
    /* SpryMenuBarHorizontal.css - version 0.6 - Spry Pre-Release 1.6.1 */
    /* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */
    LAYOUT INFORMATION: describes box model, positioning, z-order
    /* The outermost container of the Menu Bar, an auto width box with no margin or padding */
    ul.MenuBarHorizontal
    margin: 0;
    padding: 0;
    list-style-type: none;
    font-size: 120%;
    cursor: default;
    width: auto;
    /* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
    ul.MenuBarActive
    z-index: 1000;
    /* Menu item containers, position children relative to this container and are a fixed width */
    ul.MenuBarHorizontal li
    margin: 0;
    padding: 0;
    list-style-type: none;
    font-size: 100%;
    position: relative;
    text-align: left;
    cursor: pointer;
    width: 120px;
    float: left;
    /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
    ul.MenuBarHorizontal ul
    margin: 0;
    padding: 0;
    list-style-type: none;
    font-size: 100%;
    cursor: default;
    width: 8.5em;
    position: absolute;
    left: -1000em;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
    left: auto;
    /* Menu item containers are same fixed width as parent */
    ul.MenuBarHorizontal ul li
    width: 8.5em;
    /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
    ul.MenuBarHorizontal ul ul
    position: absolute;
    margin: -5% 0 0 95%;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
    left: auto;
    top: 0;
    DESIGN INFORMATION: describes color scheme, borders, fonts
    /* Submenu containers have borders on all sides */
    ul.MenuBarHorizontal ul
    /* Menu items are a light gray block with padding and no text decoration */
    ul.MenuBarHorizontal a
    display: block;
    cursor: pointer;
    background-color: #000;
    padding: 0.5em 0.75em;
    color: #09F;
    text-decoration: none;
    text-align: center;
    /* Menu items that have mouse over or focus have a blue background and white text */
    ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
    background-color: #000;
    color: #09F;
    font-size: 100%;
    text-align: center;
    /* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
    ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
    background-color: #333;
    color: #09F;
    text-align: center;
    SUBMENU INDICATION: styles if there is a submenu under a given menu item
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenu
    background-image: url(SpryMenuBarDown.gif);
    background-repeat: no-repeat;
    background-position: 95% 50%;
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
    background-image: url(SpryMenuBarRight.gif);
    background-repeat: no-repeat;
    background-position: 95% 50%;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
    background-image: url(SpryMenuBarDownHover.gif);
    background-repeat: no-repeat;
    background-position: 95% 50%;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover
    background-image: url(SpryMenuBarRightHover.gif);
    background-repeat: repeat-x;
    background-position: 95% 50%;
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
    ul.MenuBarHorizontal iframe
    position: absolute;
    z-index: 1010;
    filter:alpha(opacity:0.1);
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
    ul.MenuBarHorizontal li.MenuBarItemIE
    display: inline;
    f\loat: none;
    background: #FFF;

  • Editable drop-down problem.

    Hello all,
    Here's the issue. I have an editable dropdown list/menu in a table. The table is hidden upon page load. When the user clicks the link to open the table, the editable drop down is only 1 or 2 pixels wide. How do I get the editable drop down to open at the prescribed 300px?
    Here's the code:
    <select name="CGSector1" id="CGSector1" wdg:subtype="DynamicInput" wdg:type="widget" wdg:recordset="rsCGSectors" wdg:displayfield="CGSectors" wdg:valuefield="CGSectors" wdg:norec="150" wdg:singleclickselect="yes" wdg:defaultoptiontext="no" wdg:restrict="No" wdg:ext="php" style="width:300px" wdg:fakeattribute="<?php WDG_registerRecordInsert("connStr_xxxxxx", "rsCGSectors", "CGSectors", "CGSectors");?>"></select>
    Thank you.
    Brian

    As this issue is not directly related to ADDT, but assumingly rather to e.g. aspects like the defined (if any) width of the initially hidden table, please give a link to the complete page code (or a live page) to help others with spotting the possible reason for this.
    However it should be mentioned that ADDT´s "editable dropdown" is generated on-the-fly using some proprietary AJAX functionality as well (including the style rendering), so maybe the style setting you defined here just gets ignored when the surrounding "container" (aka the table) gets hidden by - for instance - using features from another AJAX library like JQuery which is certainly incompatible with than ADDT´s own AJAX implementation.
    Cheers,
    Günter

  • Q: Another jsp drop-down menu problem+propeblem with savng button

    Well i have many problems:
    Starters i use eclipse with tomcat and postgres. I have to create a jsp page that shows some data directly from database.
    This is what i have so far:
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <%@ page import="property.core.Property"  %>
    <jsp:useBean id="PropertyDAO" scope="page" class="property.dao.PropertyDAO" />
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Vaata Vara</title>
    </head>
    <body>
    <script>
    function salvesta(){
    document.forms[0].mida_teha.value='salvestada' ; //salvesta=save and mida_teha=action
    document.forms[0].submit();
    </script>
    <input type='hidden' name='mida_teha' value='<%=request.getParameter("mida_teha") %>'>
    <form action='pg?mode=vaata_vara' method=POST>
    <input type='hidden' name='property' value='<%=request.getParameter("property") %>'>
    Valitud vara: <br>
    <% if((request.getParameter("property"))!=null){
    int property = Integer.valueOf(request.getParameter("property")).intValue();//
    String property_type="";
    String property_name ="";
    String property_created = "" ;
    String property_created_by ="" ;
    String property_updated = "" ;
    String property_updated_by ="" ;
    property.core.Property my_property ;
    if (request.getParameter("mida_teha") != null){
         my_property = PropertyDAO.GetProperty_fromDB(property);
         my_property.setProperty_name(request.getParameter("property_name"));
         my_property.setProperty_updated(request.getParameter("property_updated"));
         //my_property.getProperty_updated_by(request.getParameter("property_updated_by"));
         PropertyDAO.UpdateProperty_to_DB(my_property);
    out.println("<table border=1 cellpadding=0 cellspacing=0><tr><td><table"+
              "width=100% border=1 cellpadding=2 cellspacing=1>");
    if ((my_property = PropertyDAO.GetProperty_fromDB(property)) != null){
         property= my_property.getProperty() ;
        property_type = my_property.getProperty_type() ;
            property_name = my_property.getProperty_name() ;
        property_created = my_property.getProperty_created() ;
        property_created_by= my_property.getProperty_created_by() ;
        property_updated = my_property.getProperty_updated() ;
        property_updated_by= my_property.getProperty_updated_by() ;
         out.println("<TR BGCOLOR='#ffffff'><TD BGCOLOR='#cccccc' nowrap>ID</td><td> " + property + " </TD></tr>");
         out.println("<TR BGCOLOR='#ffffff'><TD BGCOLOR='#cccccc' nowrap>Tyyp</td><td> <SELECT ><OPTION value="+my_property.getProperty_name()+" 'name='property_type'>"+property_type+"</OPTION></SELECT> </TD></tr>");
         out.println("<TR BGCOLOR='#ffffff'><TD BGCOLOR='#cccccc' nowrap>Nimetus</td><td> <b><font color='#0000ff'><input type='text' value='"+ property_name + "' name='name'></font></b></TD></tr>");
         out.println("<TR BGCOLOR='#ffffff'><TD BGCOLOR='#cccccc' nowrap>Loodud</td><td> "+ property_created + " </TD></tr>");
         out.println("<TR BGCOLOR='#ffffff'><TD BGCOLOR='#cccccc' nowrap>Looja</td><td> " + property_created_by + " </TD></tr>");     
         out.println("<TR BGCOLOR='#ffffff'><TD BGCOLOR='#cccccc' nowrap>Uuendatud</td><td> <b><font color='#0000ff'><input type='text' value='"+ property_updated + "' name='updated'></font></b></TD></tr>");
         out.println("<TR BGCOLOR='#ffffff'><TD BGCOLOR='#cccccc' nowrap>Uuendaja</td><td> " + property_updated_by + " </TD></tr>");     
    out.println("</table></td></tr></table>");
    %>
    <input type="button" value="muuda vara" onClick="muuda_vara()">
    <input type="button" value="salvesta" onClick="salvesta()">
    </form>
    </body>
    </html>The problem is that i have no clue(allthough i have chekced the forums for help and experimented and i still could not make it work) how to make a dropdown menu for out.println("<TR BGCOLOR='#ffffff'><TD BGCOLOR='#cccccc' nowrap>Tyyp</td><td> <SELECT ><OPTION value="+my_property.getProperty_name()+" 'name='property_type'>"+property_type+"</OPTION></SELECT> </TD></tr>"); this. I have tryed http://forum.java.sun.com/thread.jspa?forumID=45&threadID=5241837 this page and that messes my "" up. If anyone can give me any tips how to integrate that code what is posted in the link to mine please let me know.
    Second problem is that when i push the save button, then i get a runtime error and a joyce to i want to debug or not. And as well in the example which i got from the teacher works just fine.
         //my_property.getProperty_updated_by(request.getParameter("property_updated_by")); this without the // get the not aplicable error as well(that in my other class file which is linked to this jsp the parameter is not aplicable). i managed to make in other jsp problem identical problem go away by adding a declaration of string and adding that string into the getParameter and this case everything should be okei, but it is not :(
    Anyway property.jsp uses property.java to get the getParameter and setParameter, PropertyDAO is the database stuff (connecting to database, getting data from the database).
    To be on the safe side i will add my propertyDAO.java
    package property.dao;
    import java.sql.* ;
    import property.core.Property ;
    import property.log.MyLogger ;
    import java.util.*;
    public class PropertyDAO {
        private int propertycount ;
        ResultSet VaraHulk ;
        String sql ;
        String url = "jdbc:postgresql://localhost/database";
        String usr = "";
        String pwd = "";
        Connection db ;     
        Statement  st ;
        Property [] VaraMassiiv  ;
        Property Current_Property ;
      public PropertyDAO(){
           try{
                   ResourceBundle bundle = ResourceBundle.getBundle("DBConnection");
                    this.url = bundle.getString("URL");
                    this.usr = bundle.getString("usr");
                    this.pwd = bundle.getString("pwd");
                    Class.forName(bundle.getString("Driver"));
           }catch(Exception ex){
                MyLogger MyLogger = new MyLogger();
               MyLogger.Log("dao.propertyDAO():",ex.getMessage());
           public Property [] getProperty_fromDB(){
                try{
                     this.db = DriverManager.getConnection(this.url, this.usr, this.pwd);
                     this.st = this.db.createStatement();
                    sql = "select count(*) as varade_arv from property" ;
                    VaraHulk = this.st.executeQuery(sql);
                    while(VaraHulk.next()){
                         this.propertycount = VaraHulk.getInt("varade_arv");
                    sql = "select property, property_type.name AS property_type, property.name AS property_name, " +
                              "property.created AS property_created, employee.first_name "+
                  "AS property_created_by, property.updated AS property_updated,employee.first_name AS property_updated_by" +
                  " from property, property_type, employee where property_type."+
                  "property_type=property.property_type and property.created_by=employee.employee ORDER by property" ;
                    VaraHulk = this.st.executeQuery(sql);
                    VaraMassiiv = new Property[this.propertycount];
                    int cnt = 0;
                    while(VaraHulk.next()){
                         Current_Property = new Property();   
                         Current_Property.setProperty(VaraHulk.getInt("property"));
                         Current_Property.setProperty_type(VaraHulk.getString("property_type"));
                      Current_Property.setProperty_name(VaraHulk.getString("property_name"));
                      System.out.println("getProperty_name:" + Current_Property.getProperty_name() );
                      Current_Property.setProperty_created(VaraHulk.getString("property_created"));
                      System.out.println("getProperty_created:" + Current_Property.getProperty_created() );
                      Current_Property.setProperty_created_by(VaraHulk.getString("property_created_by"));
                      System.out.println("getProperty_created_by:" + Current_Property.getProperty_created_by() );
                      Current_Property.setProperty_updated(VaraHulk.getString("property_updated"));
                      System.out.println("getProperty_updated:" + Current_Property.getProperty_updated() );
                      Current_Property.setProperty_updated_by(VaraHulk.getString("property_updated_by"));
                      System.out.println("getProperty_updated_by:" + Current_Property.getProperty_updated_by() );
                      VaraMassiiv[cnt] = Current_Property ;
                      cnt =  cnt + 1;
                       this.db.close();
                }catch(Exception ex){
                     MyLogger MyLogger = new MyLogger();
                    MyLogger.Log("property.getProperty_fromDB():",ex.getMessage());
                return VaraMassiiv;
           public Property GetProperty_fromDB(int property){
                try{
                     this.db = DriverManager.getConnection(this.url, this.usr, this.pwd);
                    this.propertycount = 0;
                    this.st = this.db.createStatement();
                    sql = "select property, property_type.name AS property_type, property.name AS property_name, property.created AS property_created, employee.first_name "+
                  "AS property_created_by,property.updated AS property_updated, employee.first_name AS property_updated_by" +
                  " from property, property_type, employee where property_type."+
                  "property_type=property.property_type and property.created_by=employee.employee and property.property =" + Integer.toString(property) ;
                    VaraHulk = this.st.executeQuery(sql);
                    while(VaraHulk.next()){
                         Current_Property = new Property();
                      Current_Property.setProperty(VaraHulk.getInt("property"));
                      Current_Property.setProperty_type(VaraHulk.getString("property_type"));
                      Current_Property.setProperty_name(VaraHulk.getString("property_name"));
                      System.out.println("getProperty_name:" + Current_Property.getProperty_name() );
                      Current_Property.setProperty_created(VaraHulk.getString("property_created"));
                      System.out.println("getProperty_created:" + Current_Property.getProperty_created() );
                      Current_Property.setProperty_created_by(VaraHulk.getString("property_created_by"));
                      System.out.println("getProperty_created_by:" + Current_Property.getProperty_created_by() );
                      Current_Property.setProperty_updated(VaraHulk.getString("property_updated"));
                      System.out.println("getProperty_updated:" + Current_Property.getProperty_updated() );
                      Current_Property.setProperty_updated_by(VaraHulk.getString("property_updated_by"));
                      System.out.println("getProperty_updated_by:" + Current_Property.getProperty_updated_by() );
                      this.propertycount =   this.propertycount + 1;
                    this.db.close();
                } catch(Exception ex){
                     MyLogger MyLogger = new MyLogger();
                    MyLogger.Log("PropertyDAO.GetProperty_fromDB():",ex.getMessage());
                return Current_Property ;
          public void UpdateProperty_to_DB (Property updated_property){
                try{
                     this.db = DriverManager.getConnection(this.url, this.usr, this.pwd);
                     this.st = this.db.createStatement();
                     int stmtInt = this.st.executeUpdate("update property set property_type='" + updated_property.getProperty_type() +
                               "',name=" +  updated_property.getProperty_name() + ",created=" + updated_property.getProperty_created() +
                               ",'created_by='" + updated_property.getProperty_created_by() +  ",updated="+updated_property.getProperty_updated()+
                               ",updated_by="+updated_property.getProperty_updated_by()+
                               "' where property=" + Integer.toString(updated_property.getProperty() ));
                     this.db.close(); 
                }catch(Exception ex){
                        MyLogger MyLogger = new MyLogger();
                        MyLogger.Log("PropertyDAO.UpdateProperty_to_DB():",ex.getMessage());
           public void finalize(){
                 try{
                   System.out.println("finalize");
                  }catch(Exception ex){ 
                    MyLogger MyLogger = new MyLogger();
                    MyLogger.Log("PropertyDAO.finalize():",ex.getMessage());
    }Property.java
    package property.core;
    import property.log.MyLogger ;
    public class Property {
        //private int propertycount ;
        private int property ;
        //private int current_property ;
        private String property_type ;
        private String property_name ;
        private String property_created ;
        private String property_created_by;
        private String property_updated_by;
        private String property_updated;
        public Property(){
             try{
             }catch(Exception ex){
                   MyLogger MyLogger = new MyLogger();
                   MyLogger.Log("core.Property():",ex.getMessage());
        public void setProperty (int property){
             this.property = property;
        public void setProperty_type (String property_type){
             this.property_type = property_type;
        public void setProperty_name (String property_name){
             this.property_name = property_name;
        public void setProperty_created ( String property_created){
             this.property_created = property_created;
        public void setProperty_created_by (String property_created_by){
             this.property_created_by = property_created_by;
        public void setProperty_updated ( String property_updated){
             this.property_updated = property_updated;
        public void setProperty_updated_by (String property_updated_by){
             this.property_updated_by = property_updated_by;
        public int getProperty () {
             return this.property ;
        public String getProperty_type () {
             return this.property_type ;
        public String getProperty_name () {
             return this.property_name ;
        public String getProperty_created () {
             return this.property_created;
        public String getProperty_created_by () {
             return this.property_created_by;
        public String getProperty_updated () {
             return this.property_updated;
        public String getProperty_updated_by () {
             return this.property_updated_by;
        public void finalize(){
             try{
                  System.out.println("finalize");
             }catch (Exception ex){
                   MyLogger MyLogger = new MyLogger();
                   MyLogger.Log("core.Property():",ex.getMessage());
    }(well it took me 3 days to get the code to work that much as it does anyways)
    hope someone here can help
    Edited by: kohuke on May 30, 2008 11:27 AM
    Added few codes that is connected with the current jsp page

    are you sure your stop() are in the right place??
    eg.. on the last frame of the onRollOver animation??
    also... why have you got on(releaseOutside); ???
    onRollOut will suffice.

  • Business Contact Manager 2013 Issue with drop down menus not working correctly and BCM disappearing.

    We upgraded from BCM 2007 to BCM 2013.  Now the BCM disappears from Outlook occasionally and the drop down menus are confused. for instance when accessing the drop down for phone numbers, the user selects company - but the field for TTY/TDD comes up.
    Shows fields that don't exist etc.
    The client is using Office 2013 Pro Premium from Office 365 Small Business Premium subscription and BCM downloaded from Microsoft website.
    Please let me know what the support avenues are for this product.
    Chris Smith

    Hi,
    This issue may be caused since the BCM was not installed properly.
    Please go to Control Panel -> Programs and Features, find Business Contact Manager for Microsoft Outlook and Uninstall it.
    Then go to
    http://www.microsoft.com/en-us/download/details.aspx?id=36513, download the right version of BCM(32bit or 64bit) and install it.
    If issue persists, you may provide the screenshots of the issue, post them to SkyDrive and share it via a link:https://skydrive.live.com/, then we will have a better understanding on the issue.
    Thanks,
    Melon Chen
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click
    here

  • Firefox tab to fields and drop down lists with Mac OS X 10.5 (Leopard)

    Has any one else noticed some problems after upgrading to OS X 10.5? It seems I can't tab to every field, such as the "Keep me signed in for today" checkbox on ebay's login page. I used to tab to it before upgrading. I'm also tabbing past some drop down lists where you select the state where you live in sign up pages. And before you suggest it, I have already turned on "All Controls" in System Preferences->Keyboard & Mouse. I don't think that affects Firefox anyway since it is a system controls option and doesn't affect the actions in a browser window.
    Also, some drop down lists no longer drop down. I can focus on the list and even change the value using the up and down arrows, but the full list is no longer displayed. Again, this changed with the upgrade to Leopard.
    If any one has experienced these specific issues or something similar please share your thoughts and solutions.
    Mark

    I am also having the drop down problem on my macbook, it's getting really annoying. On top of that, twice today (i just got the macbook three days ago) my keyboard will just stop working- i cannot type in firefox nor in finder or word.

  • Firefox drop-down lists make X server crash

    Hey guys,
    I am requesting for help because I am having a really annoying bug I can't find assistance for online.
    When drop-down lists come up in firefox (such as the autocomplete when typing something on the search box), every now and then, it makes the X server crash. It is really not happening every time but it is enough to make the X server crash some at least once a day, often more. This also happens when such drop-down lists come up in Zotero, and add-on I am using.
    It seems somewhat similar to what has been reported here: http://bbs.archlinux.org/viewtopic.php?id=96137
    I am not quite sure which logs should I be looking at nor where should I report this. Could someone help me figuring this out?
    Thanks ,
    Michael

    I am also having the drop down problem on my macbook, it's getting really annoying. On top of that, twice today (i just got the macbook three days ago) my keyboard will just stop working- i cannot type in firefox nor in finder or word.

  • Getting problem in hiding drop down list in jsp pages

    Hi All,
    I have a jsp in which i created a tabbed panel & put 3 forms .
    1 of the form contains 3 drop dwom list & few text boxes.
    All 3 forms are inside <div> tags .
    Clicking on any one of the tab corresponding form is getting displayed with all its form fields hiding other 2 form fields.
    but problem is coming with 1 form having drop down list.
    all its field get hidden except these drop down list.
    i am using following script to hide other forms
    function showit(tab){
        if(tab == "tab1stuff"){
            document.getElementById('tab1stuff').style.zIndex="2";
            document.getElementById('tab2stuff').style.zIndex="1";
            document.getElementById('tab3stuff').style.zIndex="1";
              document.getElementById('tab4stuff').style.zIndex="1";
        else if(tab == "tab2stuff"){
            document.getElementById('tab2stuff').style.zIndex="2";
            document.getElementById('tab1stuff').style.zIndex="1";
            document.getElementById('tab3stuff').style.zIndex="1";
              document.getElementById('tab4stuff').style.zIndex="1";
        else if(tab == "tab3stuff"){
            document.getElementById('tab3stuff').style.zIndex="2";
            document.getElementById('tab1stuff').style.zIndex="1";
            document.getElementById('tab2stuff').style.zIndex="1";
              document.getElementById('tab4stuff').style.zIndex="1";
    }Plz help me in this regard.
    I used style.visible="false" but that is not working here.
    Thanks in advance.

    Thanks you very much.
    Now I am using javascript
    if(tab == "tab1stuff"){
            document.getElementById('tab1stuff').style.visibility="visible";
            document.getElementById('tab2stuff').style.visibility="hidden";
            document.getElementById('tab3stuff').style.visibility="hidden";
            document.getElementById('tab4stuff').style.visibility="hidden";
        } Its working ..Earliar it was PHP script.

  • Problem in sending drop down list value to jsp page showing  null value

    i am trying to send a drop down list value from client side to a jsp page but getting null value
    this is first page where i have accessed data from database and putted it in a drop down list
    <select name="sub">
         <%
         while(rs2.next())
         cat=rs2.getString(1);
         %><option value="<%=cat%>"><%=cat%></option><%
         }%></select>
    <input type="submit" value="Go"></input>
    now on submit i am going to another page
    where i want the selected value from drop down list to be printed
    i have used there
    <%
    String subject= request.getParameter( "sub.value" );
    out.println(subject);
    %>
    but it is printing null here what is the problem that i m facing
    thanx & reagrds
    sweety

    how to generate dynamically names for text boxes
    i am generating text boxes in while loop when selecting data from database
    while(rs1.next())
    name=rs1.getString(1);%>
    <tr>
    <td>1</td>
    <td><%out.println(name);
    //i am printing here stud_id a unique key and want to update records from following text boxes to particular stud_id
    %></td>
    <td><input type="text" name="????"></input></td>
    <td><input type="text" name="????"></input></td>
    <td><input type="text" name="????"></input></td>
    <td><input type="text" name="????"></input></td>
    </tr><%
    the structure is like
    stud_id | attended theory | conducted theory | ateended practical | conducted practical
    where attended theory, conducted theory............. are to be inputed manually for all students and then update in database
    so i am facing problem in generating names for textboxes how to do that
    so that those can be updated in database for particular student
    Thanx & Regards
    sweety

  • JSP problem - drop down combo boxes

    Hi,
    I want to load a database table value into my HTML form's dropdown combo box.
    Actually I want to do this. I need to change employee information. To do this there is a form to enter empNo. Then it will display a .jsp page with the relevant fields of that employee. In this .jsp page, it has a drop down combo box for title. In my db the required title of that employee is Miss.
    But how could I display this value in this dropdown combo box. Then the user can change it as she wish.
    I try it like this way, but it isn't work.
    <select size="1" name="title" style="border: 1px solid #0000FF">
           <jsp:getProperty name="candidate" property="title" />
    </select>     Can anybody tell me hoe to solve this?
    Thanks.

    Hi,
    Thanks for your help.
    I have change that code, as follows.
    <select size="1" name="title" style="border: 1px solid #0000FF">
    <option value="" ><jsp:getProperty name="candidate" property="title" /></option>
    </select> Now it displays the correct title. But how can I display the other 2 options below this? that is Mr. and Mrs. Because the user must have the facility to select Miss. or Mrs. if there any changes she wish to apply.
    Note:
    If a user has a title - Mr. , then the other 2 titles (Miss,Mrs) should be display below it.
    How to solve this?
    Thanks

Maybe you are looking for

  • HP Envy 14 (2020NR) - randomly missed keystrokes after wake from sleep (on battery power only)

    While running on battery power, sometimes when I wake from sleep, keystrokes will randomly be missed. It doesn't always happen, and I need to do more experimentation to figure out just how often it occurs. To fix it, I just reboot the computer (while

  • Directory structure for Applets

    The Tutorial recommends storing the applet class in the same directory as the HTML file. Is this the usual best practice? If not is there a preferred directory structure. I've noticed that the codebase relative URL "../myclasses/" doesn't work from t

  • How to get the output

    Hi I have a table which contain data like [email protected], [email protected] I want output as In/abcd In/abcd1 I want remove the @yahoo.com or @yahoo.co.in How to accomplish using sql Thanks and regards

  • G550 Wireless whitelist, which FRU to get for 802.11n upgrade

    I have a preconfigured T4300 G550 that came with a 2 antenna 11g WLAN adapter.  I want to upgrade to 11n and am aware of the whitelist.  But in looking at posts here an elsewhere not all Lenovo device IDs will work in all systems so it's not enough t

  • Pop up in modulepool

    Hi i create a screen in that i place a pushbutton like MORE if i press this i use call screen <screen num> starting at 23 5 ending at 14 5. it cals the another screen up to that is fine and in the second(popup) screen i place a EXIT push button i wri