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

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
ui:repeatn tag inside ui:repeat..not working
<ice:outputMedia> and <ui:repeat>
HOW TO HIDE/IGNORE ?RVN in Icefaces

Categories

HOME
batch-processing
numpy
app-inventor
project-management
warnings
wxwidgets
d
ubuntu-12.04
bibtex
sbt-assembly
histogrammar
triggers
onenote-api
x11
rfid
flann
automata
viber
symfony-forms
arraylist
atlassian-plugin-sdk
prestodb
distance
scalaz7
binutils
k2
header-files
memsql
tflearn
maximo
dpi
autofill
superagent
gpib
ipfw
ifstream
swiftcharts
google-drive-realtime-api
body-parser
npm-shrinkwrap
ios-ui-automation
large-data
precedence
pace
ntfs-mft
common.logging
nsexception
spring-bean
apiary
worker
python-idle
jtds
dimple.js
uiviewpropertyanimator
webdatagrid
jgraph
component-pascal
google-maps-ios
butterknife
info
unity3d-editor
collapsingtoolbarlayout
dojox.charting
sun-codemodel
android-recyclerview
datainputstream
android-cursoradapter
function-fitting
hornetq
ninject.web.mvc
isml
mdm-zinc
guzzle6
lexicographic
dmp
suffix-array
funq
sid
facebook-wall
code-testing
alertifyjs
visualstatemanager
ksoap2
winrt-httpclient
operations
gamepad
bigint
convex-polygon
nservicebus4
asp.net-mvc-scaffolding
html-form-post
localtime
grunt-contrib-compass
iconv
shiva3d
domain-calculus
cosm
cross-domain-policy
nagle
post-redirect-get
j-interop
google-instant
chdatastructures
linfu
savestate
swfloader
microsoft.ink
document-library

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