[jboss-user] [JBoss Seam] - Re: What is the common pattern for selecting objects?

2007-06-08 Thread damianharvey
| h:selectOneMenu id=boSelector value=#{myBean.myObject} | s:selectItems value=#{myBean.myObjectList} var=object label=#{object.field}/ | s:convertEntity / | /h:selectOneMenu | View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4052509#4052509

[jboss-user] [JBoss Seam] - Re: What is the common pattern for selecting objects?

2007-06-08 Thread petemuir
Use s:convertEntity and s:selectItems as demoed in a number of examples (e.g. ui example) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4052503#4052503 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4052503

[jboss-user] [JBoss Seam] - Re: What is the common pattern for selecting objects?

2007-06-08 Thread grettke_spdr
The vision is that in case we don't want to use enums to populate selection controls we could use objects instead, but those objects don't yet need to be persisted. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4052621#4052621 Reply to the post :

[jboss-user] [JBoss Seam] - Re: What is the common pattern for selecting objects?

2007-06-08 Thread petemuir
You can use s:selectItems with any java object, but you need to provide a JSF converter if the object isn't a string. JSF provides some (e.g. number converter), Seam adds two more (enums, already persisted JPA entities), for others, you'll need to write your own. View the original post :

[jboss-user] [JBoss Seam] - Re: What is the common pattern for selecting objects?

2007-06-08 Thread grettke_spdr
I see, thanks Pete and Damian. The documentation implies that you would only ever use this with JPA entity. Right now it looks like our system will have both JPA and non-JPA components bound to the JSF UI. As such, we don't plan to always bind entities to entities. Would this be possible?

[jboss-user] [JBoss Seam] - Re: What is the common pattern for selecting objects?

2007-06-08 Thread grettke_spdr
petemuir wrote : You can use s:selectItems with any java object, but you need to provide a JSF converter if the object isn't a string. JSF provides some (e.g. number converter), Seam adds two more (enums, already persisted JPA entities), for others, you'll need to write your own. Thanks Pete.

[jboss-user] [JBoss Seam] - Re: What is the common pattern for selecting objects?

2007-06-08 Thread petemuir
Rick Hightower's series on JSF/Facelets on IBM developer works is superb IMO View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4052634#4052634 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4052634

[jboss-user] [JBoss Seam] - Re: What is the common pattern for selecting objects?

2007-06-08 Thread grettke_spdr
petemuir wrote : Rick Hightower's series on JSF/Facelets on IBM developer works is superb IMO Thanks Pete. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4052636#4052636 Reply to the post :

[jboss-user] [JBoss Seam] - Re: What is the common pattern for selecting objects?

2007-06-08 Thread petemuir
Not really, the trouble is if you are using Facelets and Seam, lots of what a JSF book is about (backing beans, jsp) are irrelevant. Your best bet is Micheal (Yuan)'s Seam book. O'Reilly have a pocket guide to facelets that is well worth the $10 it costs. View the original post :

[jboss-user] [JBoss Seam] - Re: What is the common pattern for selecting objects?

2007-06-08 Thread grettke_spdr
Here is what I came up with. I am posting it in order to elicit comments on my approach (code review) and also in case this is right and anyone else needs to use selectItems with a custom converter when you want to populate it using objects. In the interest of brevity this is not a compilable