Combo box in jsp : implemented by struts tiles

Hi,
I have few problems with JSP...
we have devided the body part in the tiles into two parts
initially..................
body1: jsp with combo box
body2: a blank jsp
if the user selects an option from the combo box..in onchange function ..iam getting the value of the selected option..and iam doing form.action="action selected by user" ... so that it will go the struts-config then inturn will call the action then by forwarding success..will go to the struts-config file again ..then by have name="seccess".. it will call path="somedefinition"....this definition is defined in the tiles-definition file...
where again...extending some standard definition by overriding ..
body1:jsp with combo box
body2:jsp related to the selected option..in the combo box
second time.. in body1: again we r calling original jsp na..it will show default select only na??
so how to get the selected option and how i can give that option as selected when it is loading second time.
Hope you got my problem...
Please help me out...
Waiting for ur kind reply
Thanks & Regards
Kranti Kiran Kumar Parisa
Software Engineer [ e-Biz ]
[email protected]

It's not nice to highjack someone elses thread. I posted a reply http://forum.java.sun.com/thread.jsp?forum=45&thread=552915 (though I shouldn't have, shoulda done it here). if you have questions post them to this thread instead. Leave the other one to the OP's question.

Similar Messages

  • Problem regarding Combo boxes in JSP

    Hi all,
    I have two combo boxes on jsp page, i want to fill the second CB by value of first CB, and both CBs have values from Database, i tried it many times but cant got solution
    plz help me its very urgent and if possible provide code plz
    thanks

    http://forum.java.sun.com/thread.jspa?threadID=597553

  • Combo Box in JSP

    Hi,
    I am a student and working on a class project. In my application at some point, I need to provide a combo box where user can select multiple values and those values should automatically be printed in a text area provided below the combo box. Is this possible?

    The Only Way By which U can achieve this is by a scripting languages like javascript,vbscript......
    Nvr By JSP(Is nothing but a servlet under execution @ background of webserver) as it is meant for Server Side Programming Surely not for Client Side Dynamic Action.
    Make use of <select> with multiple property set to true....
    and then.... append selected values in the second textbox.
    You may go throgh the code given below
    c whether that can help u out.....
    CLIENT.JSP
    =========
    <%@ page language="JAVA">
    <html>
    <head>
    <script>
    function change(){
    var x=document.getElementById("mySelect")
    document.getElementById("result").value = ""
    for(var i=0;i < x.length;i++){
    if(x.options.selected == true)
    document.getElementById("result").value = document.getElementById("result").value + " "+x.options[i].value
    </script>
    </head>
    <body>
    <select id="mySelect" size="4" multiple onchange="change()">
    <option value='Apple'>Apple</option>
    <option value='Pear'>Pear</option>
    <option value='Banana'>Banana</option>
    <option value='Orange'>Orange</option>
    </select>
    <input type='text' value='' size='10' name='result' id="result">
    </body>
    </html>
    REGARDS,
    RaHuL

  • How to get value of html combo box (i.e select) in jsp?

    Hello,
    I was just wondering how to get value of html combo box in jsp page. My code for combo box is:
    <select name="combo" size="1">
    <%
    List<Project> projects = mgr.getProjects();
    for(Project project : projects){
    %>
    <option value="<%= project.getId()%>"><%= project.getName()%></option>
    <%
    %>
    </select>
    I thought combo.value might give me the value, but it throws exception.
    Any help is appreciated.
    Thanks.

    The combo does not exists in Java, but only in HTML. You have to submit the form containing the combo and then use request.getParameter("combo") to get it's value ;-)

  • Populating Database values into a combo box in STRUTS Framework

    Hi Guys,
    I am currently working on a STRUTS Framework project and I can't get much resources related to the problems that I'm facing.
    Currently I need to populate a JSP file's Combo box with database values. What I don't know here is the syntax used to in STRUTS framework to populate the Combo box with database values. Anyone with experience related to this topic, please kindly help me out.

    Struts doesn't define anything about the datab layer. You're free to implement how you will.
    Struts instead guides you into following an MVC pattern.
    You populate a combo box with values from a bean.
    So you need to set up a bean for this page to talk to.
    That bean can be populated from the database - but at that point you're in java/jdbc code - and away from the struts layer.
    My suggestions
    1 - Define a bean to represent the information from the database.
    2 - write a method that queries the database, and copies the data into a List of those beans. This will be your Data access layer.
    3 - in your action, call that method, and then set the list of beans as a request attribute. Or maybe as a property on a form.
    4 - use that list of beans to populate your dropdown box.

  • How to populate the combo boxes that are created dynamically in jsp

    Hi,
    I am using JSP.
    I am creating combo boxes dynamically (based on the num selected by the user). These dynamically created combo boxes need to have A-Z as options (each box) . Now, when the user chooses the option A in any of the combo-boxes,the rest should not have this option. so on..
    how do i achieve this.Kindly help.

    You'll need to use JavaScript...I have a complicated example and a simple example, however, I cannot really understand the complex example but I know how it works. The looping is too complex for me.
    First you'll need to populate a server side variable...depending on how often the data is updated you may want this to run each time a new session is created...this example is run each time Tomcat is started and the application context is initialized:
    package kms.web;
    // Servlet imports
    import javax.servlet.ServletContextListener;
    import javax.servlet.ServletContextEvent;
    import javax.servlet.ServletContext;
    // utility imports
    import java.util.Map;
    // domain imports
    import kms.domain.LocationService;
    import kms.domain.DeptService;
    import kms.domain.PatentService;
    * This listenter is used to initialize
    * the Maps of Locations, Patents & Depts used to populate
    * pulldown lists in JSPs
    public class InitializeData implements ServletContextListener {
        * This method creates the Maps.
       public void contextInitialized(ServletContextEvent sce) {
          ServletContext context = sce.getServletContext();
          LocationService lServ = new LocationService();
          // Create the Maps
          Map campuses = lServ.getCampuses();
          Map buildings = lServ.getBuildings();
          Map floors = lServ.getFloors();
          Map locs = lServ.getLocations();
          // And store them in the "context" (application) scope
          context.setAttribute("campuses", campuses);
          context.setAttribute("buildings", buildings);
          context.setAttribute("floors", floors);
          context.setAttribute("locs", locs);
          DeptService dServ = new DeptService();
          Map depts = dServ.getDepts();
          context.setAttribute("depts", depts);
          PatentService pServ = new PatentService();
          Map patents = pServ.getPatents();
          context.setAttribute("patents", patents);
          //I did this one myself
    /*    CodeService cServ = new CodeService();
          Map masterMks = cServ.getCodes();
          context.setAttribute("masterMks", masterMks);
        * This method is necessary for interface.
       public void contextDestroyed(ServletContextEvent sce) {
       // I have no clue what the heck this is for???
       // Let me know if you do!
    }So now we travel into the PatentService method called 'getPatents();' which in turn calls a PatentDAO method
    Map patents = pServ.getPatents();
    Below is the code for the PatentService object:
    package kms.domain;
    import kms.util.ObjectNotFoundException;
    import java.util.*;
    * This object performs a variety of dept services, like retrieving
    * a dept object from the database, or creating a new dept object.
    public class PatentService {
       * The internal Data Access Object used for database CRUD operations.
      private PatentDAO patentDAO;
       * This constructor creates a Dept Service object.
      public PatentService() {
        patentDAO = new PatentDAO();
    public Map getPatents() {
          Map patents = null;
          try {
            patents = patentDAO.retrieveAll();
          // If the dept object does not exist, simply return null
          } catch (ObjectNotFoundException onfe) {
            patents = null;
          return patents;
    }It may be useful for you to see the code of the Patent class:
    package kms.domain;
    /*** This domain object represents a dept.
    public class Patent implements java.io.Serializable {
      private int codeGgm;
      private String name = "";
      private String description = "";
      private int creator;
      private String creationDate = "";
      private int used;
       * This is the full constructor.
      public Patent(int codeGgm, String name, String desc, int creator, String creationDate, int used) {
        this.codeGgm = codeGgm;
        this.name = name;
        this.description = desc;
        this.creator = creator;
        this.creationDate = creationDate;
        this.used = used;
      public Patent() { }
      public int getCodeGgm() {
          return codeGgm;
      public void setCodeGgm(int codeGgm) {
           this.codeGgm = codeGgm;
      public String getName() {
        return name;
      public void setName(String name) {
          this.name = name;
      public String getDesc() {
        return description;
      public void setDesc(String desc) {
          this.description = desc;
      public int getCreator() {
          return creator;
      public void setCreator(int creator) {
             this.creator = creator;
      public String getCreationDate() {
          return creationDate;
      public void setCreationDate(String creationDate) {
             this.creationDate = creationDate;
      public int getUsed() {
           return used;
      public void setUsed(int used){
           this.used = used;
    }And here is the Database table which stores the Patents:
    DESC PATENT:
    CODE_GGM NUMBER(3)
    NAME VARCHAR2(15)
    DESCRIPTION VARCHAR2(250)
    CREATOR NUMBER(10)
    CREATION_DATE DATE
    USED NUMBER(1)
    So, we then travel into the code of the PatentDAO to see how the DAO object executes the DB query to get all of the Data we need for the select list:
    package kms.domain;
    import javax.naming.*;
    import javax.sql.*;
    import java.util.*;
    import java.sql.*;
    import kms.util.*;
    * This Data Access Object performs database operations on Patent objects.
    class PatentDAO {
       * This constructor creates a Patent DAO object.
       * Keep this package-private, so no other classes have access
    PatentDAO() {
    * This method returns a Map of all the Dept names
    * The key is the Dept id
    Map retrieveAll()
           throws ObjectNotFoundException {
          Connection connection = null;
          ResultSet results = null;
          // Create the query statement
          PreparedStatement query_stmt = null;
          try {
            // Get a database connection
          Context initContext = new InitialContext();
           DataSource ds = (DataSource)initContext.lookup("java:/comp/env/jdbc/keymanOracle");
           connection = ds.getConnection();
            // Create SQL SELECT statement
            query_stmt = connection.prepareStatement(RETRIEVE_ALL_NAMES);
            results = query_stmt.executeQuery();
            int num_of_rows = 0;
          Map patents = new TreeMap();
             // Iterator over the query results
            while ( results.next() ) {
                patents.put(new Integer(results.getInt("code_ggm")), results.getString("name"));
             if ( patents != null ) {
                      return patents;
                    } else {
                      throw new ObjectNotFoundException("patent");
           // Handle any SQL errors
         } catch (SQLException se) {
            se.printStackTrace();
           throw new RuntimeException("A database error occured. " + se.getMessage());
        } catch (NamingException se) {
          throw new RuntimeException("A JNDI error occured. " + se.getMessage());
          // Clean up JDBC resources
          } finally {
            if ( results != null ) {
              try { results.close(); }
              catch (SQLException se) { se.printStackTrace(System.err); }
            if ( query_stmt != null ) {
              try { query_stmt.close(); }
              catch (SQLException se) { se.printStackTrace(System.err); }
            if ( connection != null ) {
              try { connection.close(); }
              catch (Exception e) { e.printStackTrace(System.err); }
    private static final String RETRIEVE_ALL_NAMES
          = "SELECT code_ggm, name FROM patent ";
    }Now when you wish to use the 'combo box' (also called select lists), you insert this code into your jsp:
    <TR>
    <%@ include file="../incl/patent.jsp" %>
    </TR>
    depending on how your files on your server are organized, the "../incl/patent.jsp"
    tells the container to look up one directory from where the main jsp is to find the 'patent.jsp' file in the 'incl' directory.
    I need some help creating multi-level select lists with JavaScript:
    Can anyone explain this code:
    <%@ page import="java.util.*,kms.domain.*" %>
    <jsp:useBean id="campuses" scope="application" class="java.util.Map" />
    <TR><TD ALIGN='right'>Campus: </TD>
    <TD>
    <select name="campus" size="1" onChange="redirect(this.options.selectedIndex)">
    <option value="0" selected>No Campus</option>
    <% LocationService ls = new LocationService();
       Iterator c = campuses.keySet().iterator();
       Map[] bm = new Map[campuses.size()];
       Map[][] fm = new Map[campuses.size()][0];
       Map[][][] lm = new Map[campuses.size()][0][0];
       int i2 = 0;
       int j2 = 0;
       int k2 = 0;
       int jj = 0;
       int kk = 0;
       while (c.hasNext()) {
          Integer i = (Integer)c.next();
          out.print("<OPTION ");
          out.print("VALUE='" + i.intValue()+ "'>");
          out.print( (String) campuses.get(i) );
          out.print("</OPTION>");
          bm[i2] =  ls.getBuildingsByCampus(i.intValue());
          fm[i2] = new Map[bm[i2].size()];
          lm[i2] = new Map[bm[i2].size()][];
          Iterator b = bm[i2].keySet().iterator();
          j2 = 0;
          while (b.hasNext()) {
            Integer j = (Integer)b.next();
            fm[i2][j2] = ls.getFloorsByBuilding(j.intValue());
            lm[i2][j2] = new Map[fm[i2][j2].size()];
            Iterator f = fm[i2][j2].keySet().iterator();
            k2 = 0;
            while (f.hasNext()) {
              Integer k = (Integer)f.next();
              lm[i2][j2][k2] = ls.getLocationsByFloor(k.intValue());
              k2++;
              kk++;
            j2++;
            jj++;
          i2++;
       } %>
    </select></TD>
    </TR>
    <TR><TD ALIGN='right'>Building: </TD>
    <TD>
    <select name="building" size="1" onChange="redirect1(this.options.selectedIndex)">
    <option value="0" selected>No Building</option>
    </select></TD>
    </TR>
    <TR><TD ALIGN='right'>Floor: </TD>
    <TD>
    <select name="floor" size="1" onChange="redirect2(this.options.selectedIndex)">
    <option value="0" selected>No Floor</option>
    </select></TD>
    </TR>
    <TR><TD ALIGN='right'>Room: </TD>
    <TD>
    <select name="location_id" size="1">
    <option value="0" selected>No Room</option>
    </select></TD>
    </TR>
    <script>
    var cNum = <%=i2%>
    var bNum = <%=jj%>
    var fNum = <%=kk%>
    var cc = 0
    var bb = 0
    var ff = 0
    var temp=document.isc.building
    function redirect(x){
    cc = x
    for (m=temp.options.length-1;m>0;m--)
      temp.options[m]=null
      temp.options[0]=new Option("No Building", "0")
      if (cc!=0) {
        for (i=1;i<=group[cc-1].length;i++){
          temp.options=new Option(group[cc-1][i-1].text,group[cc-1][i-1].value)
    temp.options[0].selected=true
    redirect1(0)
    var group=new Array(cNum)
    for (i=0; i<cNum; i++) {
    group[i]=new Array()
    <% for (int i=0; i< bm.length; i++) {
    Iterator bldgs = bm[i].keySet().iterator();
    int j = 0;
    while (bldgs.hasNext()) {
    Integer intJ =(Integer) bldgs.next(); %>
    group[<%=i%>][<%=j%>] = new Option("<%=bm[i].get(intJ)%>", "<%=intJ%>");
    <% j++;
    } %>
    var group2=new Array(cNum)
    for (i=0; i<cNum; i++) {
    group2[i] = new Array()
    for (j=0; j<=bNum; j++) {
    group2[i][j] = new Array()
    <% for (int i=0; i< fm.length; i++) {
    for (int j=0; j< fm[i].length; j++) {
    Iterator flrs = fm[i][j].keySet().iterator();
    int k = 0;
    while (flrs.hasNext()) {
    Integer intK =(Integer) flrs.next(); %>
    group2[<%=i%>][<%=j%>][<%=k%>] = new Option("<%=fm[i][j].get(intK)%>", "<%=intK%>");
    <% k++;
    } %>
    var temp1=document.isc.floor
    var camp=document.isc.campus.options.selectedIndex
    function redirect1(x){
    bb = x
    for (m=temp1.options.length-1;m>0;m--)
    temp1.options[m]=null
    temp1.options[0]=new Option("No Floor", "0")
    if (cc!=0 && bb!=0) {
    for (i=1;i<=group2[cc-1][bb-1].length;i++){
    temp1.options[i]=new Option(group2[cc-1][bb-1][i-1].text,group2[cc-1][bb-1][i-1].value)
    temp1.options[0].selected=true
    redirect2(0)
    var group3=new Array(cNum)
    for (i=0; i<cNum; i++) {
    group3[i] = new Array()
    for (j=0; j<=bNum; j++) {
    group3[i][j] = new Array()
    for (k=0; k<=fNum; k++) {
    group3[i][j][k] = new Array()
    <% for (int i=0; i< lm.length; i++) {
    for (int j=0; j< lm[i].length; j++) {
    for (int k=0; k< lm[i][j].length; k++) {
    Iterator locs = lm[i][j][k].keySet().iterator();
    int m = 0;
    while (locs.hasNext()) {
    Integer intM =(Integer) locs.next(); %>
    group3[<%=i%>][<%=j%>][<%=k%>][<%=m%>] = new Option("<%=lm[i][j][k].get(intM)%>", "<%=intM%>");
    <% m++;
    } %>
    var temp2=document.isc.location_id
    function redirect2(x){
    ff = x
    for (m=temp2.options.length-1;m>0;m--)
    temp2.options[m]=null
    temp2.options[0]=new Option("No Room", "0")
    if (cc!=0 && bb!=0 && ff!=0) {
    for (i=1;i<=group3[cc-1][bb-1][ff-1].length;i++){
    temp2.options[i]=new Option(group3[cc-1][bb-1][ff-1][i-1].text,group3[cc-1][bb-1][ff-1][i-1].value)
    temp2.options[0].selected=true
    </script>
    This produces a related select list with 4 related lists by outputting JavaScript to the page being served. It works the same way as the first example that I describe but I don't understand the looping...maybe someone could explain how to go from the single select list to a double and/or triple level drill down?

  • Struts tiles to create event based loading of tiles on a JSP

    Hi All,
    I am working on a web app where I am using struts tiles to create my JSPs. I have tiles for header, footer & nav bar.
    Now I want to break up my JSP body in multiple tiles. It is required that I insert only one body tile initially, say body1, which contains few hyperlinks. Depending on which link is clicked, I would attach another tile (body2) below the first one. Can any advanced tiles user inform me if it's possible with struts-tiles, & if yes how?
    Thanks.

    Tiles is basically used to overload the jsp pages and reuse them.
    In your tiles-defs.xml file:
    //Tiles for header, footer and nav bar goes here
    //Tiles for body1 and body2  goes here
    <definition name="BodyTile" page="/yourPage.jsp">
              <put name="body1" value="/blank.jsp" />
              <put name="body2" value="/blank.jsp" />
    </definition>
    <!--Blank jsp is a simple html page without any data into it-->
    Now create a customized tile for your module. Mapping has to be done in struts-config.xml.
    Notice that the definitions here extend the tile from tiles-defs.xml, i.e. "BodyTile"
    <definition name="ActionOneWithBodyOne" extends="BodyTile">
        <put name="body1" value="/yourPage1.jsp" />
    </definition>
    <definition name="ActionTwoWithBodyTwo" extends="BodyTile">
        <put name="body1" value="/yourPage1.jsp" />
        <put name="body2" value="/yourPage2.jsp" />
    </definition>Now when you first load the page forward it to "ActionOneWithBodyOne" and it displays you just your body1.
    When ever u click a link on body 1, after performing the action populate the form bean corresponding to yourPage2.jsp and forward the action to "ActionTwoWithBodyTwo".
    Hope that helps!!
    SirG

  • How can we pass selected combo box value to a jsp pag?

    Hi All,
    I want to pass selected combo box value to a same jsp page's variable.
    i am using javascript
    <select onchange="this.options[this.selectedIndex].text">
    </select>
    this selected value should be invoked for a jsp page's variable.
    Excepting for favorable reply
    Vansh

    select2.jsp
    <script>
    function x()
         alert(document.f.s.options[document.f.s.selectedIndex].text);
         document.f.submit();
    </script>
    <body>
    <form method="get" name="f" action="select2.jsp">
    <select name="s" onchange="x()">
    <option checked>--select--</option>
    <option value="1"> vijay </option>
    <option value="2"> kumar </option>
    </select>
    </form>
    </body>

  • JSP Combo box question

    How can I make a combo box have the ability to add new items in its list? I have an existing combo box that gets its value from an SQL query. How can I let users have the ability to add to that list? If this is not possible with JSP combo boxes, any suggestions as to what field I may use? Thanks

    Hello Russ9754!
    Might be abit late, but I just read this thread.
    Anyway...I think I have what you are looking for.
    This code creates a dropdown box with the alternatives of your choice. If none of the options is good enough for the user, he/she can choose "other" and enter a more suitable choice in a pop-up javascriptprompt.
    <FORM NAME="formName">
    <SELECT NAME="country" onChange="countryOnChange();">
    <OPTION VALUE="Albania" selected>- = Albania = -</OPTION>
    <OPTION VALUE="Finland">- = Finland = -</OPTION>
    <OPTION VALUE="USA">- = USA = -</OPTION>
    <OPTION VALUE="Other"> Other... </
    OPTION>
    </SELECT>
    </FORM>
    <SCRIPT>
    function countryOnChange(){
    sel = document.formName.country.selectedIndex;
    val = document.formName.country.options[sel].
    value;
    len = document.formName.country.length;
    if (val == "Other"){
    var newcountry = prompt("Enter your country.", "");
    if (newcountry == null) { return; }
    document.formName.country.options[sel].text = newcountry;
    document.formName.country.options[sel].value = newcountry;
    document.formName.country.length = len +1;
    document.formName.country.options[len].text = "Other...";
    document.formName.country.options[len].value = "Other";
    </SCRIPT>

  • Horizontal scroll bar for combo/lsit box in JSP

    hi,
    i want "Horizontal Scroll bar" for combo box to display long names.
    regards,
    krishna

    Not a JSP issue. Look up styles, CSS, and dynamic HTML. They should help.

  • 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

  • How to implement alphabetic search in combo box

    Hi all,
    how to implement alphabetic search in combo box through coding.
    Thanks for any replies

    Im not sure if I undestand correctly, but example is
    sCFL_ID = oCFLEvento.ChooseFromListUID
                        Dim oCFL As SAPbouiCOM.ChooseFromList
                        oCFL = oFormKontrolaMZ.ChooseFromLists.Item(sCFL_ID)
                        If oCFLEvento.BeforeAction = False Then
                            Dim oDataTable As SAPbouiCOM.DataTable
                            oDataTable = oCFLEvento.SelectedObjects
                                    val = oDataTable.GetValue(1, 0)
    oForm.DataSources.UserDataSources.Item("EditDS").ValueEx  = val
    and then load from datasource to matrix.
    hope it helps
    Petr

  • Jsp combo box

    Hi,
    I am new to jsps and i would like to know how to check the property value in jsp.
    I would like to create a combo box and based on what they select i would like to show either textfield or combo box. I mean hiding one and showing another one.
    my code looks some thing like this
    <html:select property="search" >
    <html : option value="itemname"></html:option>
    <html : option value="itemnumber"></html:option>
    So if i select "item name" i would like to display one more combo box or if i select "item number" then i would like to display textfield.
    So could some one please suggest me how to check the value and create these fields.
    Appreciate your help,
    Thanks

    You have three options.
    You may submit the form back to the server after the user selects the item name option. The server then generates and sends back to the user a page with the next combo box. Alternatively, if the user selects the item number option, send a new page with the text field.
    You may use JavaScript and DHTML to literally redraw the page depending on the user's choice. This is not Java related and kinda hard to get working just right, so I won't describe how to do it here. If you decide you absolutely must do this option, there are several JavaScript web sites that will gladly give you some sample code in exchange for some credit.
    Lastly, you can redesign your entire form such that you don't need to hide "the other option." I think you'll find that most web sites do it this way. For example, there will be two clearly separated and marked tables, each with their own submit buttons, and one table will say "Find an Item by Name" and the other will say "Find an Item by Number."
    I personally like the last option best because I can see at a glance what all of my options are, as opposed to having to click buttons to see what I can do, and then the back button if that's not what I want. I will admit that your suggestion would look cool, though.
    Sorry, I wish I could be of more positive help.

  • Default selection in combo box at struts form

    hi friends..i am new person in struts form..this is my prg.. display combo box value in 18. but i want 20...how to write program....plz anybody help me....thank you............
    <%
    for (int index = 18; index < 56; index++)                                                                           %>
    <html:option value="<%=index + ""%>">
    <%=index + ""%>
    </html:option>
    <% } %>

    what you need is field "value" in the select:
    [http://struts.apache.org/1.2.x/userGuide/struts-html.html#select]
    see "value" property
    (found it easily with "struts option selected" on google)

  • Struts combo box

    I have a combo box defined in JSP.
    So when I submit the page with multiple values selected in thsi combo box, I get "argument type mismatch exception" for the setter method defined in actionForm for this combo box. This method has a return type "Collection". Where do you think I am going wrong? What should be the return type here? I had String before but with I could get only the one value from the combo box
    (i.e first selected value).

    Yeah I got it, thanks. But why does it not take any other collections like Arraylist etc??

Maybe you are looking for

  • Creating a modern Contact Form in Dreamweaver or use an addon

    Hi I am looking for an easy way to create a modern contact form in Dreamweaver using and addon also will be fine Any ideas? I wan to create fields: Email: Drop down: with 3 options Simple text box Notes: Submit button Thanks

  • How can I remove multiple copies of the same song from the iTunes listing?

    How can I remove multiple copies of the same song from the iTunes listing. The program seems to be picking up the same songs from, for example, my user area and my public area in the C drive

  • [SOLVED] WLAN + Hidden ESSID (again)

    Hi, i know there are several threads about this topic, but none solved my problem. I need to to connect wirelessly (iwl4965) to an access point with hidden ESSID at my University without encryption. Is there a comfortable way to do that? The gnome ne

  • New Error Message

    I got this error message today. We have been running this page for well over a year with no problems: Error Executing Database Query. The system is out of memory. Use server side cursors for large result sets:null. Result set size:2,806,384. JVM tota

  • Backwards compatibility issue

    I've made some files using Photoshop CC (mac) and I'm trying to open them on a PC using Photoshop CS2 (unfortunately).  I'm getting an error and it won't allow me to open it.  I don't recall the error right now as the issue is happening at work.  I c