icefaces


How to get values in dropdown list from database in icefaces?


i just wanna list the list of employee names from database in the dropdown list using ice faces . can anyone suggest me how to write the query in icefaces page to get the list of employees in the database . say table name is "employee" .
Thanks in advance .
I do it like this.
in your bean call your business class
e.g:
ArrayList<SelectItem> selectEmployees = new ArrayList<SelectItem>();
ArrayList<Employee> employees = company.getEmployees(); //this one calls the EmployeeDAO to get the records from database.
for(int i = 0; i < employees.size(); i++){
selectEmployees.add(new SelectItem(employes.get(i).getId(),employees.get(i).getName));
}
now you can use selectEmployees as the value of the selectOneMenu.

Related Links

Ace Datatable row selector with paginator
How to customize internal server error popup?
How to use more than one ace:fileEntry tag in the same page?
Enabling ICEfaces compat leads to not recognizing h:head and h:body
Passing parameter to <ice:rowSelector>'s clickListener attribute
ICEfaces configured for view, but h:head and h:body components are required
ace:tabSet style is corrupted when using ICEFaces 3
How to configure rime style in ICEfaces 3
scrolling changes the size of the ice datatable headers
How to get values in dropdown list from database in icefaces?
Data pager in icefaces not paging
use sbt for generate a webapp with icefaces
Cancel button Icefaces with immediate=true
how to redirect to j_security_check in the managed bean?
How do I disable a column using icefaces?
icefaces menu bar handling

Categories

HOME
arrays
sharepoint
sas
batch-processing
meshlab
checkbox
sed
blockchain
backup
decorator
formal-verification
chaiscript
recyclerview
bro
shader
shipping
constructor
metronic
getorgchart
rfid
image-recognition
cs-cart
symfony-forms
sendkeys
ejs
uisplitviewcontroller
mule-studio
grub2
atlassian-plugin-sdk
ms-access-2007
attask
apple-tv
source-maps
fabric
metadata-extractor
version-numbering
edge-detection
pep8-assembly
gettext
superpowered
xen
redhat-datavirt
duktape
haskell-pipes
jquery-multidatespicker
brute-force
soundjs
cross-entropy
wsadmin
microdata
apiary
archer
onmouseover
ideone
number-theory
chunked-encoding
sgmlreader
istorage
ogre3d
struts-layout
openh264
text-classification
nuget-server
execl
search-box
emoticons
qos
lotus
efxclipse
ebtables
icefaces
coordinate-transformation
squirrel
string-parsing
dac
flexjson
handlebars.java
approval-tests
license-key
throughput
file-diffs
sourcegear-vault
leadtools-sdk
viper-architecture
sparse-file
rspec3
uos
adobe-indesign
git-checkout
searchkick
chaining
java-melody
candidate-key
grunt-express
formvalidation-plugin
firebug-lite
outline
funkload
pic24
slick-2.0
magic-numbers
db4o
visual-c++-2010-express
circos
real-time-updates
asp.net-mvc-scaffolding
apache2.2
digital-design
zend-lucene
wpdb
usn
expression-evaluation
datacontract
junit3
yajl
scala-2.8
jquery-ui-button
idictionary
filetime
nt4
internals
dotproject

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App