Skip to Content
0
Former Member
Nov 09, 2005 at 02:38 PM

Dropdown listBox Problem

82 Views

Hi ALL,

I have two Dropdownlist boxes with Year and Month.Month dropdown has list of all months and Years start from 1990 .If i select particular month and year it has to display that months emp report.Suppose if i select month Nov and Year 2005 it is displaying that months report but the values in dropdown list boxes are displaying as Jan,1990 which are starting values in both boxes instead of displaying Nov,2005.I am posting my code .I appreciate all helps.

JSP

<hbj:dropdownListBox

id="myListBox"

tooltip="Month"

model="myBean.ListBoxmodel"

selection="<%=myBean.getDrpSelection() %>"

disabled="false"

nameOfKeyColumn="KeyCol"

nameOfValueColumn="KeyVal"

onSelect="Select"

width="100px" >

</hbj:dropdownListBox>

<hbj:dropdownListBox

id="myListBoxYear"

tooltip="Year"

model="myBean.ListBoxmodel1"

selection="<%=myBean.getDrpSelectionYear() %>"

disabled="false"

nameOfKeyColumn="KeyCol"

nameOfValueColumn="KeyVal"

onSelect="Select"

width="100px" >

</hbj:dropdownListBox>

Bean

public String drpSelection;

public String drpSelectionYear;

public void setDrpSelection(String string) {

drpSelection = string;

}

public void setDrpSelectionYear(String string) {

drpSelectionYear = string;

}

JSPDynpage

public void onSelect(Event event) throws PageException {

lb = (DropdownListBox) this.getComponentByName("myListBox");

lbYear = (DropdownListBox) this.getComponentByName("myListBoxYear");

selection = lb.getSelection();

selectionYear = lbYear.getSelection();

this.getData();

}

Thanks in advance