Fill a combobox dynamically on selecting rom another combobox

Hello,
In my JSP, I hace 2 combo box, 1 with single selection (typeCmb) and 1 with multiple selction (itemsCmb).
On selecting a item from typeCmb, I want to load contents of itemCmb. The contents of itemCmb will have to loaded dynamically. I can't get the concept to implement this. Can anyone help me how to achieve the goal. Both items belong to same form.
Any help is appreciated.
Thanks,

Then what do I do. This is what I have coded :
   function selectionType() {
        document.sendform.listSelect.options.length = 0;
        var index = document.forms[0].emailtype.selectedIndex;  // Index of emailtype
        var data = document.forms[0].emailtype.options[index].value;    // Value of emailtype
        <%  String s="";
            int j = 0;    %>
        if (data == "TestMail") {
           size = <%=testUsers.size()%>;
           ai = 0;
           <%
            s = "";
            AdminUserBean ab = null;
            for (j=0; j < testUsers.size(); j++) {
                 ab = (AdminUserBean)testUsers.get(j);
                 s = ab.getUsername() + " : "  + ab.getEmail();
            %>
                document.forms[0].listSelect.options[ai] = new Option("<%= s%>", "<%=ab.getEmail()%>");
                ai = ai + 1;
            <%
                ab = null;
            %>
        } else if(data == "CampaignMail") {
           size = <%=domains.size()%>;
           ai = 0;
           <%
            s="";
            for (j=0; j < domains.size(); j++) {
                s = domains.get(j);
            %>
                document.forms[0].listSelect.options[ai] = new Option("<%=s%>", "<%=s%>");
                ai = ai + 1;
            <%
            %>
<select onmouseout="window.status=''; return true;" onmouseover="window.status='Select Mail Type'; return true;" onchange="selectionType()" style="width: 270px; font-weight: bold;" name="emailtype">
     <option value="TestMail" selected="true">Test Mail</option>
     <option value="CampaignMail">Campaign Mail</option>
</select>Edited by: TruptiD on Jul 29, 2010 1:43 AM

Similar Messages

  • Problem in popultating combobox based on input from another combobox

    i have there combo boxes when i select the first combobox ,based on the input given it must populate the second and based on the input in second combo box it must populate the third one.1->2->3.
    Actually i am having a javascript when i select the data in first combo box the information is sent to specified jsp page with parameter using onchange function and the second combo box is poplated based on the first but the third combo box in not populating based on the second.
    here is my code:
    jsp:
    <select name="recrClient" class="selectBox" id="recrClient" onchange="htmlData('BSTSRecuritmentContacts.jsp', 'client='+this.value);">
    javascript
    function stateChanged()
    if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
    document.getElementById("contacts").innerHTML= xmlHttp.responseText;
    else
    //alert(xmlHttp.status);
    // Will populate data based on input
    function htmlData(url, qStr)
    if (url.length==0)
    document.getElementById("contacts").innerHTML="";
    return;
    xmlHttp=GetXmlHttpObject()
    if (xmlHttp==null)
    alert ("Browser does not support HTTP Request");
    return;
    if (url=="BSTSRecuritmentContacts.jsp")
    url=url+"?"+qStr;
    url=url+"&sid="+Math.random();
    xmlHttp.onreadystatechange=stateChanged;
    xmlHttp.open("GET",url,true) ;
    xmlHttp.send(null);
    if i use the same method populating the third combo box, this is not working
    please reply me and thanks in advance

    Hi there,
    What about this:
    Create a multicube with 0PA_C01 and 0PE_C01 and then you create one key figure with the total of employes (that comes from 0PA_C01) and another key figure with the total number of employes that had training (that comes from 0PE_C01) and finally you create a calculated key figure at query level that subtracts the first key figure by the second, i.e., the total number of employees - the employees that had training.
    Diogo.

  • Fill a field dynamically when selecting or entering another field

    Dear Experts,
    We have a customer developed screen program, we have a requirement to populate a value of a screen field when another
    field is selected using f4 or keyed in directly. how can this be achieved.
    Thanks.

    Pierre,
    try with badi:
    BADI_MIRO_SPLT_ADD                      Append additional fields of ACCVS to ACCIT 
    method:
    BADI_MIRO_SPLT_ADD
    your code somthing like this if <yourfield> ne ' ' and <field2> ne ' ' .
    field3 = <update value>.
    endif.

  • How to dynamically display the data from a table base on row selection of another table in ADF

    Hi ,
    I have a requirement in ADF. I need to change the data of a table  based on row selection of another Table . Both the table have a Parent Child relationship between them. They have a common attribute say department_id.
                                                                                         For this I created bind variable in view object of employees table and wrote a where clause in the sql query using that bind variable. Then I created method for selection listener of department Table in java bean.
    My method is following
        public void onrowselection(SelectionEvent selectionEvent) {
            RichTable richTable = (RichTable)selectionEvent.getSource();
                            CollectionModel tableModel = (CollectionModel)richTable.getValue();
                            JUCtrlHierBinding adfTableBinding = (JUCtrlHierBinding)tableModel.getWrappedData();
                            Object selectedRowData = richTable.getSelectedRowData();
                            JUCtrlHierNodeBinding nodeBinding = (JUCtrlHierNodeBinding)selectedRowData;
                    oracle.jbo.domain.Number newVal = (oracle.jbo.domain.Number) nodeBinding.getAttribute("DepartmentId");
                    Number pallet = newVal.bigDecimalValue();
                    System.out.println("Selected values " + pallet);
            BindingContext bindingctx = BindingContext.getCurrent();
                          BindingContainer bindings = bindingctx.getCurrentBindingsEntry();
                          DCBindingContainer bindingsImpl = (DCBindingContainer) bindings;
                  DCIteratorBinding dciter = bindingsImpl.findIteratorBinding("EmployeesView1Iterator");//access the iterator by its ID value in the PageDef file
                          ViewObject vo =dciter.getViewObject();
                          vo.setNamedWhereClauseParam("DepartmentId", pallet);//enter your value
                          vo.executeQuery();
    It is printing the selected value of department id from department table in the log. But it is not able to pass the value to employees view. It is showing the following error in the log
    "Definition DepartmentId of type Variable is not found in EmployeesView1."
    I will be very thankful if someone helps me to solve this errror or is there any other way to achieve the same requirement.
    Thanks
    Nilesh

    Note quite sure why you simply wont create a viewlink for the viewobject the tables are based on..
    The viewlink attribute will be based on the departmentId and it's a simple master detail relationship which automatically uses ppr.
    However, if both tables are on the same page; using your hack about;
    On the underlying viewobject, define a viewcriteria e.g. "listById" and set your bind variable here.
    I would bind table two to a RichTable component:
    RichTable t2;
    public void onrowselection(SelectionEvent selectionEvent) {
            RichTable richTable = (RichTable)selectionEvent.getSource();
                            CollectionModel tableModel = (CollectionModel)richTable.getValue();
                            JUCtrlHierBinding adfTableBinding = (JUCtrlHierBinding)tableModel.getWrappedData();
                            Object selectedRowData = richTable.getSelectedRowData();
                            JUCtrlHierNodeBinding nodeBinding = (JUCtrlHierNodeBinding)selectedRowData;
                    oracle.jbo.domain.Number newVal = (oracle.jbo.domain.Number) nodeBinding.getAttribute("DepartmentId");
                    Number pallet = newVal.bigDecimalValue();
                    System.out.println("Selected values " + pallet);
                   refreshTable2(pallet);
            BindingContext bindingctx = BindingContext.getCurrent();
                          BindingContainer bindings = bindingctx.getCurrentBindingsEntry();
                          DCBindingContainer bindingsImpl = (DCBindingContainer) bindings;
                  DCIteratorBinding dciter = bindingsImpl.findIteratorBinding("EmployeesView1Iterator");//access the iterator by its ID value in the PageDef file
                          ViewObject vo =dciter.getViewObject();
                          vo.setNamedWhereClauseParam("DepartmentId", pallet);//enter your value
                          vo.executeQuery();
    private void refreshTable2(Number pallet){
    RichTable x=getT2();
    CollectionModel cm=(CollectionModel)x.getValue();
    JUCtrlHierBinding jcb=(JUCtrlHierBinding)cm.getWrappedData();
    BindingContainer bindings = bindingctx.getCurrentBindingsEntry();
    DCBindingContainer bindingsImpl = (DCBindingContainer) bindings;
    DCIteratorBinding dciter = bindingsImpl.findIteratorBinding(jcb.getName()+"Iterator");
    ViewObject vo =dciter.getViewObject();
    ViewCriteriaManager vcm=vo.getViewCriteriaManager();
    ViewCriteria vc=vcm.getViewCriteria("listById");
    vo.applyViewCriteria(vc);
    vo.setNamedWhereClauseParam("DepartmentId",pallet);
    vo.executeQuery();
    AdfFacesContext.getCurrentInstance().addPartialTarget(getT2());

  • Populating other fields in a form based on the selection in a combobox field

    We have done a form(masterdetail) in which we have a combobox field.When we make a selection in the field we require some two other fields to be automatically populated retrieving data from a table(which has the details required) based on the selection made.For eg. Selecting emp id(combobox) should populate empname and salary automatically in the form.Is this possible?If so how can this be done?
    Thanks & Regards,
    Jayanthi.S

    This is what I did following Michael's suggestion and it works fine :-
    1> Created a dynamic LOV named LOV_EMPNO as:-
    select empno,empno from scott.emp
    2> Started creating a form named FORM024_EMP2 on scott.emp.
    3> On reaching the Formatting and Validation section, I chose the EMPNO field in the left frame.
    In the right frame for EMPNO, I changed the item-type to Combobox and selected the lov LOV_EMPNO.
    Then I went to the Javascript handler section for EMPNO, chose the Javascript event onChange and in the
    adjacent Textarea, I wrote:-
    popdetails(this);
    We will create the javascript function popdetails() in the Additional pl/sql section.
    4> Click next and goto the Additional PL/SQL section and I wrote the following code in
    "...after displaying the page" area.
    (You can write this either in
    before displaying the page,
    before displaying the form,
    after displaying the form,
    after displaying the page).
    declare
    type tvcarr is table of varchar2(2000) index by binary_integer;
    l_empno_arr tvcarr;
    l_ename_arr tvcarr;
    l_sal_arr tvcarr;
    begin
    select empno,ename,sal
    bulk collect into
    l_empno_arr,l_ename_arr,l_sal_arr
    from scott.emp;
    htp.p('
    <script>
    var empdets = new Array();
    empdets[0] = new Array("","");
    for i in 1..l_empno_arr.count
    loop
    htp.p('empdets['||l_empno_arr(i)||'] = new Array("'||l_ename_arr(i)||'","'||l_sal_arr(i)||'");');
    end loop;
    htp.p('
    function popdetails(ele)
    var val = new Number();
    var thisform = ele.form;
    val = parseInt(ele.value);
    if (isNaN(val))
    val = 0;
    for (var i = 0; i < thisform.length; i++){
    if (thisform.name == "FORM024_EMP2.DEFAULT.ENAME.01")
    thisform[i].value = empdets[val][0];
    else if(thisform[i].name == "FORM024_EMP2.DEFAULT.SAL.01")
    thisform[i].value = empdets[val][1];
    htp.p('</script>');
    end;

  • Dynamic PL/SQL block vs dynamic SQL SELECT

    Hi there,
    I have a question regarding the optimal way to code a dynamic SELECT INTO statement. Below are the 2 posiibilities I know of:
    _1. Dynamically executing the SELECT statement and making use of the INTO clause of the EXECUTE IMMEDIATE statement_
    CREATE OR REPLACE FUNCTION get_num_of_employees (p_loc VARCHAR2, p_job VARCHAR2)
    RETURN NUMBER
    IS
    v_query_str VARCHAR2(1000);
    v_num_of_employees NUMBER;
    BEGIN
    v_query_str := 'SELECT COUNT(*) FROM emp_'
    || p_loc
    || ' WHERE job = :bind_job';
    EXECUTE IMMEDIATE v_query_str
    INTO v_num_of_employees
    USING p_job;
    RETURN v_num_of_employees;
    END;
    _2. Encapsulating the SELECT INTO statement in a block and dynamically exectuting the block_
    CREATE OR REPLACE FUNCTION get_num_of_employees (p_loc VARCHAR2, p_job VARCHAR2)
    RETURN NUMBER
    IS
    v_query_str VARCHAR2(1000);
    v_num_of_employees NUMBER;
    BEGIN
    v_query_str := 'begin
    SELECT COUNT(*) INTO :into_bind FROM emp_'
    || p_loc
    || ' WHERE job = :bind_job;
    end;';
    EXECUTE IMMEDIATE v_query_str
    USING out v_num_of_employees, p_job;
    RETURN v_num_of_employees;
    END;
    I was just wondering which way would be preferred? I know the second method uses a bind variable for the INTO clause, but does the first one also use bind varialbes (no semi-colon)? Any differences in terms of efficiency or speed?
    Thanks alot
    Edited by: BYS2 on Oct 19, 2011 1:23 AM

    sybrand_b wrote:
    No difference in terms of performance or speed
    Both variants will wreck the primary purpose of PL/SQL: to avoid parsing.
    When I would see a 'developer' do this, I would fire him on the spot.
    Why abuse PL/SQL in such a fashion? Both statements don't require parsing, as there is nothing dynamic in them and indicate a complete lack of understanding of Oracle, or a desire to deliver completely unscalable applications, resulting in end-users desiring to lynch you, and rightly so.
    Remove the dynamic SQL or find another job.
    Sybrand Bakker
    Senior Oracle DBANot dynamic? What if p_loc and p_job were generated dynamically based on user-input? or what if there were potentially thousands of tables that p_loc could refer to? Should I make a CASE statement with a thousand cases?
    In addition, the first example was actually taken directly from the official Oracle Database Application Developer's Guide (version 10.2). http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_dynamic_sql.htm#i1006429 - look under 'Sample Single-Row Query Using Native Dynamic SQL' heading. Therefore, if you have any issues with this alleged 'improper' usage of dynamic SQL, perhaps you should go talk to Oracle directly.
    While I appreciate your response, I don't think it has occurred that you that not everyone is a 'developer'. In fact, I have only very recently (several days ago) taught myself how to use Oracle SQL, PL/SQL and XMLDB by reading several of the official Oracle language and developer's guides. It is more a passing interest to me as I am working on some medical research which may require the use of a database. I am actually in medical school at the moment but have an undergraduate degree in Electrical and Computer engineering so I am generally well-versed in programming.
    Perhaps the next time, you post your rubbish, rude and unhelpful comments, you should stop and think that people come to this forum because they need help and not because they want to be told to 'find another job'. In fact, I am quite certain that I could make you look absolutely stupid in any topic of electrical engineering or medicine.
    Please do us all a favour and stop polluting this forum with your vapid posts. While I understand that your behavior is likely a compensatory mechanism to cope with your inferiority complex, know that help IS available if you need it.
    Edited by: BYS2 on Oct 19, 2011 2:13 AM

  • Dynamic Filter Selection in CUIC Reports

    Hi,
    I have come up with a new requirement in CUIC where i need to provide dynamic selection on the filter criteria.
    Ex: Assuming in a report i need a filter criteria as agent name, call type and skill group which can be availble in drop down control. Based on the selection in drop down, the list box control will be filled. Say if i select agent from drop down cotrol...all agent names will be listed in list box control and similarly for calltype and skill group selection.
    Is the above requirement is feasible?
    Thanks,
    Swami

    Hi Vamsi
    I Thing it's not possible in Crystal Report It is possible In Xcelsius reporting  and SQL Analysis Services Report . You can build your Report In Xcelsius . It is best reporting Tool for Dynamic Parameter Report.
    Thanks & Regard
    Khan Imran

  • Doing a calculation form the selection in a combobox

    I am trying to get the selection from the ComboBox and do a calculation. After the getting the selected item i need to do a simple calculation
    eg.Combobox show a selection of the year of birth, let say 1970
    Calculating the age i.e. 2002-selection(1970)
    String age = (String) jComboBox1.getSelectedItem();
    how do i do it?As the getSelectedItem is returning a string
    Please help

    Hi,
    it seems a bit messy but it works:
    //t is the string you get from JComboBox
    Long i = new Long(t);
    int k = i.intValue();
    k = 2002 - k;
    But if it match your program needs, i think you can fill JComboBox with Long objects.

  • Adobe Form - dynamic object selection/control

    Hi,
    I am very new to using the Acrobat Form building tool. I am currently using it in conjunction with Adobe LifeCycle designer 8.
    I would like to create a form which behaves like an xHTML doc, and client-side JavaScript.
    I would like to be able to create groups of objects (Text, textboxes, comboboxes, etc), that can be shown or hidden depending on user selection/input in a different control/object. This is a pretty general question, but I am having difficulty finding documentation on how to approach.
    This may be more difficult. The form will live in a folder on a shared drive. When the user completes and submits the form, I need for it to do the following:
    Email to a specific address, depending on a user selection of a combobox value on the form.
    Then create a copy of itself in a subfolder in the same shared drive, with a dynamically generated unique title/id (like a database key field).
    Are any of these things possible. I would probably just create an xHTML form to do this, but currently we do not have a web server available to house such a form. And the portability of the Acrobat forms seems useful and practical in the long run.
    If someone could point me in the right direction, website and/or online PDF publication, I would be ever so grateful.
    Thanks so much for your help.
    Kind regards,
    Jessica

    >I am very new to using the Acrobat Form building tool. I am currently using it in conjunction with Adobe LifeCycle designer 8.
    This doesn't seem to relate to Create PDF Online, a web service from
    Adobe. I recommend the LiveCycle Designer forum.
    Bear in mind that e-mail submission of PDFs is really, in my view, a
    tool for testing. Any serious usage would use a web server, just like
    an HTML form.
    Aandi Inston

  • Trying to set attribute value based on user selection of another attribute

    I am trying to set an attribute value based on the user's selection of another attribute using JSP EditCurrentRecord. When the user chooses the AreaId from the combo box I want to look up the value of the RgnID, preferrably without the user seeing this field at all. Below is my code which does not work. When I run it I get Error Message: null. Any suggestions are appreciated!!
    <jsp:useBean id="RowEditor" class="oracle.jbo.html.databeans.EditCurrentRecord" scope="request">
    <%
    RowEditor.initialize(pageContext, "MyProject2_package1_SRSecurityModule.UsrAreaWhView");
    RowEditor.setTargetUrl("UsrAreaWhView_SubmitInsertForm.jsp");
    RowEditor.createNewRow();
    RowEditor.setDisplayAttributes("OracleId, RgnId, RegionKey, AreaId");
    RowEditor.useEditField("OracleId");
    RowEditor.getFieldRenderer("OracleId").setPromptText("Oracle ID");
    RowEditor.useEditField("AreaId");
    RowEditor.useComboBox("AreaId","AreaWhView","Area","AreaKey");
    RowEditor.getFieldRenderer("AreaId").setPromptText("Area");
    RowEditor.useEditField("RgnId");
    RowEditor.getFieldRenderer("RgnId").setPromptText("Region");
    RowEditor.getRowSet().getViewObject().getCurrentRow().setAttribute("RgnId",RowEditor.getRowSet().getViewObject().getCurrentRow().getAttribute("RegionKey"));
    RowEditor.setReleaseApplicationResources(true);
    RowEditor.render();
    %>
    </jsp:useBean>

    ok, sorry everyone for making it confusing; this is what I am
    trying to acheieve;
    I would like the user to populate my database with thier
    username AND userID. I have a dropdown box with thier username
    dynamicly populated already, what I am trying to achieve, is a way
    of when the user selects thier username either another dropdown or
    a hidden field is automatically populated with the appropiate
    userID (to match thier username). Now I could just have two
    dropdowns and they select both, but i'd rather avoid the
    possibility of mismatches, and that is why I would like it to be
    automatic and based on thier username selection...
    Does that make sense....?

  • Getting selected item from combobox itemrenderer and storing in object

    Hi Guys,
    Can anyone help me in this regard. Its very urgent.
    I have a combo box itemrenderer in datagrid column. I want to get the user selected item from the dropdown of the row(s) (User may select values from combo box from multiple rows of datagrid) and corressponding values of all other columns of the rows and store it in an object . Then pass this object to database to update only those rows that user has changed.
    I am able to get the selected item from combo box using "event.currentTarget.selectedItem" and corressponding values of all other columns of the rows using "valueSelect.ID", etc where valueSelect is object which contains data for datagrid. But am stuck up with, how to store the selected item value of the combobox  and corressponding values of all other columns of the rows into an Object ?.
    Can anybody help me with sample to store selected item from combobox and its corressponding values of all other columns into an object which i can send to db...?
    Kindly help me in this regard.
    Thanks,
    Anand.

    Hi!
    Are you using a collection of VO or DTO as the dataprovider of the combobox component?
    If so, have you created some attribute there to control the user's selection in the combobox?
    For instance:
    private var selected:Boolean = false;
    If your solution fits this approach, you may create a new collection that contains just the objects that were selected by the user, it means you can loop through the datagrid's dataprovider and only insert in this new collection those objects that have the attribute "selected" set to true.
    For instance:
    private function getSelectedRecords(datagridDataProvider:ArrayCollection):ArrayCollection
        var newCollection:ArrayCollection = new ArrayCollection();
        for each (var item:Object in datagridDataProvider)
            if (item.selected)
                newCollection.addItem(item)
        return newCollection;
    Afterwards, you may serialize this new collection with your back-end.
    Hope it helps you!
    Cheers,
    @Pablo_Souza

  • Focus shifted to next component after selecting item in combobox.....

    I have Table and a textfield as only two UI components.
    For the table i am using my custom editor(NewComboEditor.java), for this i am extending the "DefaultCellEditor" and applying this editor for my jTables first column. My custom editor simply prepares the editor by instantiating the jCombobox and sets the selected value and return it (in overwridden "getTableCellEditorComponent" method).
    I have made my combobox editable by setting "combobox.setEditable(true)" in constructor of editor while creating the instance of combobox.
    Now everything works fine except whenever i tried to select an item from the combobox , after the item selection, focus is assigned to textfield which is the nextfocusable component to jTable on which the comboboxes are rendered.
    If my jcomboboxes are not editable then selection remains on combobox only.
    The implemetation for the comboEditor and comboRenderer is as follows.
    =========================== Main frame having all compenents =================================
    public class CreateAndShowComboBoxes extends JFrame {
        protected JTable table;
         * Default constructor..
        public CreateAndShowComboBoxes() {
          Container pane = getContentPane();
          pane.setLayout(new BorderLayout());
          //create table model, this table model extends AbstractTableModel.
          MyTableModel tableModel = new MyTableModel();
          table = new JTable(tableModel);
          TableColumnModel tcm = table.getColumnModel();
          TableColumn tc = tcm.getColumn(MyTableModel.LAST_NAME);//set to column 1.
          //specify the renderer and editor.
          tc.setCellRenderer(new ComboRenderer());     
          tc.setCellEditor(new NewComboEditor());
          JScrollPane jsp = new JScrollPane(table);
          pane.add(jsp, BorderLayout.CENTER);
          JTextField textField = new JTextField();
          table.setNextFocusableComponent(textField);
          pane.add(textField, BorderLayout.SOUTH);
         * Create a frame and make it visible.
        public static void main(String[] args) {
            CreateAndShowComboBoxes stt = new CreateAndShowComboBoxes();
            stt.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            stt.setSize(400, 300);
            stt.setVisible(true);
    ============================================ComboEditor =========================================
    public class NewComboEditor extends DefaultCellEditor{
         *Default constructor.
        public NewComboEditor() {
            super(getComboBox());
            JComboBox combobox = (JComboBox)getComponent();
            combobox.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    //fireEditingStopped();
                    //stopCellEditing();
         * Override to invoke setValue on the formatted text field.
        public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected,
                                                        int row, int column) {
            JComboBox cb = (JComboBox)super.getTableCellEditorComponent
                                            ( table, value, isSelected, row, column);
            cb.setSelectedItem(value);
            return cb;
         * @return object
        public Object getCellEditorValue() {
            JComboBox cb = (JComboBox)getComponent();
            Object o = cb.getSelectedItem();
            return o;
         * @return true
        public boolean stopCellEditing(){
            JComboBox cb = (JComboBox)getComponent();
            cb.requestFocus(true);
            return super.stopCellEditing();
         * @return combobox instance
        public static JComboBox getComboBox(){
            JComboBox combobox = new JComboBox();
            combobox.setEditable(true);
            combobox.addItem("khan");
            combobox.addItem("rawal");
            combobox.addItem("shetti");
            combobox.addItem("more");
            combobox.addItem("sohel");
            combobox.addItem("kambli");
            combobox.addItem("warne");
            return combobox;
    ========================================= ComboRenderer ====================================
    public class ComboRenderer extends JComboBox implements TableCellRenderer {
         *Default constructor.
        public ComboRenderer(){
            super();
            addItem("khan");
            addItem("rawal");
            addItem("shetti");
            addItem("more");
            addItem("sohel");
            addItem("kambli");
            addItem("warne");
        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
            boolean hasFocus, int row, int column) {
          setSelectedItem(value);
          return this;
    ======================================================================================Message was edited by:
    yuvi
    Message was edited by:
    yuvi

    Hi Pravin Ghadge,
    Please Use this code for focus.
    oMat.Columns.Item("Column_UID").Cells.Item(oMat.VisualRowCount).Click(SAPbouiCOM.BoCellClickType.ct_Regular)
    I hope it will work.
    Thanks,
    P.T.Sampath.

  • How to get save result from EXECUTE from a dynamic SQL query in another table?

    Hi everyone, 
    I have this query:
    declare @query varchar(max) = ''
    declare @par varchar(10)
    SELECT @par = col1 FROM Set
    declare @region varchar(50)
    SELECT @region = Region FROM Customer
    declare @key int
    SELECT @key = CustomerKey FROM Customer
    SET @query = 'SELECT CustomerKey FROM Customer where ' + @par + ' = '+ @key+ ' '
    EXECUTE (@query)
    With this query I want get col1 from SET and compare it to the column Region from Customer. I would like to get the matching CustomerKey for it.
    After execution it says commands are executed successfully. But I want to save the result from @query in another table. I looked it up and most people say to use sp_executesql. I tried a few constructions as sampled and I would always get this error: 
    Msg 214, Level 16, State 2, Procedure sp_executesql, Line 12
    Procedure expects parameter '@statement' of type 'ntext/nchar/nvarchar'.
    So the output should be a list of CustomerKeys in another table.
    How can I save the results from EXECUTE into a variable? Then I assume I can INSERT INTO - SELECT in another table. 
    Thanks

    CREATE TABLE Customer
    (CustomerKey INT , Name NVARCHAR(100));
    GO
    INSERT dbo.Customer
    VALUES ( 1, N'Sam' )
    GO
    DECLARE @query nvarchar(max) = ''
    declare @par varchar(10) = 'Name',
    @key varchar(10) = 'Sam'
    CREATE TABLE #temp ( CustomerKey INT );
    SET @query =
    insert #temp
    SELECT CustomerKey
    FROM Customer
    where ' + @par + ' = '''+ @key+ ''' '
    PRINT @query
    EXEC sp_executesql @query
    SELECT *
    FROM #temp
    DROP TABLE #temp;
    DROP TABLE dbo.Customer
    Cheers,
    Saeid Hasani
    Database Consultant
    Please feel free to contact me at [email protected] as well as on Twitter and Facebook.
    [My Writings on TechNet Wiki] [T-SQL Blog] [Curah!]
    [Twitter] [Facebook] [Email]

  • How to move a selection into another selection in elements 12

    how to move a selection into another selection in elements 12

    Open picture B, the one you wish to select something from to add to another picture.
    Use one of the selection tools, e.g. selection brush, lasso tool, to select the object. You will see an outline ("marching ants") once the selection is complete
    Go to Edit menu>copy to copy the selection to the clipboard
    Open picture A, then go to Edit>paste
    Use the move tool to position object from picture B.
    In the layers palette you should see picture A as the background layer, and object B on a separate layer

  • Create a filtered list based on the selection in another field? URGENT HELP NEEDED

    Hi,
    Hoping someone can help me with something I am working on. i am fairly new to creating forms in acrobat (know how to us the full range of very basic features) but I have now found myself needing some help.
    i am producing an order form, and I need to create a filtered dropdown list based on the value selected in another field.
    basically, when a user select the company chooses their Business Name from a dropdown list, I would like their deliver address to self populate. In some cases there may be a few options for the company delivery address so in these cases the second option would be a dropdown list of the options available for that company.
    i have attached a screenshot, it is the Fields "Business Name" and "delivery Address/Delivery Postcode" that i would like to be linked so that the option in Business Name filtered the options in delivery Address
    Hope someone out there has the time to help me with this, i am using Acrobat Pro DC
    many Thanks
    Lee

    This will require a complex, custom-made script. The basic functionality of populating another field based on a selection in a drop-down is not that complicated, but if you want it to also populate other drop-downs (and then presumably use them to populate other fields), it will require a more complex solutions.
    This tutorial is relevant for your question: https://acrobatusers.com/tutorials/change_another_field

Maybe you are looking for

  • I cannot get my iPhone 4S to show up in iTunes. (tried EVERYTHING!!)

    Well, I've read countless threads about this. However, NONE (and I repeat NONE) of those other options (ie: UpperFilter, reinstall, restart service, et al) are working for me.  I am on my 6th reinstall of iTunes, and I cannot get the thing to recogni

  • Trouble importing swf files

    I would like to embed a .swf file into my catalyst project, but everytime I import a file catalyst crashes if I try to modify or reposition the file. I have tried runing the project just to see if the swf is visable, but get a message saying that the

  • Valiable file name in JSP include

    Hi, I am trying to include a html file in a JSP page. The filename comes from the properties file and hence is a variable. The JSP file that has this include does not cache the JSP page plus it "refreshes" (reloads) ever 30 seconds. When I include th

  • Hp 6510 display repair

    The phyiscal display has come unattached from the printer itself.  It looks simple enough to reconnect the two ribbon cables but not entirely sure.  This is an almost brand-new printer (but out of warranty), so I'd like to repair it if possible.  Sug

  • Re: 7th day of Sysmas sweepstakes! Feelin' lucky?

    An EMP bomb... * New gear (Iphone, laptop, switches, servers,...) payed by the insurance... * Long holiday during shipping off the gear, without any interruptions because nothing can be wrong, there's no gear left... * Clean start in sharepoint, data