[jboss-user] [JBoss Seam] - Re: @Factory annotation
harpritt
do-not-reply at jboss.com
Sun Jul 8 16:52:29 EDT 2007
Hi Pete
I was trying to do this... below
the only difference between this and what i actually did was that my multiple @Factory annotations were in a stateless session bean.... I was calling all 3 from a single UI page. The crappy problem i had was that only one of the 3 @Factory variables got added to the scope..... and seam ui complained about a needing a not null variable... I wish i could explain it better ....
|
| import org.jboss.seam.annotations.Factory;
| import org.jboss.seam.annotations.Name;
|
| @Name("UiStuff")
| public class UiStuff
| {
|
| @Factory("ages")
| public int[] getAges() {
| int[] ages = {18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30};
| return ages;
| }
|
| @Factory("names")
| public String[] getNames() {
| int[] names= {"jim","john","tom","mick","bodger","badger"};
| return names;
| }
|
| @Factory("reallyRandom")
| public String[] getRandomness() {
| int[] randomIt= {"john ketly","is","a","weather","man"};
| return randomIt;
| }
|
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061767#4061767
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061767
More information about the jboss-user
mailing list