Custom paint for a combo box?

Is there a document anywhere that describes all the parts you need to paint for a combo box? We have a particular need for a special presentation, but combo boxes can be rather complicated to paint all the parts correctly.
TIA!

don't know of a document, but an example of a (color) modified comboBox is here
[http://forums.sun.com/thread.jspa?forumID=57&threadID=5283094]
you just have to copy all of the code (it does run)

Similar Messages

  • Distinct dataset for selection combo box

    Hi,
    I have a dataset displayed on my page with paging and
    dependant detail region as well as filter functions. Works like a
    charm. For a visual look
    here
    My issue is this: To enable the filter with drop down select
    list (aka combo box) shown in the picture I implemented the
    following code
    var transactlist_xml = new
    Spry.Data.XMLDataSet("transactlist-xml.php",
    "export/row",{sortOnLoad:"account",sortOrderOnLoad:"ascending",useCache:false,loadInterva l:60000});
    var accounts_xml = new
    Spry.Data.XMLDataSet("transactlist-xml.php",
    "export/row/account",{sortOnLoad:"account",sortOrderOnLoad:"ascending",distinctOnLoad:tru e});
    The first dataset selects the data for the entire list, the
    second for the combo box. It works alright, but I deam it to be
    very inefficient. I have to call the php script that does the data
    selection twice, which means double the database load. Not good.
    Since I have selected all the data I need in the first statement,
    is away I can reduce the number of direct source reads and costruct
    the second dataset out of the first?
    I tried
    var accounts_xml = transactlist_xml.distinct();
    with no success, as transactist_xml has all the fields still
    included, so clearly the rows will not be distinct.
    Any suggestions/thougts?
    Any hint is appreciated.
    Hanno Schupp

    "How to Use The Focus Subsystem"
    http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html

  • Tooltip for the Combo Box

    Hi Everyone,
    Tooltip is not coming for the Combo Box in Forms 10g!! Is there any specific reason why is it not available??
    With Regards,
    Yathish

    Its bug 1879328 I would think.

  • Powershell Unique Selections for Multiple Combo Boxes

    I am currently working on a powershell script that will use 4 combo box controls. I would like for them to all use the same data source whether it be an array or just a .txt file. I would like for each selection to be unique so that no 2 combo boxes can
    have the same item selected. Is there a way to hide the item selected in the data source so the other combo boxes do not even have the option to select it and then when the user changes the item in one of the combo boxes the item is available again? 

    What I am looking do do is have a list of values (T1111,T1112,T1113,T1114) to be selected from by 4 combo boxes. Each value can only be selected once so if one combo box picks T1111 the other 3 do not have that option in its selection. So far I reload the
    combo boxes ever time a selection is made and remove the option from the array, but I was looking to see if there is a better way. As it currently stands, getting distinct values isn't working.
    Code snippet to remove item from array:
    function Get-DataSource
    $array = @("T1111", "T1112", "T1113", "T1114")
    $combo1 = $combobox1.SelectedItem.ToString()
    $combo2 = $combobox2.SelectedItem.ToString()
    $array = $array | Where-Object -FilterScript { $_ -ne $combo1 }
    $array = $array | Where-Object -FilterScript { $_ -ne $combo2 }
    return $array
    I apologize for not uploading my code.
    function OnApplicationLoad {
    #Note: This function is not called in Projects
    #Note: This function runs before the form is created
    #Note: To get the script directory in the Packager use: Split-Path $hostinvocation.MyCommand.path
    #Note: To get the console output in the Packager (Windows Mode) use: $ConsoleOutput (Type: System.Collections.ArrayList)
    #Important: Form controls cannot be accessed in this function
    #TODO: Add modules and custom code to validate the application load
    return $true #return true for success or false for failure
    function OnApplicationExit {
    #Note: This function is not called in Projects
    #Note: This function runs after the form is closed
    #TODO: Add custom code to clean up and unload modules when the application exits
    $script:ExitCode = 0 #Set the exit code for the Packager
    #endregion Application Functions;2
    # Generated Form Function
    function Call-tenet_psf {
    #region Import the Assemblies
    [void][reflection.assembly]::Load('mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
    [void][reflection.assembly]::Load('System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
    [void][reflection.assembly]::Load('System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
    [void][reflection.assembly]::Load('System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
    [void][reflection.assembly]::Load('System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
    [void][reflection.assembly]::Load('System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
    [void][reflection.assembly]::Load('System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
    [void][reflection.assembly]::Load('System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
    [void][reflection.assembly]::Load('System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
    #endregion Import Assemblies
    #region Generated Form Objects
    [System.Windows.Forms.Application]::EnableVisualStyles()
    $form1 = New-Object 'System.Windows.Forms.Form'
    $combobox2 = New-Object 'System.Windows.Forms.ComboBox'
    $combobox1 = New-Object 'System.Windows.Forms.ComboBox'
    $buttonOK = New-Object 'System.Windows.Forms.Button'
    $InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowState'
    #endregion Generated Form Objects
    # User Generated Script
    function OnApplicationLoad {
    #Note: This function is not called in Projects
    #Note: This function runs before the form is created
    #Note: To get the script directory in the Packager use: Split-Path $hostinvocation.MyCommand.path
    #Note: To get the console output in the Packager (Windows Mode) use: $ConsoleOutput (Type: System.Collections.ArrayList)
    #Important: Form controls cannot be accessed in this function
    #TODO: Add modules and custom code to validate the application load
    return $true #return true for success or false for failure
    function OnApplicationExit {
    #Note: This function is not called in Projects
    #Note: This function runs after the form is closed
    #TODO: Add custom code to clean up and unload modules when the application exits
    $script:ExitCode = 0 #Set the exit code for the Packager
    $FormEvent_Load={
    #TODO: Initialize Form Controls here
    Load-ComboBox $combobox1 (Get-DataSource)
    Load-ComboBox $combobox2 (Get-DataSource)
    function Get-DataSource
    $array = @("T1111", "T1112", "T1113", "T1114")
    $combo1 = $combobox1.SelectedItem.ToString()
    $combo2 = $combobox2.SelectedItem.ToString()
    $array = $array | Where-Object -FilterScript { $_ -ne $combo1 }
    $array = $array | Where-Object -FilterScript { $_ -ne $combo2 }
    return $array
    #region Control Helper Functions
    function Load-ComboBox
    <#
    .SYNOPSIS
    This functions helps you load items into a ComboBox.
    .DESCRIPTION
    Use this function to dynamically load items into the ComboBox control.
    .PARAMETER  ComboBox
    The ComboBox control you want to add items to.
    .PARAMETER  Items
    The object or objects you wish to load into the ComboBox's Items collection.
    .PARAMETER  DisplayMember
    Indicates the property to display for the items in this control.
    .PARAMETER  Append
    Adds the item(s) to the ComboBox without clearing the Items collection.
    .EXAMPLE
    Load-ComboBox $combobox1 "Red", "White", "Blue"
    .EXAMPLE
    Load-ComboBox $combobox1 "Red" -Append
    Load-ComboBox $combobox1 "White" -Append
    Load-ComboBox $combobox1 "Blue" -Append
    .EXAMPLE
    Load-ComboBox $combobox1 (Get-Process) "ProcessName"
    #>
    Param (
    [ValidateNotNull()]
    [Parameter(Mandatory=$true)]
    [System.Windows.Forms.ComboBox]$ComboBox,
    [ValidateNotNull()]
    [Parameter(Mandatory=$true)]
    $Items,
       [Parameter(Mandatory=$false)]
    [string]$DisplayMember,
    [switch]$Append
    if(-not $Append)
    $ComboBox.Items.Clear()
    if($Items -is [Object[]])
    $ComboBox.Items.AddRange($Items)
    elseif ($Items -is [Array])
    $ComboBox.BeginUpdate()
    foreach($obj in $Items)
    $ComboBox.Items.Add($obj)
    $ComboBox.EndUpdate()
    else
    $ComboBox.Items.Add($Items)
    $ComboBox.DisplayMember = $DisplayMember
    $combobox1_SelectedIndexChanged={
    #TODO: Place custom script here
    Load-ComboBox $combobox2 -Items (Get-DataSource)
    $combobox2_SelectedIndexChanged={
    #TODO: Place custom script here
    Load-ComboBox $combobox1 -Items (Get-DataSource)
    # --End User Generated Script--
    #region Generated Events
    $Form_StateCorrection_Load=
    #Correct the initial state of the form to prevent the .Net maximized form issue
    $form1.WindowState = $InitialFormWindowState
    $Form_Cleanup_FormClosed=
    #Remove all event handlers from the controls
    try
    $combobox2.remove_SelectedIndexChanged($combobox2_SelectedIndexChanged)
    $combobox1.remove_SelectedIndexChanged($combobox1_SelectedIndexChanged)
    $form1.remove_Load($FormEvent_Load)
    $form1.remove_Load($Form_StateCorrection_Load)
    $form1.remove_FormClosed($Form_Cleanup_FormClosed)
    catch [Exception]
    #endregion Generated Events
    #region Generated Form Code
    $form1.SuspendLayout()
    # form1
    $form1.Controls.Add($combobox2)
    $form1.Controls.Add($combobox1)
    $form1.Controls.Add($buttonOK)
    $form1.AcceptButton = $buttonOK
    $form1.ClientSize = '614, 289'
    $form1.FormBorderStyle = 'FixedDialog'
    $form1.MaximizeBox = $False
    $form1.MinimizeBox = $False
    $form1.Name = "form1"
    $form1.StartPosition = 'CenterScreen'
    $form1.Text = "Form"
    $form1.add_Load($FormEvent_Load)
    # combobox2
    $combobox2.FormattingEnabled = $True
    $combobox2.Location = '123, 92'
    $combobox2.Name = "combobox2"
    $combobox2.Size = '121, 21'
    $combobox2.TabIndex = 2
    $combobox2.add_SelectedIndexChanged($combobox2_SelectedIndexChanged)
    # combobox1
    $combobox1.FormattingEnabled = $True
    $combobox1.Location = '123, 64'
    $combobox1.Name = "combobox1"
    $combobox1.Size = '121, 21'
    $combobox1.TabIndex = 1
    $combobox1.add_SelectedIndexChanged($combobox1_SelectedIndexChanged)
    # buttonOK
    $buttonOK.Anchor = 'Bottom, Right'
    $buttonOK.DialogResult = 'OK'
    $buttonOK.Location = '140, 254'
    $buttonOK.Name = "buttonOK"
    $buttonOK.Size = '75, 23'
    $buttonOK.TabIndex = 0
    $buttonOK.Text = "&OK"
    $buttonOK.UseVisualStyleBackColor = $True
    $form1.ResumeLayout()
    #endregion Generated Form Code
    #Save the initial state of the form
    $InitialFormWindowState = $form1.WindowState
    #Init the OnLoad event to correct the initial state of the form
    $form1.add_Load($Form_StateCorrection_Load)
    #Clean up the control events
    $form1.add_FormClosed($Form_Cleanup_FormClosed)
    #Show the Form
    return $form1.ShowDialog()
    } #End Function
    #Call OnApplicationLoad to initialize
    if((OnApplicationLoad) -eq $true)
    #Call the form
    Call-tenet_psf | Out-Null
    #Perform cleanup
    OnApplicationExit

  • CUIT is not giving name property value for VB combo boxes

    Hi Everyone,
    We are testing simple Vb6 controls using CUIT. Using CUIT we can get name property value of Vb6 button control. But for simple Vb6 combo box, CUIT is not showing name property value.
    I want to add CUIT assertion for combo box name property value. how can I add ?
    For more details please see the image
    Regards,
    Rajendar..

    Hi Rajendar,
    Do you record a coded UI test with the coded UI test builder? If so, which item did you record?
    >>How can I get combobox.SelectedItem without identifying combo box?
    It doesn't mean that we don't identify the control. Generally we use the unique property as the search property to find/capture the control.
    Like this blog here:
    http://blogs.msdn.com/b/visualstudioalm/archive/2012/02/01/guidelines-on-improving-performance-of-coded-ui-test-playback.aspx
    SelectedItems versus
    SelectedIndices property
    For large number of items, it is preferable to use SelectedItems. SelectedIndices essentially does an Instance search internally, which is slower compared to unique automation property based search. Use SelectedIndices only when
    the items don’t have unique Automation properties. And of course exercise caution over changes to the list content.
    I think you could get a useful sample here:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/a32bc4a6-f562-436d-96a4-a3409b1b3e73/codedui-and-combobox-i-want-to-go-to-the-next-nonselected-item-in-combobox?forum=vstest
    Best Regards,
    Jack
    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.

  • Need guidance for a Combo Box and Keystoke/Validate script

    Hello,
    My goal is to have a combo box selection trigger and enter a value into a text field however the text field needs to be editable.  I want the combo box to determine a default value but changeable by the user if necessary.  Here is the script, I just don't know where to put it.
    if (!event.willCommit) {
    var M1Month = this.getField("Month 1 Pulldown").value; var M1Exp = this.getField("M1 Exp");
    if(M1Month == "January") {M1Exp.value = "1/31/10"};
    if(M1Month == "February") {M1Exp.value = "2/28/10"};
    if(M1Month == "March") {M1Exp.value = "3/31/10"};
    if(M1Month == "April") {M1Exp.value = "4/30/10"};
    if(M1Month == "May") {M1Exp.value = "5/31/10"};
    if(M1Month == "June") {M1Exp.value = "6/30/10"};
    if(M1Month == "July") {M1Exp.value = "7/31/10"};
    if(M1Month == "August") {M1Exp.value = "8/31/10"};
    if(M1Month == "September") {M1Exp.value = "9/30/10"};
    if(M1Month == "October") {M1Exp.value = "10/31/10"};
    if(M1Month == "November") {M1Exp.value = "11/30/10"};
    if(M1Month == "December") {M1Exp.value = "12/31/10"};
    if(M1Month == " ") {M1Exp.value = ""};

    I did not say to take out the line. You need to replace the "" (a null string),  with " " (a space).
    But I would look at using the 'switch' statement that allows for a series of logical test and if none of those specific test has been passed takes a default action.
    You need to put the script in the 'Custom keystroke script'.
    if (!event.willCommit) {
    var M1Exp = this.getField("M1 Exp");
    if(event.changeEx == "January") {
    M1Exp.value = "1/31/10";
    } else if(event.changeEx == "February") {
    M1Exp.value = "2/28/10";
    } else if(event.changeEx == "March") {
    M1Exp.value = "3/31/10";
    } else if(event.changeEx == "April") {
    M1Exp.value = "4/30/10";
    } else if(event.changeEx == "May") {
    M1Exp.value = "5/31/10";
    } else if(event.changeEx == "June") {
    M1Exp.value = "6/30/10";
    }else if(event.changeEx == "July") {
    M1Exp.value = "7/31/10";
    } else if(event.changeEx == "August") {
    M1Exp.value = "8/31/10";
    } else if(event.changeEx == "September") {
    M1Exp.value = "9/30/10";
    }else if(event.changeEx == "October") {
    M1Exp.value = "10/31/10";
    }else if(event.changeEx == "November") {
    M1Exp.value = "11/30/10";
    }else if(event.changeEx == "December") {
    M1Exp.value = "12/31/10";
    }else{
    // all other selections
    M1Exp.value = "";
    } // end not will commit
    You will also need to use the 'event' object's 'changeEx' property.
    If you do not need the selected text, by setting the export value to the expiration date your script could be:
    if (!event.willCommit) {
    this.getField("M1 Exp").value = event.changeEx;

  • Input Controls - is it possible to change the font for a combo box

    I have an input Control combo box that is a mixture of english/chinese characters. In Webi I can view the chinese characters correctly if I change the font to MingLIU. Is it possible to change the font for an input control OR to set a default font?

    I am a first-time user of the photo book application in iPhoto.
    I also was a first-time user, so I started using it. Exploring the possibilities, learning my way around.
    Thanks, in advance, for any suggestions someone might have.
    Click the ? icon
    Oops. Sorry, but you're in the wrong forum : iLife > iPhoto

  • Unchecking "Allow Undefined Strings" for System Combo Box Doesn't Work

    Why will my system combo box still allow undefined strings even after unchecking "Allow Undefined Strings"?
    The combo box works nicely because it allows the user to start typing in the string they want and the combo box will finish it off for them, but if you hit delete or change a letter turning it into an undefined string, the combo box will accept it.
    Edit: I'm using LV 8.5
    Message Edited by Sima on 01-14-2009 07:03 PM
    Message Edited by Sima on 01-14-2009 07:04 PM
    Attachments:
    systemcombobox.vi ‏8 KB

    I don't see the issue with Delete, but Backspace causes what I think you're seeing.  If I type "a" into your example combo box, it autocompletes the "re" in the word "are".  If I hit delete, nothing happens.  If I type other characters, nothing happens.  But, if I hit backspace, then the "re" disappears, leaving just "a".  If I click outside the combo box, the a is left, and a string indicator picks this up.  Thus, the combo box has allowed an undefined string.
    Ouch.  A little help from NI, please?
    Maybe this is what "festo" was seeing here:
    http://forums.ni.com/ni/board/message?board.id=170&requireLogin=False&thread.id=114297
    (no offense intended I figured you were just slowing your code down... but thought it was an opportunity to stop others from starting bad habits with Next Multiple.)
    Certified LabVIEW Architect
    Wait for Flag / Set Flag
    Separate Views from Implementation for Strict Type Defs

  • Populate 2nd combo box based on value selected in 1st combo box

    I am still using Acrobat 6 though I may be upgrading soon to Acrobat 8. I have a form with two combo boxes, the first "state" has values of MN and WI. Based on which value the user picks I would like to populate a "county" combo box with lists of counties that we deal with.
    Thanks,
    Gene

    One can set the option and export value using an arry:<br /><br />// document level script<br />// Master List of Lists <br />// Each entry in this object listeral is the name of a State <br />//Manually enter the State Names into the state field combo box <br />// The associated value is the item list, where each item is a name value pair, [<County> and [county code, zip code]] <br /><br />// state: ["county name", ["county code", "zip code"]]<br />var oStateNames = {MN: [["-", ["", ""] ], <br />                       ["St. Louis", ["MNStl", "55001"] ], <br />                       ["Carlton", ["MNSCrl", "55002"] ], <br />                       ["Pine", ["MNPin", "55003"] ],<br />                       ["Cook", ["MNCok", "55004"] ] <br />                       ], <br />                   WI: [["-", [" ", " "] ],<br />                        ["Douglas", ["WIDou", "55005"] ] ,<br />                        ["Bayfield", ["WIBay", "55006"] ],<br />                        ["Burnette", ["WIBur", "55007"] ],<br />                        ["Ashland", ["WIAsh", "55008"] ]<br />                       ]<br />                     }; <br /><br />//SetCountyEntries() on keystroke entry in state field <br />function SetCountyEntries() <br />{ <br />   if(event.willCommit) <br />   { <br />      // Get the new counties list from the Master List <br />      // Since the selection is being committed, <br />      // event.value contains the State name <br />      var lst = oStateNames[event.value]; <br />      // Clear the county list if there are no counties for the selected state <br />      this.getField("ee.address.county").clearItems();<br />      this.resetForm(["ee.address.code", "ee.address.zip"]);<br />      if( (lst != null) && (lst.length > 0) )<br />           this.getField("ee.address.county").setItems(lst); // set opiton and export value<br />   } <br />} <br />//  end document level script<br /><br />For the combo box "ee.address.county" one can create an array from the export value to populate the county code and zip code<br /><br />// custom keystroke for county combo box<br />if(event.willCommit & event.value != "") {<br />// split county and zip codes<br />var aCodes = this.getField(event.target.name).value.split(",");<br />this.getField("ee.address.code").value = aCodes[0];<br />this.getField("ee.address.zip").value = aCodes[1];<br />}<br />// end custom key stroke code

  • Combo box background

    I have created a custom UI for my combo box but I have set its opaque property to false. The reason for this is that I have created my own arrow button image which requires transparancy between itself and the renderer. I need the listbox/label to have a white background but I have been unsuccessful in setting it as such. How can I have an translucent combo box yet have a white list/label?

    Hi;
    This isn't something FormsCentral supports.
    Thanks,
    Josh

  • I need a combo box with 4 values to choose from which will populate a text box on the form with text related to each combo box selection

    For example:
    Combo box choices:
    apple
    tomato
    squash
    Pumpkin
    The text box depending on the selection above would state the color:
    Green        (if Apple was chosen from the combo box
    Red           (if Tomato was chosen from the combo box
    Yellow       (if Squash was chosen from the combo box
    Orange      (if Pumpkin was chosen from the combo box
    I am very new at this and have spent hours looking for an answer.  Thank to anyone in advance who can help!

    Place each value as the export value of the options in the combo-box and then use this code as the text field's custom calculation script:
    event.value = this.getField("ComboBox Name").value;

  • Report error when using combo box and one text field is empty

    I'm building an interactive pdf in adobe pro 9. My problem is the following: I have one text field where you can enter a numeric code and that is used to populate another text field when I choose an option on one combo box.For example: suppose I write the code 123 in the text field "A" and that the combo box has two options ("data" and "-"). When I select "-", another text field "B" is empty, while when I select "data" i populate the text field "B" using the code entered "A" with the text "data_123". In order to do this I use the standard javascript code in the Format>Custom tab of the combo-box.
    My questions are:
    - how can I prevent the pdf to proceed selecting an option in the combo box when the field "A" is empty?
    - how can I update the field "B" every time that I change the text in "A"? I found that the text is "B" is updated only when I press the selection in the combo box.

    You can set the combo box to read-only in the Validate event of the A field:
    // Validate script for text field
    getField("combo1").readonly = !event.value;
    To update the value of B when A changes, you can expand the script above to something like:
    // Validate script for text field
    var f1 = getField("combo1");
    var f2 = getField("B");
    // If there is an entry in the A field...
    if (event.value) {
        f1.readonly = false;  // Make sure the combo box is activated
        f2.value = f1.value === "-" ? "" : "fa.value + event.value;  // Update the value of field B
    } else {
        f1.readonly = true;  // Deactivate the combo box
        f2.value = f2.defaultValue;  // Reset field B
    You might also want to reset the combo box somewhere in there, but it's not clear to me when you would want to do that.

  • Combo Box Calculation

    I'm trying to make a custom calculation Javascript for a combo box and can't figure out the calculation.
    There are a few variables at play. I would like to incorporate a sliding scale for a student's high school gpa that looks like this:
    Students GPA:          SAT Score                   ACT Score
    2.00                          1010                            86
    2.025                        1000                            85
    Students GPA=Combo Box1
    Combo Box2=(If GPA=2.022, event.value=1010/86)
    Combo Box2=(If GPA=2.028, event value=1000/85)
    and so on (the scale continues on up to GPA=3.525
    How would I calculate that?
    Thanks for your help

    Acrobat Scripting Forum http://forums.adobe.com/community/acrobat/acrobat_scripting

  • Trying to get export value from combo box

    Using the "Custom Keystroke Script" for a combo box:
    // This works but gives the current face value
    if( event.willCommit )
        app.alert(event.value);
    // This works but gives the previous export value
    if( event.willCommit )
        app.alert(event.target.value);
    What I need is the clicked items' current export value as soon as it is clicked.
    What am I doing wrong?

    Sorry about that. I posted the question and then realized I should have just used the same thread.
    Any way, I tried your code and it does not show the current export value. It shows the previously selected value.
    Example:
    When I click item 2 it shows item 0
    Then I click item 4 and it shows item 2
    Then I click item 7 and it shows item 4.. etc.. (see the pattern)
    What I need is the value from the item I'm currently clicking on.
    If I click item 2, I expect to see item 2. etc..
    Thank you for your patience in answering this!

  • How to populate data in the data table on combo box change event

    hi
    i am deepak .
    i am very new to JSF.
    my problem is i want to populate data in the datatable on the combo box change event.
    for example ---
    combo box has name of the city. when i will select a city
    the details of the city should populate in the datatable. and if i will select another city then the datatable should change accordingly..
    its urgent
    reply as soon as possible
    thanks in advance

    i am using Rational Application Developer to develop my application.
    i am using a combo box and i am assigning cityName from the SDO.
    and i am declaring a variable in the pageCode eg.
    private String cityName;
    public void setCityName(String cityName){
    this.cityName = cityName;
    public String getCityName(){
    return cityName;
    <h:selectOneMenu id="menu1" styleClass="selectOneMenu" value="#{pc_Test1.loginID}" valueChangeListener="#{pc_Test1.handleMenu1ValueChange}">
                        <f:selectItems
                             value="#{selectitems.pc_Test1.usercombo.LOGINID.LOGINID.toArray}" />
                   </h:selectOneMenu>
                   <hx:behavior event="onchange" target="menu1" behaviorAction="get"
                        targetAction="box1"></hx:behavior>
    and also i am declaring a requestParam type variable named city;
    and at the onChangeEvent i am writing the code
    public void handleMenu1ValueChange(ValueChangeEvent valueChangedEvent) {
    FacesContext context = FacesContext.getCurrentInstance();
    Map requestScope = ext.getApplication().createValueBinding("#{requestScope}").getValue(context);
    requestScope.put("login",(String)valueChangedEvent.getNewValue());
    and also i am creating another SDO which is used to populate data in datatable and in this SDO in the where clause i am using that requestParam .
    it is assigning value in the pageCode variable and in the requestParam but it is not populating the dataTable. i don't no why??
    it is possible that i may not clear at this point.
    please send me the way how my problem can be solved.
    thanks in advance

Maybe you are looking for