This discussion is archived
6 Replies Latest reply: Jan 3, 2013 5:44 AM by Munna 502 RSS

Post Change Event of textbox in adf

Munna 502 Explorer
Currently Being Moderated
I am new in adf. I want to load some data from database when a user enter text in textbox and populate other textbox values from database like as we do in forms developer

select db_field into :db_field from table_name where col1=:col1;

Thanks.
  • 1. Re: Post Change Event of textbox in adf
    Timo Hahn Oracle ACE
    Currently Being Moderated
    User, please always mention which jdev version you are using!

    Please also note that most us us don't know forms development, so we need a full use case beside a simple sql statement to understand what you try to archive.

    For this we need to understand what you plan to do with the data you read from the db later on (or do you only want to read it to display somewhere).

    Timo
  • 2. Re: Post Change Event of textbox in adf
    Munna 502 Explorer
    Currently Being Moderated
    Thanks for your reply. I am using jdev 11.1.1.4.

    My question is like if user enter deptid in the textbox i want to select dname from database table and display it in other textbox.
  • 3. Re: Post Change Event of textbox in adf
    Timo Hahn Oracle ACE
    Currently Being Moderated
    This is pretty easy, however, as you are new to ADF you have to cover some ground to understand how it works.
    Here are the steps:
    model layer:
    create a VO whihc is based on the query (with the parameter like select dname from table where did = :bindId)
    add this VO to the application module
    view controller layer:
    refresh the datacontrol to make the new vo added in the model layer visiable
    open the vo node and open the operatoins node
    drag the executeWithParams operation onto your page and drop it as form. this will get you the inputtext for the parameter
    drag thedepartmentname from the vo from the same VO and drop it as outputText
    set a partial trigger from the button to the outoputtext.

    When you now enter an id into the input test and hit hte execute button you get the result in the outputtext

    Before trying to implement this you should look at some of the videos on this page http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adfinsider-093342.html

    Timo
  • 4. Re: Post Change Event of textbox in adf
    Munna 502 Explorer
    Currently Being Moderated
    Thanks for your reply. I got ypur points but my requirements are something different.

    I have a View Object let say ItemMaster based on ItemMaster Entity Object.
    In this view i have field itemclass.

    I want when ever user enters a item class it will reads default values from ItemMasterDefaults table and display in the fields of ItemMasters i.e BaseUOM, SellUOM, etc.

    Thanks
  • 5. Re: Post Change Event of textbox in adf
    Timo Hahn Oracle ACE
    Currently Being Moderated
    You know that this was the exact reason why I ask for the use case.
    You gave one which I tired to explain to you. Now it turns out that the use case is something totally different.
    Please once again, before burning more time on this, give us a complete use case we can understand. From your last post I don't see the connection between the output text and the default values. How should the defaults shown to the user? Can they be overwritten by the user? Where are the new values stored?

    Timo
  • 6. Re: Post Change Event of textbox in adf
    Munna 502 Explorer
    Currently Being Moderated
    Thanks for your reply. Lets assume i have 4 fields on my page from single View Object ItemMasterVO having fields ItemClass, BaseUOM, SellUOM,PurchaseUOM. I want when user enters values in ItemClass i will read default values from ItemMasterDefaults table for fields BaseUOM,SellUOM,PurchaseUOM like

    Select BASE_UOM, SELL_UOM, PURCH_UOM
         From Item_Master_Defaults
    Where ITEM_CLASS= [value_in_textbox]

    and display in the text boxes (BaseUOM, SellUOM,PurchaseUOM).

    All fields will be data bound for ItemMaster View Object.

    Thanks.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points