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

Similar Messages

  • How to create the list box in the selection screen.

    hai friends..
    i want to create the list box for the selection screen input boxes.
    thanks,
    velu.

    hi..
    1. There are two important things :
    a)PARAMETERS : a(10) TYPE c AS LISTBOX VISIBLE LENGTH 10.
    b) Fm VRM_SET_VALUES
    2. just copy paste
    3.
    REPORT abc.
    TYPE-POOLS : vrm.
    DATA : v TYPE vrm_values.
    DATA : vw LIKE LINE OF v.
    PARAMETERS : a(10) TYPE c AS LISTBOX VISIBLE LENGTH 10.
    INITIALIZATION.
    vw-key = '1'.
    vw-text = 'Jan'.
    APPEND vw TO v.
    vw-key = '2'.
    vw-text = 'Feb'.
    APPEND vw TO v.
    vw-key = '3'.
    vw-text = 'Mar'.
    APPEND vw TO v.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    id = 'A'
    values = v
    EXCEPTIONS
    id_illegal_name = 1
    OTHERS = 2.
    regards,
    veeresh

  • How to create dropwdown list box values and checkbox in screen painter.

    Hi Experts,
    I need to know the creation of dropdown list box values and the checkbox to use in screen painter.
    I have 3 values to insert as:-
    INR,USD,EUR
    if user selects INR/USD/EUR, then it will store into the table field.
    And also want to know the checkbox functioning in screen painter, i.e. what should we write in PBO/PAI.
    I have found some sites to get knowledge, but didnot found anything that relates to my questions.
    So please help me!
    Thanks,
    Deepanshu

    Hi,
    For dropdown list box in Screen create a input field and choose Drop down by index.
    To populate the values write the logic in PBO as follows
    TYPE-POOLS : VRM
    DATA : field_id TYPE VRM_ID ,
                values  TYPE VRM_VALUES,
                 value   LIKE LINE OF values.
    PROCESS BEFORE OUTPUT
    MODULE list_fill_100
    MODULE list_fill_100 OUTPUT
    SELECT f1 f2 f3  FROM tab WHERE condition.
    value-KEY = f1.
    value-TEXT = f2
    APPEND value TO VALUES
    CALL FUNCTION 'VRM_SET_VALUES'
           EXPORTING
                id     = 'i/o screen field'
                values = values.
    ENDMODULE.

  • 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.

  • How to create dependent list for attributes that are there in same table?

    HI,
    I need to ADF Creation Form that will insert into a Training table. and need to make a dependent LOV. Like i have a table
    Training (training_id, training_type, training_name ) i need to make a dependent list of value for Training_Type and Training_Name.
    Can anybody plz gave me the solution..
    Thanks

    Hi,
    which release of JDeveloper ?
    Frank

  • 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.

  • How to Create a DropDown Box in a Selection Screen.

    Hi,
    I have a question. i.e, How to create a dropdown box in a Selection Screen. Could you please assist me.
    Thanks & Regards
    Sathish Kumar

    hi satish,
    The following can assist u to create a drop down ....
    Drop down list box can be created in a dialog screen(SE51) as well as selection screen.
      The sap list box allows to select a value from the list but we cannot enter our own value in the list box .The value list that will be displayed consists of two
    fields TEXT field of TYPE 80(C) and internal KEY field of TYPE 40(C).
    In screen painter to create a input/output field into list box we use
    'L" as a value for dropdown attribute for the i/o field.
    In screen painter to determine the type of method that will be used to fill the value
    list we use the attribute value list.
    If it is blank  the value list will be filled by the first column of the input help assigned to the screen field.This input help can be defined in the ABAP Dictionary, on screen using SELECT,VALUES screen statements or in event POV (PROCESS ON VALUE-REQUEST ) and the input help that will be passed to the field should consists of 2 columns ,the key column is filled automatically by the system.SAP recommends value list field should be blank.
    or
    The value  can be 'A' meaning that the value list will be filled in the event PBO(PROCESS BEFORE OUTPUT) or before the screen is displayed.In this method we use function module VRM_SET_VALUES to fill the values and pass it to the i/o field.
    If a function code is attached to the list box the selection of a value triggers a PAI
    otherwise PAI will not trigger.
    Example
    Dropdown list boxes
    REPORT DEMO_DYNPRO_DROPDOWN_LISTBOX.
    TYPE-POOLS VRM.
    DATA: NAME  TYPE VRM_ID,
          LIST  TYPE VRM_VALUES,
          VALUE LIKE LINE OF LIST.
    DATA: WA_SPFLI TYPE SPFLI,
          OK_CODE LIKE SY-UCOMM,
          SAVE_OK LIKE SY-UCOMM.
    TABLES DEMOF4HELP.
    NAME = 'DEMOF4HELP-CONNID'.
    CALL SCREEN 100.
    MODULE CANCEL INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE INIT_LISTBOX OUTPUT.
      CLEAR DEMOF4HELP-CONNID.
      SELECT  CONNID CITYFROM CITYTO DEPTIME
        FROM  SPFLI
        INTO  CORRESPONDING FIELDS OF WA_SPFLI
       WHERE  CARRID = DEMOF4HELP-CARRIER2.
        VALUE-KEY  = WA_SPFLI-CONNID.
        WRITE WA_SPFLI-DEPTIME TO VALUE-TEXT
                               USING EDIT MASK '__:__:__'.
        CONCATENATE VALUE-TEXT
                    WA_SPFLI-CITYFROM
                    WA_SPFLI-CITYTO
                    INTO VALUE-TEXT SEPARATED BY SPACE.
        APPEND VALUE TO LIST.
      ENDSELECT.
      CALL FUNCTION 'VRM_SET_VALUES'
           EXPORTING
                ID              = NAME
                VALUES          = LIST.
    ENDMODULE.
    MODULE USER_COMMAND_100.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      IF SAVE_OK = 'CARRIER'
         AND NOT DEMOF4HELP-CARRIER2 IS INITIAL.
        LEAVE TO SCREEN 200.
      ELSE.
        SET SCREEN 100.
      ENDIF.
    ENDMODULE.
    MODULE USER_COMMAND_200.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      IF SAVE_OK = 'SELECTED'.
        MESSAGE I888(BCTRAIN) WITH TEXT-001 DEMOF4HELP-CARRIER2
                                            DEMOF4HELP-CONNID.
      ENDIF.
    ENDMODULE.
    Reward if useful.
    Thank you,
    Regards.

  • 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

  • How to create Invoice list??

    Hi guyz,
    could you please tell me how to create invoice list, i have created sales order, done the delivery,created billing.
    appreciate immediate reply.
    Thanks.
    Mohammed.

    Hi Mohammed,
    To create an invoice list:
    Select the Billing screen.
    Depending on the number of billing documents that you want to include, you can choose one of two ways to create the invoice list. You can either
    · Select Invoice list Create and enter each billing document separately
    · Create a list for all billing documents that are relevant for the invoice list. You can then process the work list for invoice lists.
    This procedure shows you how to create the work list.
    Select Invoice list Edit work list.
    Enter your selection criteria and press ENTER.
    The system displays a list of billing documents that meet your selection criteria.
    Select the billing documents that you want to include in the invoice list and select Invoice list Save.
    You can also simulate creation of invoice lists via the work list for invoice lists. This is useful as a test option. The simulation also allows you to carry out a split analysis, which shows you why billing documents are written to different invoice lists (e.g. due to different payers).
    Prerequisites
    You can only process invoice lists if the following prerequisite data is defined by your system administrator in Customizing for Sales:
    Condition type RL00 (factoring discount) must be maintained and, if required, also the condition type MW15.
    An invoice list type must be assigned to each billing type that you want to process in invoice lists. The standard version of the SAP R/3 System includes two types of invoice lists: LR for invoices and debit memos, LG for credit memos.
    Copying requirements must be defined (for example, the payer, terms of payment and other fields that must be identical in the documents to be included in the invoice list)
    In addition, before you process an invoice list, you must maintain the following master data:
    A customer calendar must be defined, specifying the time intervals or dates on which invoice lists are to be processed.
    The customer calendar must be entered in the Billing Sales Area view of the customer master record.
    Pricing condition records for the condition type RL00 and, if necessary, (e.g. in Germany) the condition type MW15 must be maintained.
    Output condition records for condition types LR00 and RD01 must be created.
    Hope with this info you can do it. Pl. reward if it helps.
    Thanks & Regards
    Sadhu Kishore

  • Creating Dependent List on Security Group.

    Hi,
    I want to create dependent list on Security group, i have created custom table, Relation and view on Security group and on my custom table.
    I am not getting dependent list as it should be dependent on security group.
    Please help me.

    See my post Re: How to change the values in custom profiles based on security group ??

  • How to create a text box in ascreen painter?

    HI friends can anyone tell me how to create a text box in a screen painter?
    And attachment BROWSER like what we attach for any documents in over mail.
    Example when we click on browser the path of the computer has to be opened and by giving the document name attach and the document will be attached. Please tell me the procedure....
    Thks

    To get the best answers, I think you probably need to break down your post into several different one with a separate question in each, along with the business problem you are trying to solve... but here's a few pointers for you to research...
    Textbox - there's plenty of info in SDN on creating a custom control with a textbox e.g. Re: Text Editor on modulepool Screen and sample code in SAP too.
    Attachments - If this is for an email, then GUI_UPLOAD might help and the BCS class is the newer way to send messages... check out Re: Offline Approval: RBBP_NOTIFICATION_OFFAPP Vs RSWUWFMLEC for example... if this is an attachment for an SAP object such as an FI Document or Purchase Order, then the Generic Object Services (GOS) could be what you want e.g. https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0e6b0d95-0a01-0010-4696-ca0a48de5fb3
    Jonathan

  • How to create distribution list in workflow? for  sending mail or work-item

    Hi,
    How to create distribution list in workflow? for  sending mail or work-item to multiple users.
    Regards,
    Surjith

    Hi Surjith,
    A.Working with Distribution Lists Creating a Distribution List.
    1 Businees Workplace->shared folder - create new subfolder name = WF_distributor
    2.Then click on the distribution list in Businees Workplace.
    say create Name = WF_Vliste
    folder Name = WF_distributor
    3.distribution list content tab
    Enter Recipient (SAP User ID)
    B.Wrkflow Builder
    Find out the dialig step in which u want to use distribution list
    Use workflow Rule 30000012 (SWX_READ_DLI).
    Maintain the binding from workflow container to rule container.
    Just pass the name of the distribution list from WF to Rule container.
    Regards
    Sagar S

  • How to edit the list box items in labwindow/​CVI?

     how to edit the list box items in labwindow/CVI?

    Listbox items cannot be edited directly in the control: what you can do is to select a line an, transfer its content to a textbox control, edit text there and move text back to the listbox control. Available interactions with the listbox control are listed in the help.
    An alternative to it is to use a tree customized to appear like a listbox: tree item labels can be edited directly in the control, at least those in the base column of the tree. You can look at the example \samples\userint\treelist.cws that shows how a tree can be customized this way. I haven't opened it, but this old example too should show the ability to edit tree cells.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How to add a list box with values for a ztable in SM30

    Hello Gurus,
                    I had created a table maintenance for Ztable and added many extra functionality to that. Now i would like to add a list box or check table for a field. Can i do that with out Regenerating my table maintenance. Please help me its..very urgent.

    Have referred this domain to the data element, this should be the Field type in ur table for the particular field.
    Eg: <b>SE11 > table name > fields-ZTEST > fieldtype-ZZTEST</b>
    ZZTEST in the data element > create a domain for this data element and in that specify teh value range.
    Save and activate it.
    Make sure that u regenerate teh table maintenance generator else u cant see the changes.
    Now if u press F4 u can see only thevalues specified, also u will see only the list box with values in SM30.
    Try this,please let me know if u face any difficulties.

  • Wondering how to create a text box with variables...

    Hi everyone,
    I was wondering how to create a text box, that at the beginning of the presentation, the audience fills in regarding what they think constitutes the role they have been chosen for.
    I would like that same box to then appear at the end of the presentation, with the text they typed in at the beginning, so they can reflect on what they think now, and what they thought then. I understand this is done using variables, but i'm not 100% sure.
    I hope I've worded this okay!

    This screenshot shows the properties panel, Style tab for the TEB. I relabeled it to My_TEB, used the X button  to create a user variable v_choice that will replace the generic Text_Entry_Box_1/
    This is the properties panel of a Shape, I went in Edit mode (double clicking)to make the Character section appear, where you find the X button. It opens the dialog box 'Insert Variable' and you can choose the var associated with the TEB. The Maximum Length will define how many characters will be displayed, the value of a variable has maximum 256 characters.

Maybe you are looking for

  • Using Oracle Developer Suite 10g with the 10g Express Edition Database

    I'm new to Oracle and I'm taking an SQL college level course using a text book entitled "Guide to Oracle 10g". Our text book came with Oracle Developer Suite 10g (9.0.4.0.1) but no database. We adopted the 10g Express Edition (XE) as the database. I

  • Screen/Artboard Updating When Dragging

    Hi all, I tried to search but couldn't find anything as I didn't know how to phrase it, so apologies if this has been asked before. Basically, if I drag something to the edge of the screen so that the artboard has to scroll either up/down/left/down,

  • Dates in ADF Search Form

    Hi, I have implemented a search form where i query the set of entries and display the results below in a table. The problem that i am facing is that when i query the set using the "Created by" column of my table i do not get any results. The date for

  • JCA in web service

    Hi, I am writing my first web service and I need to connect to R/3 system. I would like to use JCA(or what is better JCA or JCO?) but i dont know where i may take request/user object which are used in this sniplet. ConnectionProperties prop = new Con

  • Link DMS document to a finance object

    Hello, As anybody succeeded to create a document link to finance object? I am now trying to create this link, and I as already read SAP Help about this topic. As far as I understand I need to: "1. Program two screens for the following module pools fo