Multiselect dependant list box based on the database

i have to develop the jsp page with set of 3 list box which should display a field of a table. Based on the event over the list box1 listbox2 should be updated based on the selected item. For example when u click india on the list box 1 it should display all the states of india in the listbox two. Since it is multiselect when u choose pakistan the list box2 should display the states of india and pakistan.
This is my prob i am struggling for this for a long while please help me to solve the problem.
Thanks in advance.
I want to complete it before today evening i am also new to the jsp please help me...............

double post http://forum.java.sun.com/thread.jspa?threadID=659520&tstart=0

Similar Messages

  • Dynamic population of second list box based on the selection of first list

    Hai Friends,
    I have the code like this.
    Here my issue is: when the user accesses this page he will get the topic and related categories in the drop down boxes. but when the user changes the topic it needs to populate the categories from the database and kept the topic same for the respective categories. so how can i do this?
    <form name="questionForm" method="post" action="listQuestions.lgs">
    <table bgcolor="F8D8D8" cellspacing="2" cellpadding="2" align="center"
         style="margin-top: 100px">
         <tr>
              <td>Topics:</td>
              <td><select name="topic">
                   <c:forEach items="${model.topics}" var="topic">
                        <option value="<c:out value="${topic.topicId}" />"><c:out
                             value="${topic.topicName}" /></option>
                   </c:forEach>
              </select></td>
              <td>Categories:</td>
              <td><select name="category">
                   <c:forEach items="${model.categories}" var="category">
                        <option value="<c:out value="${category.categoryId}" />"><c:out
                             value="${category.categoryName}" /></option>
                   </c:forEach>
              </select></td>
         <tr>
              <td><a
                   href="addQuestion.lgs?categoryId=2<c:out value="${category.categoryId}"/>">Add
              New Question</a></td>
              <td></td>
              <td></td>
              <td></td>
         </tr>
         <tr>
              <td>Questions under this Category:</td>
              <td><c:if test="${model.questions} == null">
                   <c:out value="no questions found" />
                   <br>
              </c:if> <c:if test="${model.questions} != null">
                   <c:forEach items="${model.questions}" var="question">
                        <table>
                             <tr>
                                  <c:out value="${question.questionDesc}" />
                             </tr>
                        </table>
                   </c:forEach>
              </c:if></td>
         </tr>
         <tr>
              <td colspan="2"><input type="submit" /></td>
         </tr>
    </table>
    </form>
    regards,
    phani.

    Hi Rahul,
    I followed the link what you have mentioned and i need clarification in regarding this....
    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.questionForm.category.options.add(optn)
    but in my springframe work i have the controller like this where i am putting category object in the context and i am retrieving this in my listQuestions.jsp like this
    <tr>
              <td>Topics:</td>
              <td><select name="topic" onchange="populateCombo(this.value)">
                   <c:forEach items="${model.topics}" var="topic">
                        <option value="<c:out value="${topic.topicId}" />"><c:out
                             value="${topic.topicName}" /></option>
                   </c:forEach>
              </select></td>
              <td>Categories:</td>
              <td><select name="category">
                   <c:forEach items="${model.categories}" var="category">
                        <option value="<c:out value="${category.categoryId}" />"><c:out
                             value="${category.categoryName}" /></option>
                   </c:forEach>
              </select></td>
         <tr>
    package com.lgsglobal.lgsexam.spring.controllers;
    import java.util.HashMap;
    import java.util.List;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.springframework.web.servlet.ModelAndView;
    import org.springframework.web.servlet.mvc.Controller;
    import com.lgsglobal.lgsexam.dao.CategoryDAO;
    import com.lgsglobal.lgsexam.dao.QuestionDAO;
    import com.lgsglobal.lgsexam.dao.TopicDAO;
    import com.lgsglobal.lgsexam.hibernate.pojos.Category;
    import com.lgsglobal.lgsexam.hibernate.pojos.Topic;
    public class ListQuestionsController implements Controller {
         private TopicDAO topicDAO = null;
         public void setTopicDAO(TopicDAO topicDAO) {
              this.topicDAO = topicDAO;
         public TopicDAO getTopicDAO() {
              return this.topicDAO;
         private QuestionDAO questionDAO = null;
         public void setQuestionDAO(QuestionDAO questionDAO) {
              this.questionDAO = questionDAO;
         public QuestionDAO getQuestionDAO() {
              return this.questionDAO;
         private CategoryDAO categoryDAO = null;
         public void setCategoryDAO(CategoryDAO categoryDAO) {
              this.categoryDAO = categoryDAO;
         public CategoryDAO getCategoryDAO() {
              return this.categoryDAO;
         public ModelAndView handleRequest(HttpServletRequest request,
                   HttpServletResponse response) throws Exception {
              HashMap mymodel = new HashMap();
              List topics = topicDAO.getTopics();
              mymodel.put("topics", topics);
              if (request.getParameter("topic") != null) {
                   System.out.println("in topics condition to retrieve questions");
                   int topicId = Integer.parseInt(request.getParameter("topic"));
                   Topic topic = topicDAO.getTopic(topicId);
                   List categories = categoryDAO.getCategories(topic);
                   mymodel.put("categories", categories);
                   System.out.println("exiting topics condition to retrieve questions");
              if (request.getParameter("category")!= null) {
                   System.out.println("in category condition to retrieve questions");
                   int categoryId = Integer.parseInt(request.getParameter("category"));
                   Category category = categoryDAO.getCategory(categoryId);
                   List questions = questionDAO.getQuestions(category);
                   mymodel.put("questions", questions);
              return new ModelAndView("listQuestions", "model", mymodel);
    so here my issue is like how i can populate categories in the category(dependent combo). so please let me know the solution.
    awaiting for reply. for any furthere info please let me know....
    regards,
    Phani.K

  • Reflecting the items of second list box based on the chosen item of first list box

    Report Builder Version 6
    i would like to have let's say 2 list boxes in parameter form...say P_EMP AND P_DEPT as the sources...the P_DEPT is on top of P_EMP...SO when i choose a DEPT NO FROM P_DEPT ..THEN respective P_EMP will be displayed...how can i do ?
    i was told that so far in Report Builder is not able to achieve that..
    so i think of designing the parameter form by myself using PL/SQL. But now the problem is how to call the report builder procedure and vice versa ? how to pass parameter to and from report builder to my own-built parameter form using PL/SQL ?
    null

    Design a form wich must replace the parameter form of the report.
    The form can contain different fields for filtering data,fields for type of the report,orientation,destination,etc..
    After the user select the desired fields and press the execute report button you can call a report stored procedure and build a parameter list for calling RUN_PRODUCT.
    Hope this helps.
    null

  • ADF Faces Dependent list boxes in an editable table

    Hi,
    I'm working with JDeveloper 10.1.3.1.0.
    I saw the topic "How to build dependent list boxes with ADF II" on F. Nimphius' Blogbuster.
    There it is shown how to handle dependent list boxes in an ADF Faces form. I tried this for an editable table but it doesn't work correctly: If there is more than one row in the resultset of the table, both dependent list boxes have the same content in all the rows though the content in the database is different.
    Can anyone help me?
    Thanks.

    Ok - I will try.
    I built the listboxes like it is described in "ADF Faces: How to built dependent lists boxes with ADF and ADF Faces Part II", Frank Nimphius' Blogbuster July, 2006.
    This is the full code of my ManagedBean:
    package asdb.view.backing;
    import javax.faces.context.FacesContext;
    import javax.faces.el.ValueBinding;
    import javax.faces.event.ValueChangeEvent;
    import javax.faces.model.SelectItem;
    import oracle.adf.model.OperationBinding;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.view.faces.component.core.input.CoreInputText;
    import oracle.binding.BindingContainer;
    import oracle.jbo.Row;
    import oracle.jbo.ViewObject;
    import oracle.jbo.client.Configuration;
    import oracle.jbo.uicli.binding.JUCtrlValueBindingRef;
    public class AktMitFktEdit {
    private BindingContainer bindings;
    public AktMitFktEdit() {
    public void kategorieWechsel(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    BindingContainer bc = this.getBindings();
    DCIteratorBinding kategorienIter = (DCIteratorBinding)
    bc.get("OrganKategIterator1");
    Row rw =
    kategorienIter.getRowAtRangeIndex(((Integer)valueChangeEvent.getNewValue()).intValue());
    String kategorie = (String)rw.getAttribute("Kategorie");
    OperationBinding opBindingOrganeLovIter = (OperationBinding)bc.get("ExecuteWithParams");
    opBindingOrganeLovIter.getParamsMap().put("kategorieParam",kategorie);
    opBindingOrganeLovIter.execute();
    public void setBindings(BindingContainer bindings)
    this.bindings = bindings;
    public BindingContainer getBindings() {
    return bindings;
    It works fine, when the user only want to update existing rows. But if he had inserted a new row and afterwards want to update existing rows, the listboxes don't show the correct contents. No error messages are displayed.

  • Need help with dependent lists boxes with ADF.

    Hello,
    I am doing a project that use tree dependent list boxes.
    Ex. State---->
    College---->
    List of courses of the college chosen above----->
    The way this should work is when I select the state automatically I want it to change to the correspondent list of colleges of that state and after i choose the colleges I want to be able to get all the courses that are given in that college.
    To implement the first two list boxes I create tree views on JDeveloper and and using SelectOneChoice for both State and Colleges. In the binding editor I bind the first View with the second and then the second view with the third and at this point if I execute the first SelectOneChoice would give me all the state and the second SelectOneChoice would give me the list of all the colleges that exist.
    Now on the third view that I create a binding variable and i put a Where state=:TheBindingVariable on the query.
    Also I set the first SelectOneChoice the outoSubmit property to true, id to StateId and PartialTrigger property to CollegeId.
    On pageDef.xml in the bindings I create action form where I select the third view from Date Collection and select Action as ExecuteWithParams. And I set the value under the parameters section to #{bindings.state.inputValue}.
    Under executables still in pageDef.xml I create a invokeAction and I set binds = ExecuteWithParams.
    On first SelectOneChoice on the ChangeValueListener i create a new ManageBeans which generate me a java class and I create a new method as well to use it to change the binding variable on the second SelectOneChoice.
    Here is the method:
    public void Change_StateId(ValueChangeEvent valueChangeEvent) {
    String StateId;
    valueChangeEvent.setPhaseId(PhaseId.INVOKE_APPLICATION);
    FacesContext adi = FacesContext.getCurrentInstance();
    ValueBinding vb = adi.getApplication().createValueBinding("#{bindings}");
    DCBindingContainer bc = (DCBindingContainer)vb.getValue(adi);
    if(valueChangeEvent.getNewValue().toString().equals("0")){
    StateId = "MA";
    OperationBinding opBindingCollegeLovIter = (OperationBinding) bc.get("ExecuteWithParams");
    opBindingCollegeLovIter.getParamsMap().put("TheState",StateId);
    opBindingCollegeLovIter.execute();
    }else{
    DCIteratorBinding statesLovIter = (DCIteratorBinding) bc.get("CollegeProvaView1Iterator");
    Row rw = statesLovIter.getRowAtRangeIndex(((Integer)valueChangeEvent.getNewValue()).intValue());
    StateId = (String) rw.getAttribute("State");
    OperationBinding opBindingCollegeLovIter = (OperationBinding) bc.get("ExecuteWithParams");
    opBindingCollegeLovIter.getParamsMap().put("TheState",StateId);
    opBindingCollegeLovIter.execute();
    I don't know what I have done wrong because I am new in this field and a little support would be really helpful.
    I am using JDeveloper 10.1.3.1.0 and Oracle SOA Suite 10.1.3.1.0.
    I would appreciate any help.
    Thanks a lot.

    user8116089 wrote:
    For some reason the first selectonechoice doesn't give me all the states that are in the database it gives me just the first 10.check the value of RangeSize for itarator in pageDef. in this case to show all items it must be set to -1
    Also there is a way to assign the first value of the first selectonechoice to null at the start.this is a problematic requirement since all items are bound to iterator and basically this should serve for navigation purpose so the first item is set as selected, but maybe some workaround exists...
    regards,
    Branislav

  • Dynamically change the contents of one combo box based on the other

    Hi Forum,
    I have a question which might have a possibly simple answer. Well anyway help me out since i could not find the simple answer.
    I am building an application using Swing and binding with BC4J using JClient. My GUI has combo boxes, grids, editboxes. My requirement is that i should be able to dynamically change the contents of one combo box based on the selected item in trhe previous combo box. For example, when i choose a country in the "country combo box", the "states combo box" should show the list of the states of the selected country.
    Now how do i do this using binding. If not, how do i write custom querirs in BC4J layer and return a resultset to the remote application so theat i can populate the dependent combo boxes.
    I will appreciate if anyone can help me out in this regard.
    Thank You
    Sumit

    there could be quite a few number of ways of solving this problem.
    One way is through event handlers.
    taking your example as a model when user selects a country you could fire an action with a flag set to ture. A method will return the states from the DB or your temporary files or what ever and then the true flag will be used in the states combo box rendering.
    other way: javascript
    this might be a bit clumsy as you will need the states information in a property file and you can get the info as the user selects a country.
    regards,
    raj

  • Dependent List Boxes

    Can't figure what is wrong with this code. Any ideas? My page
    is blank unless I remove this code. If I remove the below code the
    page shows the form and the list boxes but the last dependent list
    box is not functioning properly...
    <!-- Dynamic Dependent List box Code for *** JavaScript
    *** Server Model //-->
    <script language="JavaScript">
    <!--
    var arrDynaList2 = new Array();
    var arrDL2 = new Array();
    arrDL2[1] = "lmConsumer";
    // Name of parent list box
    arrDL2[2] = "frmAddendum";
    // Name of form containing parent list box
    arrDL2[3] = "lmICPDate";
    // Name of child list box
    arrDL2[4] = "frmAddendum";
    // Name of form containing child list box
    arrDL2[5] = arrDynaList2;
    <%
    var txtDynaListRelation2, txtDynaListLabel2,
    txtDynaListValue2, oDynaListRS2;
    txtDynaListRelation2 = "SID"
    // Name of recordset field relating to parent
    txtDynaListLabel2 = "ICPDate"
    // Name of recordset field for child Item Label
    txtDynaListValue2 = "ICPDate"
    // Name of recordset field for child Value
    oDynaListRS2 =
    rsICPDate
    // Name of child list box recordset
    var varDynaList2 = -1;
    var varMaxWidth = "1";
    var varCheckGroup =
    oDynaListRS2.Fields.Item(txtDynaListRelation2).Value;
    var varCheckLength = 0;
    var varMaxLength = 0;
    while (!oDynaListRS2.EOF){
    if (varCheckGroup !=
    oDynaListRS2.Fields.Item(txtDynaListRelation2).Value) {
    varMaxLength = Math.max(varCheckLength, varMaxLength)
    varCheckLength = 0;
    %>
    arrDynaList2[<%=(varDynaList2+1)%>] =
    "<%=(oDynaListRS2.Fields.Item(txtDynaListRelation2).Value)%>";
    arrDynaList2[<%=(varDynaList2+2)%>] =
    "<%=(oDynaListRS2.Fields.Item(txtDynaListLabel2).Value)%>";
    arrDynaList2[<%=(varDynaList2+3)%>] =
    "<%=(oDynaListRS2.Fields.Item(txtDynaListValue2).Value)%>";
    <%
    if (oDynaListRS2.Fields.Item(txtDynaListLabel2).Value.length
    > varMaxWidth.length) {
    varMaxWidth =
    oDynaListRS2.Fields.Item(txtDynaListLabel2).Value;
    varCheckLength = varCheckLength + 1;
    varDynaList2 = varDynaList2 + 3;
    oDynaListRS2.MoveNext();
    varMaxLength = Math.max(varCheckLength, varMaxLength)
    %>
    //-->
    </script>

    Try something like this:
    <span spry:region="dsStates" id="stateSelector">
    <select spry:repeatchildren="dsStates" name="stateSelect"
    onchange="document.forms[0].citySelect.disabled = true;
    dsStates.setCurrentRowNumber(this.selectedIndex);">
    <option spry:if="{ds_RowNumber} == {ds_CurrentRowNumber}"
    value="{name}" selected="selected">{name}</option>
    <option spry:if="{ds_RowNumber} != {ds_CurrentRowNumber}"
    value="{name}">{name}</option>
    </select>
    </span>
    City:
    <span spry:region="dsCities" id="citySelector">
    <select spry:repeatchildren="dsCities" id="citySelect"
    name="citySelect" onchange="document.forms[0].schoolSelect.disabled
    = true; dsCities.setCurrentRowNumber(this.selectedIndex);">
    <option spry:if="{ds_RowNumber} == {ds_CurrentRowNumber}"
    value="{name}" selected="selected">{name}</option>
    <option spry:if="{ds_RowNumber} != {ds_CurrentRowNumber}"
    value="{name}">{name}</option>
    </select>
    </span>
    <span spry:region="dsSchools" id="schoolSelector">
    <select spry:repeatchildren="dsSchools" id="schoolSelect"
    name="schoolSelect" onchange="window.location=this.value;">
    <option spry:if="{ds_RowNumber} == {ds_CurrentRowNumber}"
    value="{url}" selected="selected">{name}</option>
    <option spry:if="{ds_RowNumber} != {ds_CurrentRowNumber}"
    value="{url}">{name}</option>
    </select>
    --== Kin ==--

  • How-to create dependent list boxes in a table -Frank Sample

    hi everyone i would like to ask a suggestion about Frank's example on How-to create dependent list boxes in a table -Frank Sample ...
    i want to extend this example for 3 dependent lists... including locations, departaments and employes....
    this the ListboxBean java that Frank is using in his example.... and this is only for locations and departaments tables and it works ok... i want to add the third list for employers wich is dependent only from departaments list.... as i am not good in java i would like to ask u a suggestion on how to develop the third list in this java class ...
    public class ListboxBean {
    private SelectItem[] locationsSelectItems = null;
    private SelectItem[] departmentsSelectItems = null;
    public SelectItem[] getLocationsSelectItems() {
    if (locationsSelectItems == null){
    FacesContext fctx = FacesContext.getCurrentInstance();
    ValueBinding vbinding = fctx.getApplication().createValueBinding("#{bindings.LocationsView1Iterator}");
    DCIteratorBinding locationsIterBinding = (DCIteratorBinding) vbinding.getValue(fctx);
    locationsIterBinding.executeQuery();
    Row[] locRowsArray = locationsIterBinding.getAllRowsInRange();
    // define select items
    locationsSelectItems = new SelectItem[locRowsArray.length];
    for (int indx = 0; indx < locRowsArray.length; indx++) {
    SelectItem addItem = new SelectItem();
    addItem.setLabel((String)locRowsArray[indx].getAttribute("City"));
    addItem.setValue(locRowsArray[indx].getAttribute("LocationId"));
    locationsSelectItems[indx] = addItem;
    return locationsSelectItems;
    return locationsSelectItems;
    public SelectItem[] getDepartmentsSelectItems() {
    FacesContext fctx = FacesContext.getCurrentInstance();
    ValueBinding vbinding = fctx.getApplication().createValueBinding("#{row}");
    JUCtrlValueBindingRef rwJUCtrlValueBinding = (JUCtrlValueBindingRef) vbinding.getValue(fctx);
    Row rw = rwJUCtrlValueBinding.getRow();
    if (rw.getAttribute(6) != null){
    OperationBinding oBinding = (OperationBinding) fctx.getApplication().createValueBinding("#{bindings.ExecuteWithParams}").getValue(fctx);
    oBinding.getParamsMap().put("locId",rw.getAttribute(6).toString());
    oBinding.execute();
    ValueBinding vbinding2 = fctx.getApplication().createValueBinding("#{bindings.DepartmentsView2Iterator}");
    DCIteratorBinding departmentsIterBinding = (DCIteratorBinding) vbinding2.getValue(fctx);
    departmentsIterBinding.executeQuery();
    Row[] depRowsArray = departmentsIterBinding.getAllRowsInRange();
    // define select items
    departmentsSelectItems = new SelectItem[depRowsArray.length];
    for (int indx = 0; indx < depRowsArray.length; indx++) {
    SelectItem addItem = new SelectItem();
    addItem.setLabel((String)depRowsArray[indx].getAttribute("DepartmentName"));
    addItem.setValue(depRowsArray[indx].getAttribute("DepartmentId"));
    departmentsSelectItems[indx] = addItem;
    return departmentsSelectItems;
    public void setLocationsSelectItems(SelectItem[] locationsSelectItems) {
    this.locationsSelectItems = locationsSelectItems;
    public void setDepartmentsSelectItems(SelectItem[] departmentsSelectItems) {
    this.departmentsSelectItems = departmentsSelectItems;
    Thanks in advance :0

    Hi,
    I think that all you need to do is to look at how I implemented the dependent detail for querying the Employees select items
    Then you make sure the DepartmentsVO and the EmployeesVO have bind variable to query them according to the pre-selected value in their respective master list
    Frank

  • Select MULTIPLE default values for a multiple selection list box based on another field in Infopath 2010

    Hello there - Before I explain my issue, I would like to point out that I have reviewed some other discussions on selecting default values for multiple selection listbox. But my issue is specific and different, and not answered by any of the discussions
    I visited.
    I have a multiple selection list box (say for example all countries in the world as values), and I would like to pre-select or setup multiple default values (say five countries) based on some criteria that I query from MS SQL database table.
    I know we can go to Data | Default Values option to setup one or many default values for multiple selection list box. When I enter the default values manually this works. I also right click the field under the Multiple-Selection List Box group, then select
    Add another Value Below and set the Default Value for this field to setup multiple default values.
    However, if I reference a field (either an infopath field or a field from SQL database) I am not able to setup multiple default values. Infopath automatically selects the last field I selected for all instances and in the end I am able to see only one
    default value selected instead of many. How to fix this problem? Why would infopath allow multiple default values when we enter it manually but not when we reference some fields?
    Please let me know if you need more info. Appreciate your help.
    Thanks!

    Hi redhotc,
    According to your description, my understanding is that you want to set multiple default values for a multiple checkbox list in InfoPath form.
    I did a test with SQL database table. I set three default values for the checkbox list by adding three values field under the group field(Data->Default values), each value field is for a default value. Then publish it to my SharePoint site, everything
    was fine.Please have a try as the below link:
    http://www.bizsupportonline.net/infopath2010/pre-select-items-multiple-selection-list-box-infopath-2010.htm
    Note: if you are using SQL databse table, you may need to enable ‘Allow cross-domain data access for user form templates that use connection settings in a data connection file’ in CA. More information, please refer to:
    http://answers.flyppdevportal.com/categories/sharepoint2010/sharepoint2010customization.aspx?ID=418b9423-a96c-4e5e-91f9-6a1b010ebb69
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Fill a combo box based on the selection of another combo box

    Hi All,
    I am new to jsp & java script. I have a arraylist of communities and there are 2 combo boxes meant for source community & destination community.
    First user will select Source community , after that I've to remove that community from list and display the option for destination community combo box.
    Here the problem is I am getting the source community value in a java script function - "checkSource() " which I've written at the "onClick" of source community.
    Now java script variable has that community & list of community is a java variable, so I am not able to remove that community from java list.
    Please suggest in the same.
    I've written like this -
    function checkSource()
         var selIndex = document.targetForm.srcgroupname.selectedIndex;
    var srcCommunity = document.targetForm.srcgroupname.options[selIndex].value;
    alert("Selected Src Community-"+srcCommunity);
         <%
         alert("Community length-"+community.size());
         community.remove(community.getIndex( %> srcCommunity <%));
         alert(community.size());
         %>
    But this is not working. community is a java list.
    Please help....
    Thanks in Advance
    Sneha

    Do it with AJAX. Here -> http://www.iem.pw.edu.pl/~opalam/sample/TestAJAX.zip You can download a small, sample project that presents AJAX.
    In the project Servlet, Gson and Jquery is used. When onchange is fired in the first select box a js script method is invoked. This method uses ajax to get the json (gson is used to transfer java objects to json) data from the servlet depending on the value of selected option. When data are obtained the second select box is populated. Of course it might be written better but the general idea is clearly visible which was my goal. Hope this helps.

  • How to Save the multiple selection check box values into the database

    i have the multiple selection check box implemented in UI through drop down list,i can choose the desired values from the drop down through checkbox, but i m unable to store these values and commit the values into the database all at a time.

    You can access the values using listbinding and can then store them as a string by using a delimiter.

  • Can I shrink the size of a form text box based on the content?

    We are helping a customer migrate from some MS Word forms to use pdf forms.  We are screenscraping the data from an AS400 green screen system and populating these new pdf forms with data.  however some of the text boxes are in the middle of a sentence and the text box needs to be large enough to fit 50 characters but there are many times when the data we are entering is much less than 50.  The resulting document looks very strange with all of that extra white space in the middle of a sentence due to the size of the text box.
    So can we somehow shrink the size of the text box to fit the number of characters in the box?
    I considered making the box smaller and setting the font size to auto but I think that would look even more strange to have a word with smaller font in the middle of a sentence.
    Thanks,
    Trent

    Sorry, I should have mentioned I am using acrobat professional 9.  I see that I can change the size of the text field when I am designing the form but what I don't see is how to dynamically change the size of the text field based on what data is put inside it.
    Thanks,

  • How To Insert List of Record To the Database Using Linq

    Good day every one, Please i need little help, I have a list of record like this
    lblID.Text = string.Join("<br/>", numbers);
    gives the Numbers below...
    6131
    5241
    3978
    6824
    3842//To Save to the database
    int pin = int.parse(lblID.Text);
    Now i want to insert those Numbers to the database
    Persons ps = new Persons();
    ps.Number = pin;
    cdc.Persons.AddObject(ps);
    cdc.SaveChanges();
    it throws up error...
    what i want to achieve on button insert
    all Numbers will be inserted but before inserting the number it will check if those numbers exist first on the database
    it should be like this on the database
    ID Number
    1 6131
    2 5241
    3 3978
    4 6824
    5 3842
    thanks.. I do appreciate your time and effort

    Hello,
    >>Now i want to insert those Numbers to the database
    For inserting a list of items to database, a loop statement is needed. I do not how you get these numbers, I assume they are stored in a collection and you could check below demo sample to insert these numbers and I assume your person table is identified:
    using (DFDBEntities db = new DFDBEntities())
    List<int> numbers = new List<int>() { 6131, 5241, 3978, 6824, 3842 };
    for (int i = 0; i < numbers.Count; i++)
    int number = numbers[i];
    //Check if the local and database already contains this number
    bool isRecordExist = db.Tables.Any(t => t.Number == number) || db.Tables.Local.Any(t => t.Number == number);
    if (!isRecordExist)
    Table t = new Table();
    t.Number = number;
    db.Tables.Add(t);
    db.SaveChanges();
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Sql agent jobs based on the database and the user

    Dear All,
    I have a requirement of configuring an user who should only have access to one database out of all and also able to create, view and modify sql agent jobs only for the allowed database. For allowing to see the selected database to particular user I have
    granted permissions as per below,
    create LOGIN mhtc WITH PASSWORD='mhtc', CHECK_POLICY = OFF;
    USE master;
    GO
    DENY VIEW ANY DATABASE TO mhtc;
    USE master;
    GO
    ALTER AUTHORIZATION ON DATABASE::MHTC TO mhtc;
    GO
    but user not able to see sql agent jobs so I want to give necessary permission to this user to view,create and modify sql agent jobs only in allowed databases. Basically I want to separate users from each database and separate sql agent jobs based on the
    user and database.
    Your expert advices are highly appreciated.
    Thanks,
    Manjula

    I want to give necessary permission to this user to view,create and modify
    sql agent jobs only in allowed databases.
    Hello Manjula,
    SQL Server Agent Jobs are not created / dedicated for a user database. The Jobs are store in System database "msdb".
    See
    Implement SQL Server Agent Security for Details about required permissions.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Reg:- How-to build dependent lists boxes with ADF and Faces(Frank.Nimphius)

    Hi,
    by using this i try to create a parent child relationfor selectonechice box and table.
    this is woking properly but as i start selecting values in SelectOneChice Box, value in tabel are seems to be Disappears.
    even i create navigation list and map them properly..
    please suggest me about this.
    Regards:-
    Bkumar

    Thanks for reply...
    but this is not one that i wants...<< Need to create Depandent selectOnechoice and table Adf page>>
    i created one parent SelectOneChoice list having some values, and one child tabel for there values. Navigation List.even i checked Auto Submit and Id for parent, and Partial triger for Child.
    When irun this application the values are not coming properly.
    please help me about this.

Maybe you are looking for

  • Enlarging photos and quiz

    I am new to flash and working on a project for a class. I am working with mx 2004. I want to be able to have the user rollover or click on a small picture and have it show up larger in another part of the window. I know its possible but I can't figur

  • How to use tv as a monitor with HDMI adapter

    with the HDMI adapter to thunderbolt plug the tv will display what is on my laptop monitor but only if I drag the screen to like 5 times its normal size. is there a way to just make it automaticly fit the tv everytime I want to use it as my monitor.

  • 2.0.1 Major Problems

    We just upgraded to DVDSP4 and Compressor 2.0.1 with it. I export a DV Quicktime from Avid and try to convert it to an m2v in Compressor. Certain presets hard crash the entire system (as in a full freeze up) and I must restart. Others (seems to be si

  • The disk cannot be partitioned because some files cannot be moved. idefrag didnt solve the problem. Please help, maybe i did something wrong

    My time Machine isnt set up so i cant back up my files. i read on the apple forms that idefrag works and solves that problem. I payed money, and defraged my computer and i still get that error msg!

  • I am getting the ! icon when I turn on ipod.

    I am getting the !icon with the folder when my ipod freezes and I try to reset it. I have tried all the suggestions on the article on the support page but nothing is working for me. Eventually my ipod will turn on again and seems to be acting normal.