How to popup values from database tables to SelectOneMenu

Hi friends,
I am doing a jsf application, in which there is a selectOneMenu
control and I want that, iwhen this page is loaded after clicking button
on the previous page, the selectOne Menu should be populated with
the values from database.
Also I want , if i will select any menu item from the menu , acccordingly
another selectOneMenu control should be filled with respective values
thanx,
bye

Oh dear. I don't think anybody can advise you until you are not "kinda" new to Java anymore. Learn Java itself (the language, the platform and the tools), only then should you start considering going into web development.

Similar Messages

  • How to get string value from database table using Visual Studio 2005?

    Hi,
    Im developing plugin in illustrator cs3 using visual studio 2005. I need to get the values eneterd in database. Im able to get the integer values. But while getting string values it is returning empty value.
    Im using the below code to get the values from database table
    bool Table::Get(char* FieldName,int& FieldValue)
        try
            _variant_t  vtValue;
            vtValue = m_Rec->Fields->GetItem(FieldName)->GetValue();
            FieldValue=vtValue.intVal;
        CATCHERRGET
        sprintf(m_ErrStr,"Success");
        return 1;
    Im using the below code to get the values.
    AIErr getProjects()
        char buf[5000];
        int i;   
        std::string  catName;
        ::CoInitialize(NULL);
        Database db;
        Table tbl;
        errno_t err;
        err = fopen(&file,"c:\\DBResult.txt","w");
        fprintf(file, "Before Connection Established\n");
        //MessageBox(NULL,CnnStr,"Connection String",0);
        if(!db.Open(g->username,g->password,CnnStr))
            db.GetErrorErrStr(ErrStr);
            fprintf(file,"Error: %s\n",ErrStr);
        fprintf(file, "After Connection Established\n");
    if(!db.Execute("select ProjectID,ProjectName from projectsample",tbl))
            db.GetErrorErrStr(ErrStr);
            fprintf(file,"Error: %s\n",ErrStr);
        int ProjectID;
        int UserID;
        int ProjectTitle;
        char ProjectName[ProjectNameSize];
        if(!tbl.ISEOF())
            tbl.MoveFirst();
        ProjectArrCnt=0;
        for(i=0;i<128;i++)
            buf[i]='\0';
            int j=0;
        while(!tbl.ISEOF())
            if(tbl.Get("ProjectID",ProjectID))
                fprintf(file,"Project ID: %d ",ProjectID);
                ProjectInfo[ProjectArrCnt].ProjectID = ProjectID;
                sprintf(buf,"%d",ProjectID);
                //MessageBox(NULL, buf,"f ID", 0);
                j++;
            else
                tbl.GetErrorErrStr(ErrStr);
                fprintf(file,"Error: %s\n",ErrStr);
                break;
            //if(tbl.Get("ProjectTitle",ProjectName))
            if(tbl.Get("ProjectName",ProjectName))
                MessageBox(NULL,"Inside","",0);
                fprintf(file,"ProjectTitle: %s\n",ProjectName);
                //catName=CategoryName;
                ProjectInfo[ProjectArrCnt].ProjectName=ProjectName;
                //sprintf(buf,"%s",ProjectName);
                MessageBox(NULL,(LPCSTR)ProjectName,"",0);
            else
                tbl.GetErrorErrStr(ErrStr);
                fprintf(file,"Error: %s\n",ErrStr);
                break;
            ProjectArrCnt++;
            //MessageBox(NULL, "While", "WIN API Test",0);
            tbl.MoveNext();
        //MessageBox(NULL, ProjectInfo[i].ProjectName.c_str(),"f Name", 0);
        ::CoUninitialize();
        //sprintf(buf,"%s",file);
        //MessageBox(NULL,buf,"File",0);
        fprintf(file, "Connection closed\n");
        fclose(file);
        for(i=0;i<ProjectArrCnt;i++)
            sprintf(buf,"%i",ProjectInfo[i].ProjectID);
            //MessageBox(NULL,buf,"Proj ID",0);
            //MessageBox(NULL,ProjectInfo[i].ProjectName.c_str(),"Project Name",0);
        return 0;
    In the above code im geeting project D which is an integer value. But not able to get the project name.
    Please some one guide me.

    As I said in the other thread, this really isn't the place to ask questions about a database API unrelated to the Illustrator SDK. You're far more like to find people familliar with your problem on a forum that is dedicated to answering those kinds of questions instead.

  • How to populate values from database into a Combo Box?

    Hi,
    How to display all the values of a field of a database table in a combo box inside a grid in B1 user defined form?
    Regards,
    Sudeshna.

    Hi,
    If you are trying to do this on a system form (I gues this is your case, reading the other question), for example Sales Orders, and you want to show the values from a User Defined Table (UDT), you just need to add a User Defined Field on Marketing Documents Line level, and say it is linked to the UDT.
    SBO will automatically show the combo with the values on the Code field of the UDT.
    Regards,
    Ibai Peña
    Sorry, I didn´t read the post well.
    What you could do is each time the form is loaded, read the values from the table, and asign them as Valid Values for the combobox column. You can do this programatically, or using XML (which is recommended becouse of better performance).
    Message was edited by: Ibai Peña

  • How to get values from a table(in jsp) for validation using javascript.

    hi,
    this is praveen,pls tell me the procedure to get values from a table(in jsp) for validation using javascript.
    thank you in advance.

    Yes i did try the same ..
    BEGIN
    select PROD_tYPE into :P185_OFF_CITY from
    magcrm_setup where atype = 'CITY' ;
    :p185_OFF_CITY := 'XXX';
    insert into mtest values ('inside foolter');
    END;
    When i checked the mtest table it shos me the row inserted...
    inside foolter .. Now this means everything did get execute properly
    But still the vallue of off_city is null or emtpy...
    i check the filed and still its empty..
    while mtest had those records..seems like some process is cleaining the values...but cant see such process...
    a bit confused..here..I tried on Load after footer...
    tried chaning the squence number of process ..but still it doesnt help
    some how the session variables gets changed...and it is changed to empty
    Edited by: pauljohny on Jan 3, 2012 2:01 AM
    Edited by: pauljohny on Jan 3, 2012 2:03 AM

  • How to select value from database view with * in wher clause

    Hi ,
      I ahve a database view with some fields.
    Now my requirement is to serach a single row on the basis of process type.
    Process type can have values like ZBA,ZBC,ZBD,ZBE or similarly anything starting with ZB.
    Now i know that starting two letters will be ZB , but dont knwo the last letter.
    So how should i use select query for the same?
    Should i use like operator for the same?
    regards
    PG

    hi,
    u can use character '%'.sample code like this
    SELECT reltype
                 instid_a
                 catid_a
                 instid_b
                 FROM /dbm/ord_docflow
                 INTO TABLE it_link
                 FOR ALL ENTRIES IN it_pnwtyh
                 WHERE  instid_a  =  it_pnwtyh-instid_a AND
                 instid_b  LIKE 'QMSM%'  AND
                 typeid_a  = 'BUS2400'  AND
                 typeid_b  = 'BUS2400' AND
                 catid_a   = 'BO' AND
                 catid_b   = 'BO' AND
                 reltype   = 'VONA'.
    this is similar to using* while we fetch values from table.in the above code only i no QMSM rest values not sure,so used QMSM%

  • How to load values from database into the f:selectItems value attribute

    Hi,
    I am trying to load the drop down menu value i.e f:selectItems from the database with a list of values from a column in the databse table. how can i do this? Should i use binding? or is there any other way.
    Note:i am able to load values into f:selectItems from the faces-config.xml file but they are static values. i want the values from the database
    Please reply with sample codes of faces jsp, bean file and config.xml file

    But this is working for me,
    JSF
         <h:selectOneMenu value="#{loadbean.grade}" >
              <f:selectItems value="#{loadbean.gradelist}" />
         </h:selectOneMenu>
    bean
    private String grade;
    private List<SelectItem> gradelist;
    public String getGrade() {
              return grade;
         public void setGrade(String grade) {
              this.grade = grade;
         public List<SelectItem> getGradelist() {
              return gradelist;
         public void setGradelist(List<String> items) {
              gradelist=new ArrayList<SelectItem>();
              gradelist.add(new SelectItem("daniel"));//this value can be from data base
              gradelist.add(new SelectItem("pspindia"));
              gradelist.add(new SelectItem("prelude sys"));
    faces-config.xml
    <managed-property>
              <property-name>gradelist</property-name>
              <null-value/>
    </managed-property>
    this working fine for me. So setter method also works to load value for the h:selectItems
    Thanks a lot.

  • How to get values from Hash Table

    Hi all,
    I have a hash table "lovResults" craeted with following code -
    String lovInputSourceId = pageContext.getParameter(SOURCE_PARAM);
    Hashtable lovResults = pageContext.getLovResultsFromSession(lovInputSourceId);
    values which I can see through SOP are - ******Value of lovResults is{roleid=1000, domainFV=CREATIVE, Role=Account Director}
    How can I get the domain value "domainFV=CREATIVE" from hash table in a variable because I have to set this vaue in another field.
    Please help me ASAP
    Thanks
    Amit

    Hi Amit ,
    Since you are successfully printing the values using sop's , please try this code
    Capture the value in controller .
    if(oapagecontext.getParameter("domainFV") != null)
    String formvalue= oapagecontext.getParameter("domainFV") // ensure hashtable id is correct
    Keerthi
    Edited by: keerthioaf on Nov 26, 2012 8:46 PM

  • How to get values from RT table

    Hello friends ,
    I want to get earned basic from RT table  T-code - pc00_m40_clstr
    how to get that values for wage types
    gaurav

    Hi Gaurav,
    The Function Module u2018 PYXX_READ_PAYROLL_RESULT u2019 generically reads a complete payroll result, that is for all country versions, from file PCL2 or from the buffer. In doing so, the payroll result is transferred to the PAYROLL_RESULT parameter. In the calling system, this must be classified as a complex structure according to the 'PAYxx_RESULT' dictionary structure. u2018 xx u2018 is the ISO code for the country. Now the payroll result is in the parameter FS_PAY99_RESULT. In this parameter the RT table is considered and the required values are moved into a internal table (say  T_RT).
    Regards,
    Swapna.

  • How to pass value from report table to Popup window

    suppose i have a report region
    from query
    "Select * from emp"
    i need to get a popup when i click on the row,
    i need all the columns should be displayed inthe popup window;
    i have written javascript in the report template, by passing #COLUMN_VALUE#
    the issue here is iam only getting the column on which i click,
    is there any way to refer the next column ?
    or am i doing it in wrong manner ?

    Hi Mike,
    Yes what you said is exactly correct ,
    i have a query , but for that i need some PK { three columns } from the the page where this popup will be called,
    i have three columns in the row which makes it as PK,
    now how can i pass three columns from a page to popup ? provided if i click on the row of an table, i want that rows three column to be passed .

  • How to Load Values From Database on page load?

    I am sure this is easy but... I have a website that lists products similar to the way Amazon lists them. Each product is listed in a separate HTMP table cell complete with Product Name, Desciption, Image and Pricing. Any given product will appear on many different pages within the website. I have a mysql dtabase that has columns that define the primary key, the Product Name, the Product Description and Pricing. I was hoping to use the Dremaweaver Recordset to load the correct pricing and product description for each product on any given web page at the time the page is loaded by the user. Surely I must be able to run an SQL query based on a hiiden vale (e.g. the primary key or name of the product) in order to fill in the correct descriotion and pricing. Am I on the right track or is there a better way to do this? Put another way, how do you load your product data from a database onto a web page without using URL paraneters?

    Yes, you are on the right track. Besides URL parameter you can filter a recordset with a session variable, cookie, or entered value.

  • How to retreive value from my table..

    hi,
    I have developed a GUI which consists of table..of three columns and 16 rows..
    the table consists of propety and value and operator column..property column when user clicks on that cell it shows a combobox of 16 values like empno and empname and emporg,date etc..if user selects any of these value then in operator column it shows corresponding values ..like if selects empno it shows acombo box of less than,greater than,equals..if selects empname then equal,like ,not like with a combo box for selection..like that there r upto 16 rows//user can select any no of rows..after selection if he clicks on find then the selected values should be submitted to a query and passed to maethod..
    my doubt is how to retrieve the values and generate query..bcos iam not sure how many rows he is going to select..and in operator column it is string form and i have convert it to >=,< etc form..and submitt to query..
    can any body give me some tips for this with sample code..
    regards,
    sam

    Put your logo in a subreport, then you can suppress if no data etc.
    CR is a Relational Database reporting tool, it requires the tables to be linked otherwise there are 2 SELECT statements generated and unknown results...
    Don

  • How to take value from one table to another table?

    Hi,
    My requirement is,I have two tables those are Document and Transaction both having one common column "Docseriescode"
    in Document table already having different records with "Docseriescode".
    when i am going  to transaction table for adding records,  in "docseriescode" column automatically generate perticular Docseriescode
    eg:
    i have one "Cargo" record in Document Table with code CCN
    when i am going to Transactional table for inserting in this Docseriescode columns automatically get "CCN" code and get a drop down value
    anybody help me?

    Your use case is a simple master detail relation between two tables. If you don't have foreign keys in the db you can build the associations and links yourself in jdev. Doing this enables you to create  detail rows from a master row where the pk of the master is automatically set in the fk of the detail.
    Here you find more info http://docs.oracle.com/cd/E35521_01/web.111230/e16182/bcquerying.htm#ADFFD292 and Displaying Master-Detail Data - 11g Release 2 (11.1.2.3.0)
    and a sample Master Detail Insert/Delete Sample | JDev &amp;amp; ADF Goodies
    Timo
    Message was edited by: TimoHahn

  • How to display value from unlinked table

    Hello,
    In most of my report, I use at least 1 unlinked table that only have 1 row, which is mostly generic information like a logo or company name that I use in the header.
    This work well as long as there is at least 1 record in all other table, if not then my header will be empty.
    It seem to be related to the crossjoin between all table, but I was wondering if there was an easy was to accomplished this goal without having to link my "Company Info" table to the other one
    Thank
    ML

    Put your logo in a subreport, then you can suppress if no data etc.
    CR is a Relational Database reporting tool, it requires the tables to be linked otherwise there are 2 SELECT statements generated and unknown results...
    Don

  • XSD from Database table/view/procedure

    Hi all,
    Does anyone know of a tool or framework which enables generation of XSD's out of a Database table/view/procedure?

    Hi Naval,
    It depends on whether you created a BOL model for your Z-table or not. If you don't have a BOL model, then all you can do is use a value node. In that case, you need to add attribute that you want to show in the value node, read the values from the z-table and add them to the node. You can create method(s) in view implementation class to read values from database table and fill the context node. From where these methods should then be called will depend on your requirement.
    Regards,
    Shiromani

  • Bank Key field change from database table

    Dear All,
    At our client, 4 house banks are maintained. The bank keys entered for these are not BSR Codes but something like 100,200,300,400.
    This is not correct as we need to maintain BSR Code in Bank Key field as it is required on Form 16 A (TDS Cetificate)
    The Bank Key field is in display mode. I am thinking of changing wrong value from database table T012 & BNKA .
    Has anybody done this before? Will it affect my past or future transactions?
    Thanks & regards,
    Gov

    Dear Gulshan,
    What you are saying is correct & I subscribe to your view also.
    Creation of House Bank all over again seems to be one of the better options.
    We tried doing one more thing & which is working fine on Development.
    Our primary requiremnt is to have BSR Code on the From 16 A. System picks up the Bank key for this.
    We copied the standard Form 16A & created a Z. Then abaper created a subroutine. It is like when Bank key 100 comes to Form16A, replace it with say 0098500 (Correct BSR Code of the Bank)
    This helped to get the correct BSR Code in Form 16A & saved us from recreation of House Bank data.
    Your comments are welcome.
    Regards,
    Gov

Maybe you are looking for

  • WHAT IS THE BEST WAY TO CREATE AN XSD FILE (TO BE USED BY SOAP ADAPTER)

    Dear friends I have a simple scenario. OUTBOUND DATA  -->  SOAP ADAPTER  --> ( XI )  -->  RFC ADAPTER  --> INBOUND DATA The XML file that I got from mapping area of IR (Design) is as follows <?xml version="1.0" encoding="UTF-8"?> <ns0:MT_NAME_SOURCE

  • HELP HELP...updating and calculating total in javascript

    I am using Netscape and dont know why this script is not working..can anyone tell me what to do please? <script language="Javascript"> <!-- function updateTotalCost () {      var intTotal = 0      var currentDriverCost = ""      var playerlist = ""  

  • How to use Sql Loader in Unix Environmant

    Hi All, Can anyone explain me please how to use sql Loader in unix environment. Actually i have one control file i want to run that file in Unix how can i achive please explain me Thank's

  • Cannot import MIDI by drag and drop from Finder

    Cannot import MIDI by drag and drop from Finder. Try a MIDI file from http://rock.mididb.com/beatles/ and see if it works for you.

  • Save dialog with file type selection

    I'd like to give the user a save dialog with a dropdown showing a list of file formats to select from, as is pretty much always the case in normal save dialogs (even if there's only one acceptable file type.) It servers both as giving the user option