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

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
Two ICEfaces panel positioned interacting
java.lang.ClassNotFoundException: com.icesoft.faces.util.event.servlet.ContextEventRepeater
how to push component state changes to multiple different pages using icefaces
How can Websphere PUMA SPI (PumaLocator) be used with an ICEfaces Portlet?
IceFaces and FileResource - delete after session expires

Categories

HOME
json
security
filterrific
freepascal
wsdl
ncurses
webrtc
windows-7
paramiko
windows-store-apps
bibtex
automated-tests
safari
flyway
vuex
eclipse-cdt
cockroachdb
uiscrollview
maxima
jsonserializer
styles
mousewheel
ghost-inspector
croppic
jenkins-job-dsl
skmaps
guile
dss
edge-detection
superagent
invoke-command
ivy
edb
google-drive-realtime-api
rhomobile
modulo
honeysql
lego
nlb
es-shell
code-behind
deepstream.io
html-agility-pack
stress-testing
apiary
applepayjs
tcserver
rpostgresql
jexl
bettercms
createobject
sql-import-wizard
typhoon
uistackview
c#-interactive
update-site
dts
pagekit
fps
elastix
amazon-kcl
approval-tests
insertion-sort
mirrorlink
zuora
qbfc
built-in
xjc
lines-of-code
adobe-indesign
web-component-tester
ticket-system
tcpreplay
ultrawingrid
ember-components
author
emma
argument-passing
android-looper
data-generation
pic24
indexing-service
flash-cc
roxygen
logentries
convex-polygon
stagefright
grunt-contrib-compass
fortran77
reporting-tools
abnf
snapjs
code-conversion
xgettext
throttling
scalaxb
noir
phpcrawl
getresource
open-graph-beta
recordset
rtsp-client
filetime
web-statistics
gears
data-execution-prevention
self-reference

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