dcsimg
how to create combobox bean to display more than one columns
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   john_feng
Posted On:   Tuesday, April 2, 2002 04:00 AM

I need kind help with the following question. As the combobox includes two pieces--textbox and the combobox list. Then how to create a combo box bean, which is based on table EMP(empno number(6), ename varchar2(40)) records for example, to achieve these features: 1) allow more than one columns to be displayed in its records list--e.g., I need to show these records: empno (value) ename (label) David M Baker 103 David M Baker 104 Kelly J Volpe 105 Krista F Carpenter 106 Michelle P Silverman 107 The two 'David M Baker's are different employees, but unfortunately, with the same name. 2) allow combo box list to return the column value 'empno' even though it shows   More>>

I need kind help with the following question. As the combobox includes two pieces--textbox and the combobox list. Then how to create a combo box bean, which is based on table EMP(empno number(6), ename varchar2(40)) records for example, to achieve these features:




1) allow more than one columns to be displayed in its records list--e.g., I need to show these records:


empno (value) ename (label)


David M Baker 103


David M Baker 104


Kelly J Volpe 105


Krista F Carpenter 106


Michelle P Silverman 107


The two 'David M Baker's are different employees, but unfortunately, with the same name.



2) allow combo box list to return the column value 'empno' even though it shows both columns as above. i.e., if user picks the second record above, then the combobox list returns 104 to the textbox in the background, but the 'David M Baker' is displayed on the textbox. Of course the combobox list may return 'David M Baker' if needed when there is only one column in the list as the current standard feature.



3)allow partial match search by typing in some letters. i.e., if user types in the textbox a 'K' or 'k' then the partially matched records


Kelly J Volpe 105


Krista F Carpenter 106


should be automatically displayed in the combobox list, not the whole list as above; then user may double click to choose one of the two or if user continues to type in 'R' or 'r', then the uniquely matched record 'Krista F Carpenter' is displayed in the textbox and the 106 is returned to the textbox.

4) as a bonus if it's doable, allow combobox to return values to different textboxes when its records list has more than one columns.



The reason I need these features is that I am working on the project migrated from Microsoft Access applications to centralized Java version web application. We at beginning promised to users community that Java swing will provide all the GUI user friendly features Microsoft Access has, but now we got stucked--we ate our words and got tons of complains from our users community. This is just the most needed component I posted here. I really hope that Java would add all the default GUI user-friendly features to compete with MS since its Win95 GUI has been accepted as industry standard. And most users are used to it. They claimed that they don't know and don't care what tool you use the newly created application should be more user friendly, not the opposite.



I would be very much appreciated if any one would help me with this item.

   <<Less
About | Sitemap | Contact