ADF: Retrieve values from view and autofill in JSP

Hi,
I am using jdev 10.1.3 with ADF.
I have a jsp page, on which I have 10 fields. On filling one particular field, the other related fields should be retreived from a Synonym or view (That I have in my database.) and automatically filled in jsp page.
If I am not clear, I have a jsp page which has account number, bill to and ship to fields.
There is a Synonym table which has the account number, billto and ship to fields. when I fill in the account number field in my jsp, then it should be validated against the synonym and retrive the bill to and ship to information for that particular account number and displayed automatically in the JSP.
Can you give me any examples or URLs please?
Thanks,
Priya

Hi
I hope you can solve your problem with one of following solutions.
1. Return the resultset to jsp program.
In this getrow() method in Viewtable.java will look like this
public void getrow() throws SQLException,IOException {
System.out.println("see what happen" );
String query = "SELECT PRODID,QUANTITY FROM INVENTORY";
st = con.createStatement();
rs = st.executeQuery(query);
return rs;
and your jsp program will be....
<% ResultSet rs = view.getrow();
while (rs.next()) {
qty = rs.getString("QUANTITY");
id = rs.getString("PRODID");
System.out.println(qty + " " );
%>
2. If you just want to print the details then pass the "out"
variable to getrow() method. ex:view.getrow(out)
3. Otherwise store all your values in an array and return it.
bye
Sridhar

Similar Messages

  • Want to retrieve values from TB028 and TB009

    Hi Experts ,
    I wanted to retrieve value of TB028-BEZ30 ( Description for occupation) depending upon field JOBGR in BUT000 , similarly in Table  TB009-TEXTSHORT(Short name for Address type) wanted to get the value depeding upon ADR_KIND in BUT021.
    But I am not able to retriev this value. I tried using some FMs too but they dont return either of these fields in their o/p parameters
    FM used :
    For retriving TB028 fields
                BAPI_BUPA_CENTRAL_GETDETAIL
    For retiving TB009 fields :
              FSBP_READ_ADDRESS_DATA
              BUP_TB009_SELECT_ALL
              BUPA_ADDRESSES_READ_ALL
    None of these returns the fields I want. Am I missing something here??
    Regards,
    Neel

    Hello Anitha,
    Since u have declared it as global variable there is no need to declare inside the routine.
    If useful award the points.
    Regards,
    Vasanth

  • Retriev values from database and display in a ComboBox

    hi all,
    i think the subject explains it all. how? currently iam using vectors which is giving me lots of problems and errors, whenever it adds to the combobox it adds the square braces as well example if the value in database is asrar then it will display [asrar], what is causing that? does anybody now any easier way??
    asrar

    please can someone help me
    asrar

  • Retrieve values from a table of a JSP page in Servlet.

    Hello all,
    I am new in JSP servlet world, I want to create a grid on JSP page using Servlet.
    Suppose i have some records in a JSP page and This JSP page will display these records in a tabular form. And, on a button click that table data should be
    accessible in servlet,
    Now, How can i traverse among all the rows of that table of JSP page in servlet. or How can i retrieve a specific cell record of that table of JSP page in servlet.
    Can anyone please answer this.
    Thank you and regards.

    Hi,
    Create in your HTML form inputs with the same name i.e.:
    <input name="a[]" value="2" >
    <input name="a[]" value="9" >
    In your jsp page use :
    String Values[] = request.getParameterValues("a[]") ;
    This will give you a string array of two elements.
    for (int x = 0; x < Values.length; x++)
        System.out.println(Values[x]) ;
    }Will print :
    2
    9
    Hope this helps.
    Bill Moo

  • Retrieving values from Database in Excel Task Pane App

    So far,
    I created a website with a database on Azure, I then published my App to Azure. My problem is that I'm not sure how I retrieve values from the database (in SQL: SELECT * FROM EXAMPLE_TABLE WHERE date = str). If someone could provide me with sample code,
    that would be amazing! :D
    It would also be very helpful if anyone knew a method to automatically update the database using information from a xml stream on another website, once a day.
    Thank you!

    Hi,
    >> My problem is that I'm not sure how I retrieve values from the database
    You can use jquery ajax call to call your webserivce or REST API, which will query the database and return a json result.
    Sample:
    Apps for Office: Create a web service using the ASP.NET Web API
    >> It would also be very helpful if anyone knew a method to automatically update the database using information from a xml stream on another website
    For the database sync-up question, I suggest you posting them on the forums like SQL Server Forum.
    Thanks for your understanding.
    Best Regards
    Lan
    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.

  • Retrieve values from a HTML table !!!

    Hi.
    How can i retrieve values from a HTML table using javascript ?
    I´m trying to use the command "document.getElementsByTagName" without success.
    Thanks in advance.
    Eduardo

    Hi, Deepu.
    I´m still with trouble in retrieving the value in HTML.
    In debug the C_CELL_ID seems to be correctly updated but
    when using the command "document.getElementById" the value is always "null".
    I implemented in the method DATA_CELL the code :
      if i_x = 3 and i_y = 2.
      C_CELL_ID             = 'zs'.
      C_CELL_CONTENT = 10. 
      endif.
    And in HTML :
    var ztest = document.getElementById('zs');
    alert(ztest);
    Could you help me please.
    Many regards
    Eduardo S.
    Message was edited by: Eduardo   Silberberg

  • Retrieving values from a table

    Hi all,
    I need to retrieve values from CSKS-KOSTL for values containing the pattern entered by the user. For example, if the user enters 1, need to retrieve all the KOSTL values starting with 1. But when i write a SELECT statement mentioning where kostl in '1', it is ignoring all the values like (0000001, 00001034, 0012334, and others). Only values starting with 1 is only retrieved as this is a character field and due to conversion routine, zeroes are prefixed while storing in the database.
    Could any one let me know how to retrieve the values from the database in this situation?

    If you want to use IN operator in your where clause then you should define a range variable(R_KOSTL) which refers to CSKS=KOSTL and populate the range as below
    R_KOSTL-SIGN = 'I'.
    R_KOSTL-OPTION = 'CP'.
    R_KOSTL-LOW = '1*'.
    APPEND R_KOSTL.
    and then write your select statement as .... WHERE kostl IN r_kostl.
    The approach suggested by Amit should also work fine.
    Thanks
    Kiran

  • How to retrieve value from xml file

    hi all,
    can somebody pls tell me how to retrieve value from xml file using SAXParser.
    I want to retrieve value of only one tag and have to perform some validation with that value.
    it's urgent .
    pls help me out
    thnx in adv.
    ritu

    hi shanu,
    the pbm is solved, now i m able to access XXX no. in action class & i m able to validate it. The only thing which i want to know is it ok to declare static ArrayList as i have done in this code. i mean will it affect the performance or functionality of the system.
    pls have a look at the following code snippet.
    public class XMLValidator {
    static ArrayList strXXX = new ArrayList();
    public void validate(){
    factory.setValidating(true);
    parser = factory.newSAXParser();
    //all factory code is here only
    parser.parse(xmlURI, new XMLErrorHandler());     
    public void setXXX(String pstrXXX){          
    strUpn.add(pstrXXX);
    public ArrayList getXXX(){
    return strXXX;
    class XMLErrorHandler extends DefaultHandler {
    String tagName = "";
    String tagValue = "";
    String applicationRefNo = "";
    String XXXValue ="";
    String XXXNo = "";          
    XMLValidator objXmlValidator = new XMLValidator();
    public void startElement(String uri, String name, String qName, Attributes atts) {
    tagName = qName;
    public void characters(char ch[], int start, int length) {
    if ("Reference".equals(tagName)) {
    tagValue = new String(ch, start, length).trim();
    if (tagValue.length() > 0) {
    RefNo = new String(ch, start, length);
    if ("XXX".equals(tagName)) {
    XXXValue = new String(ch, start, length).trim();
    if (XXXValue.length() > 0) {
    XXXNo = new String(ch, start, length);
    public void endElement(String uri, String localName, String qName) throws SAXException {                    
    if(qName.equalsIgnoreCase("XXX")) {     
    objXmlValidator.setXXX(XXXNo);
    thnx & Regards,
    ritu

  • How to get return value from java and read by other application?

    i want to read return value from java and the other application read it.
    for example:
    public class test_return {
        test_return(){
        public int check(){
            return 1;
        public static void main(String args[]){
           new test_return().check();
    }from that class i make as jar file. How to read the return value (1) by other application?
    thx..

    If your installer is requiring some process it invokes to return a particular value on failure, then the installer is seriously broken. There are a bazillion commands your installer could invoke, and any of them could fail, which in turn could invalidate the entire install process, and any of them could return any value on failure. The only value that's consistent (in my experience) is that zero means success and non-zero means failure, with specific non-zero values being different in different programs.
    About the only control you have over the JVM's exit code is that if your main method completes without throwing an exception, the JVM will have an exit code of 0, and if main throws an exception (either explicitly or by not catching one thrown from below), it will be non-zero. I'm not even sure if that's guaranteed, but I would guess that's the case.
    EDIT: I'm kind of full of crap here. If you're writing the Java code, you can call System.exit(whatever). But nonetheless, if your installer requires certain exit codes from any app--java or otherwise--you have a problem.
    Edited by: jverd on Oct 29, 2009 1:27 AM

  • Passing field values from View Controller to Custom Controller

    Hi Experts,
    I am working on a customer requirment in which customer want to see the values of field from one view in another view. The Context node & Context node attribute are the same in both the views.
    I am aware that we need to pass the field values from view controller to custom controller in order to see the field in the subsequent view. I would like to kow how i can achieve that technically?
    Kindly let me your valueable suggesions.
    Best Regards,
    Prabahar

    Hi Carsten,
    Thank you for the detailed feedback.
    I want the fields ID_TYPE & ID_TYPE_DESCRIPTION from IUICMD/SearchAccount to be available in IUICMD/DetailAccount. I have created a context node u201CSEARCHu201D in view IUICMD/DetailAccount. I have created the context node with out choosing u201CCreate with Instanceu201D.  This Context node (SEARCH) is already available in IUICMD/SearchAccount as part of the standard.
    Below given is contents of the Method CREATE_SEARCH of my context class ZL_IUICMD_DETAILACCOUNT_CTXT of view IUICMD/DetailAccount, which is created by the Wizard during enhancement.
    method CREATE_SEARCH.
        DATA:
          model        TYPE REF TO if_bsp_model,
          coll_wrapper TYPE REF TO cl_bsp_wd_collection_wrapper,
          entity       TYPE REF TO cl_crm_bol_entity,    "#EC *
          entity_col   TYPE REF TO if_bol_entity_col.    "#EC *
        model = owner->create_model(
            class_name     = 'ZL_IUICMD_DETAILACCOUNT_CN00'
            model_id       = 'SEARCH' ). "#EC NOTEXT
        SEARCH ?= model.
        CLEAR model.
    bind to custom controller
      owner->do_context_node_binding(
               iv_controller_type = CL_BSP_WD_CONTROLLER=>CO_TYPE_CUSTOM
               iv_name = 'IUICMD/CuCoMD' "#EC NOTEXT
               iv_target_node_name = 'BUILHEADERSEARCH'
               iv_node_2_bind = SEARCH ).
    endmethod.
    I have enhanced the Custom Controller. Now it have new implementation class u201CZL_IUICMD_CUCOMD_IMPLu201D
    Let me know where I am doing mistake
    Thanks in advance
    Best Regards,
    Prabahar
    Edited by: Prabahar Raju on Sep 2, 2009 10:47 AM
    Edited by: Prabahar Raju on Sep 2, 2009 10:52 AM

  • Process and Code for writing an RFC to retrieve data from IT0006 and IT0655

    Hi,
    Can some body tell me the process and code for creating an RFC to retrieve data from IT0006 and IT0655.
    Its very urgent........
    Waiting for an early reply.....
    Many thanks

    Hello Krishna,
          The process for creating an entry in infotype is as follows.
    1.First you get the personal number lock for upating.You can use function 
        module ' BAPI_EMPLOYEE_ENQUEUE ' or ENQUEUE_EMPREL.
    2.Pass the records to function module ' HR_INFOTYPE_OPERATION' with
       OPERATION - 'INS'.
    3.Unlock the Employee by using function moule 'BAPI_EMPLOYEET_DEQUEUE'.
    Regards,
    Manoj.

  • LoaderInfo get values from EMBED and OBject Tag (not FlashVars)

    hi
    i try get values from object and embed tags like bgColor and
    allowFullScreen
    but i cant find how i can it
    loaderInfo.parameters return only flashVars
    if some body know it please help
    thank you
    Sonettic Cinema
    Project

    <forward name="success" path="/jsp/success.jsp" redirect="true" />
    but when success.jsp page gets called its not displaying the username and usertype values on page.The request has been redirected to success.jsp(*redirect="true"*) and hence the attributes stored in request object will not be available in success.jsp. Use Session to store login user information instead.

  • Retrieving values from a table in ADF

    Hi All,
    Can any one give me the code or an example as how to retrieve the values associated with the table in jspx page.
    I am working in ADF10.1.3.
    Thanks,

    Hi,
    I am using ADF10.1
    I have a table with multi selection in my jspx page.
    I have to get the table particular row and using that need to get other values associated with the table.
    I have used the floowing code..but this is not functioning properly
    SelectedRowSet = this.getTable1().getSelectionState().getKeySet();
    rowSetIter = selectedRowSet.iterator();
    // Get the Selected Row Values from
    if (selectedRowSet.size() > 0)
    for (int counter = 0; counter < selectedRowSet.size(); counter++)
    int index = (Integer) rowSetIter.next();
    JUCtrlValueBindingRef currentRow =
    (JUCtrlValueBindingRef) getTable1().getRowData(index);
    Row row = currentRow.getRow();
    if (row!=null)
    variable name = ((String) row.getAttribute());
    Debugger is raising an exception at JUCtrlValueBindingRef line.
    Do share some ideas on it.
    Thanks,

  • Using keys to search and retrieve values from HashMap

    I've been fiddling around with this problem for a while and can't seem to find any working solution. What I have is a method that I want to return all values from a HashMap, but instead of using the regular keys for a HashMap (0, 1, 2, 3), my keys are different numbers such as 51414, 62513, etc.
    public Car[] getAllCars() {
              Map<Integer, Car> myCars = system.getCars(); //getCars() returns HashMap of Car objects from another class
              Car[] c = new Car[myCars.size()];
              if(myCars.size()!=0) // ensure map is populated
                   for(int i=0; i<myCars.size(); i++)
                        myCars.get(i);
              return c;    
         }So what's happening at the moment is it loops through myCars and gets some values, but only those ones at the keys of 0-15 (the size of the Map). What I need is to get the Keys from myCars and use them to return all Car objects. The HashMap API has something called KeySet() which I think could help me, but I can't get that working.
    Any ideas?

    DiscoInferno wrote:
    Short of an SSCCE I think this might more accurately describe what I'm after.
    public Car[] getAllCars() {
              Map<Integer, Car> myCars = system.getCars();  //getCars() returns HashMap of Car objects from another class
              Car[] c = new Car[myCars.size()];
              Set<Integer> s = holds.keySet();
              Iterator keyIter = s.iterator();
              if(myCars.size()!=0)
                   while (keyIter.hasNext()) {
                        Object key = keyIter.next();
                        Car cc = myCars.get(key);
                        System.out.println(myCars.get(key));
              return null;
         }What that does is gets the Car object that matches the specified key. What I need is for it to be returnable as an array of Car objects. I don't want it to print, but the output that is printed is basically what I want to be returned to an array.First, I'm not sure how you managed to find keySet() and not find values().
    Second, okay, so you know how to get each value. Do you not know how to set a value in an array? Do you not know how to return a value from a method? Google can help you find tutorials for those. Otherwise, I have no idea what difficulty you're having.

  • Unable to retrieve values from a table

    I have created a table called ct_temp and it's structure is:
    create table ct_temp(id char(2),srs number(3),amt number);
    Result : Table Created
    I now insert the following rows into the table:
    id  srs  amt
    1 62 30000
    2 65 50000
    3 65 70000
    4 65 80000
    5 62 16000
    6 65 10000
    7 65 100000
    8 65 10
    Commit
    Then I issue the following query to retrieve data based on a specific criteria (Actually I have condensed the table and data because in Production, I have large number of rows; so for simplicity I am using 8 rows with one table)
    criteria : I then want to retrieve the following:
    for srs = 62, all values that is greater than 10,000
    Answer: select decode(srs,62,ab.amt)temp1 ,decode(srs,65,ab.amt)temp2 from ct_temp ab
    where decode(srs,62,ab.amt)>10000
    Works like a charm and retrives the results.
    Now comes the big issue
    I want to retrieve the values for srs = 62 which is greater than 10,000 and at the same time I also want to retrieve the values for srs = 65 which is less than srs = 62.
    Typically I wrote the query as:
    select decode(srs,62,ab.amt)temp1 ,decode(srs,65,ab.amt)temp2 from ct_temp ab
    where decode(srs,62,ab.amt)>10000
    and decode(srs,65,ab.amt)<decode(srs,62,ab.amt)
    Expected results should be:
    srs amt
    62 30000
    62 16000
    65 10
    I should atleast get one row for srs = 65 which is id # 8 but it displays blank rows or "no rows returned".
    I am actually preparing a ad-hoc report for the business analyst and stuck at this step due to which I am unable to proceed any further. I have used DECODE function because of the requirement specified by Business Analyst.
    I have tried the following in the office:
    using EXISTS operator = no luck
    using INLINE VIEW = no luck
    using UNION operator = No luck
    Is there any way around? Please help me guys.
    Sandeep
    NOTE: The reason why I have used DECODE function is because in Production environment there are columns called
    a) return line item which has numerous values like '001', '002', '062', '067'
    b) there is another column called amount
    c) so for every return line item there is an amount
    so the business wants:
    d) if the line item number = 62 then the amount should be dispplayed and it should be displayed as "AB Taxable income"
    e) if the linte item number = 65 then the amount should be retrived and displayed as "Amount taxable in AB"
    So seeing these multiple conditions for a "SELECT" statement, I used DECODE fuction.

    user11934091 wrote:
    What I have not been able to understand is why you have taken "0" there? Nulls! You need to use a number and not a null for a maths predicate.
    The following is ALWAYS false:
    and decode(srs,65,ab.amt) < decode(srs,62,ab.amt);
       is in fact: 
    and NULL < numberNull is not smaller than any number. Null is not larger than any number. Null is not equal to any number. Null is null. When it is not, that condition using Null is FALSE!!! Always.
    So look at your data. You are introducing 2 new derived values called TEMP1 and TEMP2 using decode(). So let's add these to derived values as columns to the table so that you can see how the data set now looks like:
    // add the 2 new columns
    SQL> alter table ct_temp add( temp1 number, temp2 number );
    Table altered.
    // populate these new columns using your decode statements
    SQL> update ct_temp
      2  set     temp1 = decode(srs,62,amt),
      3          temp2 = decode(srs,65,amt);
    8 rows updated.
    SQL> commit;
    Commit complete.This is how the data set now looks like:
    SQL> select * from ct_temp;
    ID        SRS        AMT      TEMP1      TEMP2
    1          62      30000      30000
    2          65      50000                 50000
    3          65      70000                 70000
    4          65      80000                 80000
    5          62      16000      16000
    6          65      10000                 10000
    7          65     100000                100000
    8          65         10                    10
    8 rows selected.Here are your 2 queries on this data set:
    // 1st query finds 2 rows
    SQL> select * from ct_temp where temp1 > 10000;
    ID        SRS        AMT      TEMP1      TEMP2
    1          62      30000      30000
    5          62      16000      16000
    // 2nd query finds the same 2 rows and then test
    // whether TEMP2 is smaller than TEMP1 - as TEMP2
    // is NULL for those 2 rows, this smaller than condition
    // is FALSE. Thus no rows are found.
    SQL> select
      2          temp1,
      3          temp2
      4  from       ct_temp ab
      5  where      temp1 > 10000
      6  and        temp2 < temp1;
    no rows selected
    // You thus need to change NULLs into a number - this is done
    // below using the NVL function. In my original example I did
    // this in the DECODE itself by returning 0 instead of NULL.
    SQL> select
      2          temp1,
      3          temp2
      4  from    ct_temp ab
      5  where   temp1 > 10000
      6  and     nvl(temp2,0) < nvl(temp1,0);
         TEMP1      TEMP2
         30000
         16000Bottom line. YOU CANNOT EVALUATE NULLS USING MATHEMATICAL PREDICATES.
    So - change the NULL to a number and the do the evaluation. Or determine what the business rule is for when there is no value to evaluate in the predicate and apply that rule.
    That simple.

Maybe you are looking for

  • BI functionality in Solution Manager 4.0

    Hi, I'm very interested in knowing how to configure the new BI functionality which is included in SSM 4.0. Is there anybody who has activated this functionality yet? Or knows how to do this (looking for guidelines and if available, any documentation)

  • Time Machine Drive on Network

    It seems like something has changed with 10.5.6 or so with respect to the ability to use networked drives. I have a PowerMac G5 that I have been using as a server with an second internal (IDE) drive that I have been using for time machine backups fro

  • Curtain mode not available

    Hello, I'm new to ARD ... running ARD 3.0 Unlimited, created an install package an installed on the target PowerMac G4 running OS X 10.4.8, opened the services ARD, Remote Login, and File Sharing (FS for general use) services in the firewall, and I c

  • HT1657 Deleted by mistake

    I deleted a rental movie by mistake.  Can I access it again without paying a second time?

  • ASA 5510 ACL Return Packet

    Hi, I've got a Problem with the ACL's on a ASA 5510 Cluster: the connected Client cannot resolve DNS; the Log says: %ASA-session-5-106100: access-list ACL-INSIDE denied udp inside/172.27.xxx.1(53) -> outside/192.168.xxx.8(59893) hit-cnt 1 first hit [