Listbox component, multiple selections and databases

Hello, I have a listbox component bound to a database. It populates alright, but when I want to set the default selections and add an array of String objects to the listbox's selected property, they never appear selected. I set the array in the prerender method. Has anyone done this before? I searched and only found different situations.
TIA,
Scott

Here is an excerpt from http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/about_components.html
"One way to preselect items is to call setSelectedValue(Object[]) or setSelectedValue(Object) from the prerender() method. You pass in the return values of the items that you want preselected. ..."
"For the items property, you specify a display label and a return value for each item in the list. The selected property returns an object, or, if the multiple property is selected, an array of objects, of the same type as the return values. "
" If the multiple property is false, the value of the component's selected property matches the return value of the selected list item. If the multiple property is set to true (to enable the user to select more than one item), you must bind selected to an array of Object, an array of primitives, or java.util.List. If you use java.util.List, you must specify a converter for the type of the List members unless they are String objects. The array contains values that match the return values of the selected items."

Similar Messages

  • Can I make the parameter supports multiple selection and editable at the same time?

    Hi, 
    I am building my report using SQL Server Report builder 3.0. All the parameters are added to the report
    by the builder. When the user access the report by browser, he can change the parameter value and click "view report" button to load the report from the database.
    For one of the parameter, I want to provide user the ability to select frequently used value as multiple
    selection, and meanwhile let them able to edit the value if the preloaded selection doesn't contain what he wants.
    Is it possible to archive this goal using report builder?
    Thanks!

    You cant have this functionality using standard report viewer. An approximate work around can be implemented as follows.
    Have two parameters one based on your current parameter values (dropdown) and another one without any available values set and default set to NULL (Set Allow Null value property and pass Null as default value). This parameter will appear as disabled textbox
    with NULL checkbox checked. 
    Now in your code behind which gives you first parameter's values Add one more value say <None Of Values> and set value as some default value (-1 if int or just a random string value).
    Now in the value for second parameter set a expression like below
    =IIF(Parameters!FirstParam.Value ="<Select None>","",Nothing)
    This will make sure second parameter gets activated when you select option <none> from first. Then you can type the value you want in it
    In query behind just make filter like below
    WHERE field = CASE WHEN @Param1 <> '<None>' THEN @Param1 ELSE @Param2 END
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How do I script a listbox so multiple selections can be recognized?

    I have a pdf project that lets the user make selections from a listbox, and then those selections determine which fields on the page are shown or hidden. I've made sure the listbox allows for multiple selections but I can't get the scripting to recognize and show multiple fields. So far it only works when one item is selected. How do I make it so when the user selects multiple entries that it will actually cause multiple fields to show?
    I've included file to show what I've gotten done so far.

    Sorry, realized my other posts question wasn't phrased very well and I figured you thought my question had been answered. So I posted it again with a better explanation of what I needed.
    Thanks for your help.
    Aaron

  • Listbox with multiple selection in interactive forms

    Hello experts.
    I'd like to use a listbox in my form with enabled multiple selection.
    The form is part of a WebDynpro ABAP Application.
    Reading the context to get the content of the form fields works fine as long as I don't use a list box where
    multiple selection is enabled.
    When I use the box I only get the values of all other fields, but not the selected values of the box.
    My context node for the pdf looks like this:
    - *Node for PDF*  (Cardinality 1..1; Selection 0..1)
    -- Attribute 1
    -- Attribute2
    -- Node for Listbox (Cardinality 0..n; Selection 0..n)
    --- Attribute for Listbox
    Please help!
    Regards
    Frank
    Edited by: Frank Mueller on Feb 6, 2008 10:31 AM

    Hi,
    is there really nobody who knows, how to give more when one selected item of a list box back to ABAP?
    Please help!
    Regards
    Frank

  • Spliting deliverables according to multiple selection and load it

    Hi ,
    There are some couple of Deliveries and I need to split them into multiple selections .Then I need to  load them based on selections to ods and cube .
    Please tell the steps to do this in BI7 Verison.

    you can create two transformation groups to splitt data. maintain rules for both groups
    or
    start routine can be used to split the data
    loop at source_package into <source_package>.
    If <check if this record should be splitted>
    wa_newdata = <source_package>.
    Modily your new line accoridingly..
    append wa_new_data to it_new_data .
    endif.
    clear wa_new_data
    endloop.
    append lines of wa_new_data to source_package.

  • Multiple selection and lead selection

    I have now multiple selection in my application via selectin mode 8. but i also want that the app reacts when i make one selection. the lead_selection argument does not work anymore with mode 8.
    Anyone nows how to manage that?

    Hi,
    u want to know the value/column name of clicked cell in ALV, am i right?
    If i'm right do below:
    1. Create a event handler with name on_click , while creating the event handler u have to specify the select the event as ON_AFTER_CONFIG (Press F4 on the Event row).
    Inside on_click u can get the value of the selected cell.
    U have WDEVENT & R_PARAM parameters.
    Using these 2 parameters u can get as ur wish.
    Reward if useful.
    Thanks,
    Router

  • DataGrid Multiple Selection and ItemClick Event

    Hi,
    Can any one help me in preventing the ItemClick event when end user tries to select multiple items in DataGrid..!
    Thanks,
    Pradeep

    There are 2 ways which will depend on your exact requirement.
           1. Use event.preventDefault() which will cancel your event to execute.
           2. If you want to make it select once then take boolean variable in itemclick and make it true on 1 item click and check in itemclick if boolean is false allow and continue what you wan to do in that event else not.
    Hope it will help you!!!

  • Mapping for multiple EJBs and databases; HOW TO?

    Hi,
    I have 2 EJBs in one EAR. Each EJB connects to a database (therefore 2 databases).
    How can I map their entities?
    e.g.
    @Entity
    @Table(name = "FINANCE")
    @NamedQueries({})
    public class Finance implements Serializable {
        private static final long serialVersionUID = 1L;
        @Id
        @GeneratedValue(strategy=GenerationType.IDENTITY)
        @Column(name = "FINANCE_ID", nullable = false)
        private Integer financeId;
        @Column(name = "FINANCE_CODE")
        private String financeCode;
        @OneToOne(cascade=CascadeType.MERGE)
        @JoinColumn(name="INDUSTRY_TYPE_ID")
        private IndustryType industryType;where IndustryType belongs to the other EJB that is connected to another database.
    Is it possible to map them both?
    When I deploy it to GlassFish, I get this error:
    @OneToOne or @ManyToOne on com.ams.ejb.finance.entity.Finance.industryType references an unknown entity: com.ams.ejb.entity.IndustryTypeEdited by: jmaddox22 on Feb 25, 2009 8:31 PM
    Edited by: jmaddox22 on Feb 25, 2009 8:32 PM

    Deauthorize all as described here:
    iTunes Store: About authorization and deauthorization

  • [svn:fx-trunk] 6476: Multiple selection and requiresSelection now work together.

    Revision: 6476
    Author:   [email protected]
    Date:     2009-05-01 14:08:56 -0700 (Fri, 01 May 2009)
    Log Message:

    IE doesn't like something about
    http://72.29.76.51/~organica/fadeslideshow.js
    Perhaps try re-uploading it.

  • Multiple users and multiple select options

    Hi,
    First of all, let me congratulate Oracle HTML DB team for this great product! This is extremely powerful and useful.
    I have multiple selection item on the form to generate report for the selected multiple schools. I have two critical questions.
    1) Currently I am deleting all records from database tables for multiples selects and similarly selecting all records from these tables to populate dependent LOVs and so on. This is a major issue when multiple people use this application at the same time. I looked at couple of examples to create, delete and select records based on IDs (unique) and it is not clear to me if I need to create parameter/hidden params on the reports side or on the HTML DB side or .. how do they communicate etc. Could any one clarify this process of checking for unique IDs please.
    2) Is there any way to give an option to the user to treat multiple selected item as just one single and to treat them separate? For example, if we let the user count number of students at two schools, how can we let the user count two schools separate as well as both schools together? This should also further ask for the possible options separate for both schools separate if they were to run separate.
    This is very important for me and appreciate any help from you. Thanks in advance.

    Hi,
    Could any one point me in the right direction, please!
    Thanks,

  • Multiple Selection Property in Single Column Listbox

    Hello All,
    I have taken a Single-column list box and have enable the multiple selection property of the listbox.
    In fact, i want to find out the values of the multiple rows selected in the listbox. But, i couldn't found any of the property of this listbox that can indicate the index or value of the multiple lines that are selected.
    Can anybody help me to resolve this issue? What is the approach i can take to find out the multiple rows selected in the listbox?
    Regards,
    Nishant

    Nishant wrote:
    Hello All,
    I have taken a Single-column list box and have enable the multiple selection property of the listbox.
    In fact, i want to find out the values of the multiple rows selected in the listbox. But, i couldn't found any of the property of this listbox that can indicate the index or value of the multiple lines that are selected.
    Can anybody help me to resolve this issue? What is the approach i can take to find out the multiple rows selected in the listbox?
    Regards,
    Nishant
    Here is an example where the value is read from a property node.
    the Value becomes an array when you elect a selection mode that allows multiple selections. (and thats the reason you can't write Selection mode while the VI is running
    Jeff
    Attachments:
    Listbox.vi ‏7 KB

  • Talent search: advanced search multiple selection

    Dear Guru's
    We have setup the TREX and are using the advanced search for talent management. Everything is working fine except if we use the multiple selection option for a field. We have definied our own search field to search for (a range of) salary scale. However if we use the multiple selection and  try to search for e.g. range 05 till 07 the engine only searches for the 05 value and not for 06 and 07. This also appears using  ESH_TEST_SEARCH and also appears within SAP fields such as organizational unit etc.
    We are on SAPBASIS SAPKB70210
                    SAPHR      SAPKE60460  
    Any suggestions ?
    Kind regards Stephan

    Hi Stephan,
    It looks like you're on 604 SP 60 but it's component EA-HRGXX that is important to check. These SAP Notes are useful to implement for the Advanced Search and do cover some of your symptoms.
    1548337 - Search: Enabling multiple selection (EHP 4)
    1550930 - Search: Various corrections for the advanced search
    1561778 - Search: Adding combination in an MV dialog box
    1561031 - Search: Various corrections for the advanced search #2
    Best regards,
    Luke

  • How do i take one layer with multiple selections...

    how do i take one layer with multiple selections and make those selections their own layer?

    Yes sir. It w was really hard to explain. It is discontiguous segments that are separated by transparent areas. And I want those non transparent areas to be on their own layer. I have a photo shop file that has a bunch of buttons on them and they are on a transparent background. It is one layer. I want to select all the buttons and put them on their own layers. I can do this manually by selecting a button and cmd Just to a new layer, but when I have 200 buttons it is a daunting task.
    Sent by MailWise<http://www.mail-wise.com/installation/4> – Your emails, with style.

  • How to use multiple selection parameters in the data model

    Hi, after have looked all the previous threads about how to use multiple selection parameters , I still have a problem;
    I'm using Oracle BI Publisher 10.1.3.3.2 and I'm tried to define more than one multiple selection parameters inside the data template;
    Inside a simple SQL queries they work perfectly....but inside the data template I have errors.
    My data template is the following (it's very simple...I am just testing how the parameters work):
    <dataTemplate name="Test" defaultPackage="bip_departments_2_parameters">
    <parameters>
    <parameter name="p_dep_2_param" include_in_output="false" datatype="character"/>
    <parameter name="p_loc_1_param" include_in_output="false" datatype="character"/>
    </parameters>
    <dataTrigger name="beforeReport" source="bip_departments_2_parameters.beforeReportTrigger"/>
    <dataQuery>
    <sqlStatement name="Q2">
    <![CDATA[
    select deptno, dname,loc
    from dept
    &p_where_clause
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_DEPT" source="Q2">
    <element name="deptno" value="deptno"/>
    <element name="dname" value="dname"/>
    <element name="loc" value="loc"/>
    </group>
    </dataStructure>
    </dataTemplate>
    The 2 parameters are based on these LOV:
    1) select distinct dname from dept (p_dep_2_param)
    2) select distinct loc from dept (p_loc_1_param)
    and both of them have checked the "Multiple selection" and "Can select all" boxes
    The package I created, in order to use the lexical refence is:
    CREATE OR REPLACE package SCOTT.bip_departments_2_parameters
    as
    p_dep_2_param varchar2(14);
    p_loc_1_param varchar2(20);
    p_where_clause varchar2(100);
    function beforereporttrigger
    return boolean;
    end bip_departments_2_parameters;
    CREATE OR REPLACE package body SCOTT.bip_departments_2_parameters
    as
    function beforereporttrigger
    return boolean
    is
    l_return boolean := true;
    begin
    if (p_dep_2_param is not null) --and (p_loc_1_param is not null)
    then
    p_where_clause := 'where (dname in (' || replace (p_dep_1_param, '''') || ') and loc in (' || replace (p_loc_1_param, '''') || '))';
    else
    p_where_clause := 'where 1=1';
    end if;
    return (l_return);
    end beforereporttrigger;
    end bip_departments_2_parameters;
    As you see, I tried to have only one p_where_clause (with more than one parameter inside)....but it doesn't work...
    Using only the first parameter (based on deptno (which is number), the p_where_clause is: p_where_clause := 'where (deptno in (' || replace (p_dep_2_param, '''') || '))';
    it works perfectly....
    Now I don't know if the problem is the datatype, but I noticed that with a single parameter (deptno is number), the lexical refence (inside the data template) works.....with a varchar parameter it doesn't work....
    So my questions are these:
    1) how can I define the p_where_clause (inside the package) with a single varchar parameter (for example, the department location name)
    2) how can I define the p_where_clause using more than one parameter (for example, the department location name and the department name) not number.
    Thanks in advance for any suggestion
    Alex

    Alex,
    the missing thing in your example is the fact, that if only one value is selected, the parameter has exact this value like BOSTON. If you choose more than one value, the parameter includes the *'*, so that it looks like *'BOSTON','NEW YORK'*. So you need to check in the package, if there's a *,* in the parameter or not. If yes there's more than one value, if not it's only one value or it's null.
    So change your package to (you need to expand your variables)
    create or replace package bip_departments_2_parameters
    as
    p_dep_2_param varchar2(1000);
    p_loc_1_param varchar2(1000);
    p_where_clause varchar2(1000);
    function beforereporttrigger
    return boolean;
    end bip_departments_2_parameters;
    create or replace package body bip_departments_2_parameters
    as
    function beforereporttrigger
    return boolean
    is
    l_return boolean := true;
    begin
    p_where_clause := ' ';
    if p_dep_2_param is not null then
    if instr(p_dep_2_param,',')>0 then
    p_where_clause := 'WHERE DNAME in ('||p_dep_2_param||')';
    else
    p_where_clause := 'WHERE DNAME = '''||p_dep_2_param||'''';
    end if;
    if p_loc_1_param is not null then
    if instr(p_loc_1_param,',')>0 then
    p_where_clause := p_where_clause || ' AND LOC IN ('||p_loc_1_param||')';
    else
    p_where_clause := p_where_clause || ' AND LOC = '''||p_loc_1_param||'''';
    end if;
    end if;
    else
    if p_loc_1_param is not null then
    if instr(p_loc_1_param,',')>0 then
    p_where_clause := p_where_clause || 'WHERE LOC in ('||p_loc_1_param||')';
    else
    p_where_clause := p_where_clause || 'WHERE LOC = '''||p_loc_1_param||'''';
    end if;
    end if;
    end if;
    return (l_return);
    end beforereporttrigger;
    end bip_departments_2_parameters;
    I've written a similar example at http://www.oracle.com/global/de/community/bip/tipps/Dynamische_Queries/index.html ... but it's in german.
    Regards
    Rainer

  • ABAP Dump when executing tcode CATS_APPR_LITE for multiple selection.

    Dear Members,
    Issue:
    When executing tcode CATS_APPR_LITE for Time Approval from the remote R/3 by selecting multiple selections and click on Approve, if you get a dump saying CALL_FUNCTION_REMOTE_ERROR
    Analysis:
    If there is an SAP Note applied in 1368487 and at CALL FUNCTION CATS_CHECK _PTEXDIR FM getting the dump because in source system for this function module Remote Enabled Module option is not checked.
    To resolve this correction note 1430042 has to be applied.
    Regards
    Durga

    Dear Members,
    Issue:
    When executing tcode CATS_APPR_LITE for Time Approval from the remote R/3 by selecting multiple selections and click on Approve, if you get a dump saying CALL_FUNCTION_REMOTE_ERROR
    Analysis:
    If there is an SAP Note applied in 1368487 and at CALL FUNCTION CATS_CHECK _PTEXDIR FM getting the dump because in source system for this function module Remote Enabled Module option is not checked.
    To resolve this correction note 1430042 has to be applied.
    Regards
    Durga

Maybe you are looking for

  • Macbook pro slow, kernel task is taking all the memory

    Hi, I'm having problems with my Macbook Pro (13-inch, Early 2011). It's been very slow lately, not only when starting but mostly all the time, even when it comes to Internet and basic tasks. I went to the activity monitor and found out this kernel_ta

  • What is this icon in the top-right corner?

    I'm running iOS 5.0.1 on an iPhone 4S and when I run iHandySoft's Quick Scan Pro application, I get an icon that I don't recognize which replaces the battery icon in the status bar. This icon looks like a box with an arrow pointing down and to the ri

  • Mapping in TopLink workbench: Sorting order for one-to-one mapping field

    Hi, we have a requirement; though it is one-to-many relationship, we wanted to map it as one-to-one, so that we get latest of the mappped entity based on attribute:*noOfVisits*. For this, I am trying to make descending order by noOfVisists in workben

  • BW report to display ME2N

    Hi All, Is there a Standard report/infoproviders which can be used to display me2n transaction - PO information. Thanks in advance. Monica.

  • SOAP/JMS using SOA Suite 11g

    Dear All Can someone give a pointer - how to expose service components using SOAP/JMS in SOA Suite 11g? I am using SOA Suite 11.1.1.5. Say we have a synchronous request-response operation - searchCustomer(SearchParam search) returns a Customer inform