aspose file tools
The moose likes JSF and the fly likes f:selectItems and List - managed property Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "f:selectItems and List - managed property" Watch "f:selectItems and List - managed property" New topic
Author

f:selectItems and List - managed property

Brian Smith
Ranch Hand

Joined: May 20, 2005
Posts: 63
I am trying to use a managed property list-entries to initialize a List that an f:selectItems is bound to.

<f:selectItems value="#{RowsPerPage.rows}"/>

Here is the managed bean from faces-config


Here is the class



Here is the stack trace

[ October 04, 2006: Message edited by: Brian Smith ]
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Show your UIInput JSF + bean code.


Code depot of a Java EE / JSF developer | JSF / Eclipse / Tomcat kickoff tutorial | DAO kickoff tutorial | I ♥ Unicode
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56554
    
  14

"BalusC",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
This was already changed afterwards. Probably the forum wasn't refreshed quick enough.
[ October 09, 2006: Message edited by: B L Scholtz ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56554
    
  14

Originally posted by B L Scholtz:
This was already changed afterwards.


Thank you!
Gregg Bolinger
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

selectItems will look for a List of SelectItem objects. So you would need to have code that does something like:

rows.add(new SelectItem("Label", "Value"));
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: f:selectItems and List - managed property
 
Similar Threads
JSF-Spring integration library
Problem with "rendered" Flag
jsf in a jsp:include doesn't work?
problem with tomcat when i am connection with db2 database
question about submiting forms