Adding '-Select-' on top for a drop down box

Hello,
I have a drop down box mapped to a field in the context, the field has some domain values and are populated in the run time. but I have to add another top row '-Select-' indicating to the client that the field need to be selected.
To add 'Select', I can write a method in the WDDOINIT method of the controller and also loop through the domain values and append to the drop down box. But I don't want to do too much of d/b interaction, as the fields are anyway loaded to the dropbox by mapping.
Is there a way in web dynpro, that we could do like in normal ABAP reports, to Loop at the screen and identify all the drop down boxes and add a 'select' row at the top?
I really appreciate any help.
Thank you
KV.

Hi Kiran,
Can you make your requirement more clear to me?
As much I understand from your message is that you want to add a dynamic Text on the top of Dropdown.Like Select the field need to be selected.
from where you will get this field information?
what message you want to add?
If you have the field information then
(a)Create a textView on the top of Dropdown
(b) Bind it's property "Text" to the context attribute say Text .
(c) now set this value like
wdcontext.currentcontextelement().setText("Select "+field);
If this is not the right interpretation of your problem then please explain it in detail and tell me step by step what you want to do?
Regards,
Praveen

Similar Messages

  • How to get ALL values as default for  a drop down box in JSF

    Hi,
    I have a drop down box in JSF page which retrieves values from LOVCache.java. I have values like Company, Client, User, ALL in the drop down box.
    By default blank value is selected for the drop down box. I want to make ALL(which retrieves data for all the values) as default value for the drop down box.
    Could any body help me? Any help must be appreciated.
    Thanks,
    Aseet

    Thanks Nikhil. But I am fetching the values from the LOVCache.java.
    I am using <af:selectManyChoice>. Is there any way I can use LOVCache.java value for selecting default values instead of hard coding?
    I mean to say can I write
    unselectedLabel="#{LOVCache.entityTypeSelectionList.anyValue}"
    where LOVCache.entityTypeSelectionList is used to populate the drop down box.
    Regards,
    Aseet

  • Multiple select options in 1 drop down box?

    Hi,
    I have created a form that works perfectly except for the fact that I need to provide multiple select options in the 1 drop down box; for example, I'm asking what product the customer is interested in and his answer could be multiple items such as Soap, Sanitizer, Hand Towels, Face Cloths etc...
    At the moment, the customer can only select 1 item not multiple.
    Is this possible?
    Thanks in advance for the help!

    Hi,
    It is not possible to allow the user to select multiple items in a dropdown list.
    You could use a list box, which does allow multiple selections.
    Good luck,
    Niall
    Assure Dynamics

  • How do I set a "force-fill" to a drop-down box?

    How do I require the drop-down boxes to be filled prior to submitting?  I already have the "required" box checked.  I'm guessing that maybe why the required is not working is due to the blank I have at the top of the list.  I did that so upon opening the document the boxes appear blank & need a selection entered.  This is what it looks like when I remove the blank.

    Thanks for replying.  Although, I may need a “dumbed” down version of your response…Let me see if I understand correctly.  I cannot require a recipient to select an option in a drop down box.  Or is that only the case if I have a blank within the list?  I’m fairly new to the Adobe Forms (read: no formal training…just bumbling along on my own), so I have no idea what setting the property to true means or how to do custom scripting.
    Respectfully,
    Michelle Wessels
    Probation Education
    Education Services Division
    Arizona Supreme Court
    Administrative Office of the Courts (AOC)
    (602) 452-3010 * (602) 452-3004 Fax
    [email protected]<mailto:[email protected]>
    cid:[email protected]
    Main AOC Mailing address:  1501 W. Washington * Phoenix, AZ  85007
    Judicial Education Center/Office Location Address:  541 E. Van Buren, Suite B4 * Phoenix, AZ 85004

  • How do i change the backgrond color of a drop down box.

    I'm creating a form which has a colored background and a drop down box with 5 choices.  The problem is the font color in the drop down box is white and so is the background color of the drop down box so the selections are not visible unless you scroll over them.  I would like the background of the drop down box to match the background of the form. 
    Also, can the font size of a selection in a drop down box be different then what is displayed.  The font is set to 35 so it's huge when displayed in the drop down box.  It would be nice if the selections were displayed in the drop down box in size 10 font but displayed on the form once selected as size 35.
    Thanks!
    Mike

    You can set the background colour with (in formcalc):
    $.fillColor = "5,5,5" // obviously changing the numbers to the RGB colour you want
    or if it is not going to change just set it in Border tab under Background fill.
    For the size of the font - set the dropdown box to size 10 font and then in the exit event of the dropdown list put (in formcalc):
    $.font.size = "35pt"

  • Getting the value from a Drop Down Box

    I'm working on a database project to keep track of our Blackberrys. The problem I'm having is entering the values for two drop down boxes. The page I'm working on enters the FirstName, LastName, Department, and Location. Department and Location have thier own Primary Keys and are foreign keys in the Person table. Departments and Locations are aligned by numbers like 1 = Ohio, 2 = Chicago. They
    don't automatically increase. The problem I'm having is entering them as a foreign key in the Person Table. I'm not sure if I use a getValue or getSelected or some other code to get the values to populate in the Person Table. I just keep getting a can't add department or location to table.
    public String newUser_action() {
    // TODO: Process the button click action. Return value is a navigation
    // case name where null will return to the same page.
    if (personDataProvider.canAppendRow()) {
    try {
    RowKey rowKey =
    personDataProvider.appendRow();
    personDataProvider.setValue(
    "DBO.PERSON.FIRSTNAME", rowKey,
    firstName.getText());
    personDataProvider.setValue(
    "DBO.PERSON.LASTNAME", rowKey,
    lastName.getText());
    personDataProvider.setValue(
    "DBO.PERSON.DEPTID", rowKey,
    department.getSelected());
    personDataProvider.setValue(
    "DBO.PERSON.LOCATIONID", rowKey,
    location.getSelected());
    personDataProvider.setValue(
    "DBO.PERSON.BEGINDATE", rowKey,
    newDate.getText());
    //personDataProvider.setValue(
    "DBO.PERSONDEVICE.AQUIREDATE", rowKey,
    newDate.getText());
    personDataProvider.commitChanges();
    info("New User " + newUser.getText() +
    " added to USER table");
    newUser.setText(null);
    } catch (Exception e) {
    log("Cannot add new User ", e);
    error("Cannot add new User: " +
    e.getMessage());
    } else {
    log("Cannot append new User");
    error("Cannot append new User");
    return null;
    }

    Sun's databound components tutorial may prove helpful to you.

  • "iOS Photos" album missing from Facebook drop down box

    I have an iPhone 5S running iOS 7.0.4. I want to post a Photo from the Camera Roll to Facebook. I tap on a Photo in Camera Roll and choose FaceBook. The Album field defaults to one of my existing Albums at the top of the list. When I scrool down through the list the iOS Photos album doesn't appear. Therefore any photo I upload via the Photo App appears on Facebook under a specific Album not Mobile Photos or iOS Photos. How do I get iOS Photos to appear at the top of the drop down box?
    Many Thanks!

    Is remember passwords still enabled?
    *Tools > Options > Security: Passwords: "Remember passwords for sites"
    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • Drop Down box in VC dashboard

    Hi All,
    We need to achieve the below functionality for the drop down box in VC dashboard. Can you please help us to achieve that?
    There is a drop down and a table dependant on that drop down.
    We want to have a field as u201CALL COUNTRIESu201D included in the existing list of the drop down values. So the drop down should have values,
    u201CALL COUNTRIESu201D, u201CUSu201D,u201DARu201D,u201DGEu201D,u201DUKu201Du2026u2026.etc
    Whenever user selects u201CALL COUNTRIESu201D the table below that should display data for all the values.
    Thanks & Regards,
    Pallavi

    Try this:
    1. The bapi should receive "country" parameter and return data relevant for passed country; if passed country is null or zero (or some other key you declare) it will return all data.
    2. Another bapi should return list of countries.
    3. Create the dynamic dropdown with "list of countries" bapi and add value "all countries" with empty key or zero (you can do this in properties of dropdown)
    4.On action of dropdown call the first bapi that returns data to the table and map passed country parameter .
    You can create dropdown with static values without "list of countries" bapi but care about countries keys that should be known in the first bapi.
    Ola

  • Standalone Interactive Forms without ABAP Dynpro and Drop down boxes

    Friends,
    I need to create Adobe interactive form with drop down boxes. I have 2 questions:
    1) do i need to use abap dynpro to display the form or can i display the form using print program
    2) for using drop down box, should i use the one from standard library or Web Dynpro ActiveX or Web Dynpro Native library
    Points will be rewarded for helpful answers.
    Thanks.

    Hi,
    Its not necessary to have ABAP web Dynpro to create and display adobe forms. You can display it in programs in ABAP. Go to following link to know more:
    [https://www.sdn.sap.com/irj/sdn/adobe#section39]
    There is a sample application for Adobe form in ABAP and lot more.
    You can use web dynpro Native dropdown list.
    Hope it will help you.
    Regards,
    Vaibhav Tiwari.

  • Drop Down Box for Date Range Selection

    I have multiple queries on the same worksheet with different variables for each.  To simplify changing the one consistent variable, the date range, I have added a drop down box tied to all infoproviders in the query.  This would work if I wanted to select a single date but I cannot determiine how to select a date range (01/2010 - 12/2010).  Any ideas on how I might accomplish this?  I am using Netweaver 7.1.

    You can use two single-input variables: one for DATE FROM and the other for DATE TO and use them in query definition to restrict the date (restriction type: Range between DATE FROM and DATE TO).
    Then you create two dropdown boxes, one for each variable.
    Regards,
    Dorota

  • What is forwarded when " as in-line text" is selected in the drop-down box for forwarding a message. i.e. are attachments forwarded?

    What is forwarded when " as in-line text" is selected in the drop-down box for forwarding a message. i.e. are attachments forwarded with the message or not?

    Some websites require a special client certficate for access. If you don't have that certficate, you'll have to contact the site operator to find out how to get one.
    Sometimes the problem is caused by a web server that is configured to request an optional client certificate. Safari treats the request as mandatory. In that case, other browsers such as Firefox and Chrome may be able to connect to the site, because they ignore the request.
    The first time you were prompted for a certificate, you may have clicked through a dialog that requested access to the Apple certificate in your keychain that is used to secure the iMessage service. In that case, you may be able to regain access to the site in Safari by doing as follows.
    Back up all data.
    Double-click anywhere in the line below on this page to select it:
    com.apple.idms.appleid.prd
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the Keychain Access application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Keychain Access in the icon grid.
    Paste into the search field in the Keychain Access window by clicking in it and pressing the key combination command-V. An item may appear in the list of keychain items. The Name will begin with string you searched for, and the Kind will be "certificate."
    Delete the item by selecting it and pressing the delete key. It will be recreated automatically the next time you launch the Messages or FaceTime application.
    The next time you visit a site that prompts for an optional client certificate, cancel out of the prompt. You may have to do this several times before the server stops asking.
    Credit for this idea to Christian Braukmueller of SAP.

  • OnSelect event for a Drop down UI Element in Webdynpro ABAP Select Options

    Hi Experts
    We have built our UI based on the webdynpro ABAP Select Options. We have a requirement that, when we change the value of a drop down box in the UI, I need to hide some fields. Can anybody help me out in handling of OnSelect event of a drop down box built using webdynpro ABAP Select Options. We are on SAP Netweaver 7.0 EHP1.
    Rrgards,
    Srikanth.
    Edited by: Srikanth Kancherla on Apr 29, 2010 10:43 PM

    Hi Srikanth,
    as you seem to be already aware, the component is dynamically built.
    so you would have to enhance the code that builds the element and insert a reference to a new action (enhancement) that could handle the onSelect event.
    What is it about this that you particularly want help with?
    Cheers,
    Chris

  • How to get the selected value/key of a drop down list box in webdynpro Java

    Dear SDN Members,
    I have added some static data into a drop down list box by key UI element using the procedure specified in value help tutorial.
    Now i want to display the value selected in a dropdown list box on view whenever i select an item in a dropdown list box.
    Can any one put here the code part relating to this.
    Your help will be awarded.
    Thanks in advance,
    Regards,
    Sireesha.B

    Hi Sireesha,
        You want to display value based on the key selected in dropdown list. If you want to do like that
    1) Create a context attribute for ex: key_value
    2)In the properties of the attribute select the calculated as true.
    3)It will create getter and setter methods for your attribute.
    4)Go to implementation add the following code in getter method of your attribute
    String attributeName = IPrivateCreate.IContextElement.KEY;
    //KEY is your dropdown key attribute not the value attribute.
    IWDAttributeInfo attributeInfo = element.node().getNodeInfo().getAttribute(attributeName);
    ISimpleTypeModifiable simpleType = attributeInfo.getModifiableSimpleType();
    IModifiableSimpleValueSet valueset = simpleType.getSVServices().getModifiableSimpleValueSet();
    Object key = element.getAttributeAsText(attributeName);
    return valueset.getText(key);
    Regards
    Suresh

  • Work around / fix for making a list of drop down boxes

    Dear experts,
    When lists are created, its cells act like top-level views. Because of this, everything attempting to go past the border of the list item is clipped. This is a problem when making a list of drop down boxes. Is there a known work around for this or maybe a fix?
    Regards,
    Olivier

    thank you saish, moving 'the artists are' helps visually, as for the fix, i really needed to store it in an arrayList, resultSets aren't very happy about being manipulated!
    here's the fix:
    writer.println("<select name=\"userList\" size=\"1\">");
    ArrayList a = new ArrayList();
    ResultSet r=null;
    // this is just my way of accessing the database and the correct method with the artist names in it
    r = factory.getCustomersDAO().get_Artist_Names_Only();
    while(r.next())
    // retrieve artist names as String variables
    String artist = r.getString("artist_name");
    // add to ArrayList
    a.add(artist);
    for(int i=0; i<a.size(); i++)
    Object art = a.get(i);
    art = (String)art;
    writer.println("<OPTION VALUE=\"" +art+ "\">" art "</OPTION>");
    writer.println("<tr><td colspan = \"2\"><h2>Enter Artist Name to be booked: </h2></tr></td>");
    writer.println("</SELECT></TD></TR>");
    thanks again, i've got another problem now that i'm just about to post about, how to register when one particular cell in a html table has had its link clicked!
    jenxx

  • Need help in this select drop down box

    Hi i had a drop down box written with select and i had many options , when user selects the option it will insert this to database and when user goes to the edit form the preselected value has to be populate automatically in dropdown , but the last option is populating everytime when uses edit form.
    below is the code:
    insert page:
                <select name="council" id="council" name="Please select Council from dropdown box">
                    <option  value="Division">Division</option>
                    <option  value="Facility">Facility</option>
                    <option  value="District D">District D </option>
                    <option  value="District E">District E </option>
                    <option  value="District J">District J </option>
                    <option  value="District K">District K </option>
                    <option  value="District L">District L </option>
                    <option  value="District M">District M </option>
                    <option  value="District N">District N </option>
                    <option  value="District O">District O </option>
                    <option  value="District Q">District Q </option>
                    <option  value="District S">District S </option>   
                    <option  value="District T">District T </option>
                    <!--- Below code  is added just for temporary case ,for this drop down we need to pull all these data from databse--->
                    <option  value="D 506">D 506</option>                                            
                    <option  value="D 524">D 524</option>
                    <option  value="D 525">D 525</option>
                    <option  value="D 530">D 530</option>
                    <option  value="D 531">D 531</option>
                    <option  value="D 536">D 536</option>
                    <option  value="D 549">D 549</option>
                    <option  value="D 558">D 558</option>
                    <option  value="D 562">D 562</option>
                    <option  value="D 581">D 581</option>
                    <option  value="D 583">D 583</option>
                    <option  value="D 597">D 597</option>
                    <option  value="D 598">D 598</option>
                    <option  value="D 599">D 599</option>
                    <option  value="D 628">D 628</option>
                    <option  value="D 686">D 686</option>
                    <option  value="D 698">D 698</option>
                    <option  value="D 848">D 848</option>
                    <option  value="D 862">D 862</option>
                    <option  value="D 870">D 870</option></select>
    this is edit page code:
                       <select name="council" id="council">               
                   <cfoutput query="getdata">               
                    <option  value="Division" <cfif council IS "#getdata.council#"> selected</cfif>>Division</option>
                    <option  value="Facility" <cfif council IS "#getdata.council#"> selected</cfif>>Facility</option>
                    <option  value="District D" <cfif council IS "#getdata.council#"> selected</cfif>>District D </option>
                    <option  value="District E" <cfif council IS "#getdata.council#"> selected</cfif>>District E </option>
                    <option  value="District J" <cfif council IS "#getdata.council#"> selected</cfif>>District J </option>
                    <option  value="District K" <cfif council IS "#getdata.council#"> selected</cfif>>District K </option>
                    <option  value="District L" <cfif council IS "#getdata.council#"> selected</cfif>>District L </option>
                    <option  value="District M" <cfif council IS "#getdata.council#"> selected</cfif>>District M </option>
                    <option  value="District N" <cfif council IS "#getdata.council#"> selected</cfif>>District N </option>
                    <option  value="District O" <cfif council IS "#getdata.council#"> selected</cfif>>District O </option>
                    <option  value="District Q" <cfif council IS "#getdata.council#"> selected</cfif>>District Q </option>
                    <option  value="District S" <cfif council IS "#getdata.council#"> selected</cfif>>District S </option>   
                    <option  value="District T" <cfif council IS "#getdata.council#"> selected</cfif>>District T </option>                   
                    <option  value="D 506" <cfif council IS "#getdata.council#"> selected</cfif>>D 506</option>                                            
                    <option  value="D 524" <cfif council IS "#getdata.council#"> selected</cfif>>D 524</option>
                    <option  value="D 525" <cfif council IS "#getdata.council#"> selected</cfif>>D 525</option>
                    <option  value="D 530" <cfif council IS "#getdata.council#"> selected</cfif>>D 530</option>
                    <option  value="D 531" <cfif council IS "#getdata.council#"> selected</cfif>>D 531</option>
                    <option  value="D 536" <cfif council IS "#getdata.council#"> selected</cfif>>D 536</option>
                    <option  value="D 549" <cfif council IS "#getdata.council#"> selected</cfif>>D 549</option>
                    <option  value="D 558" <cfif council IS "#getdata.council#"> selected</cfif>>D 558</option>
                    <option  value="D 562" <cfif council IS "#getdata.council#"> selected</cfif>>D 562</option>
                    <option  value="D 581" <cfif council IS "#getdata.council#"> selected</cfif>>D 581</option>
                    <option  value="D 583" <cfif council IS "#getdata.council#"> selected</cfif>>D 583</option>
                    <option  value="D 597" <cfif council IS "#getdata.council#"> selected</cfif>>D 597</option>
                    <option  value="D 598" <cfif council IS "#getdata.council#"> selected</cfif>>D 598</option>
                    <option  value="D 599" <cfif council IS "#getdata.council#"> selected</cfif>>D 599</option>
                    <option  value="D 628" <cfif council IS "#getdata.council#"> selected</cfif>>D 628</option>
                    <option  value="D 686" <cfif council IS "#getdata.council#"> selected</cfif>>D 686</option>
                    <option  value="D 698" <cfif council IS "#getdata.council#"> selected</cfif>>D 698</option>
                    <option  value="D 848" <cfif council IS "#getdata.council#"> selected</cfif>>D 848</option>
                    <option  value="D 862" <cfif council IS "#getdata.council#"> selected</cfif>>D 862</option>
                    <option  value="D 870" <cfif council IS "#getdata.council#"> selected</cfif>>D 870</option>
    </cfoutput>               
                </select>
    i dont know where i am making mistake and i observered one behavoir that if i have less options it is working but not with many why like that , please help me in this
    Thanks

    Seems to me your conditionals should look something like this:
    <option value="Division"<cfif getData.council is "Division"> selected="selected"</cfif>>Division</option>
    <option value="Facility"<cfif getData.council is "Facility"> selected="selected"</cfif>>Facility</option>
    Your condition is the same for every option, and would likely never evaluate to true:
    <cfif council IS "#getdata.council#"> selected</cfif>
    getData.council will be "Division" or "Facility" or "District D" or ...
    ... but it would never be "council".
    HTH.
    Charlie

Maybe you are looking for