[jboss-user] [JBoss Seam] - Re: SelectItems with objects?

2007-02-06 Thread SmokingAPipe
And it worked completely. What a cool feature. I'll say again, please integrate this whole thing into Seam in a future release! View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012216#4012216 Reply to the post : http://www.jboss.com/index.html?module=bb&op=

[jboss-user] [JBoss Seam] - Re: SelectItems with objects?

2007-02-06 Thread SmokingAPipe
And it worked. Cool! Except it stored the object in my entity as a serialized object instead of a reference. I think I need to put in a @ManyToOne or whatever because that has nothing to do with the select menu. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic

[jboss-user] [JBoss Seam] - Re: SelectItems with objects?

2007-02-06 Thread petemuir
If you think about it there is no way to automagically guess the entity manager. Seam allows you to specify more than one entity manager (this is necessary for example if you are wanting to do some sort of audit logging). The best we can do is make assumptions, and keep them consistent. So th

[jboss-user] [JBoss Seam] - Re: SelectItems with objects?

2007-02-06 Thread SmokingAPipe
Yes, that's exactly the problem. I don't know why there was scope="PAGE" in the example line, but I took that out (didn't specify any scope) and now it converts correctly. Now one of my other fields is not converting correctly, but that should be easy to fix, and then hopefully this thing will

[jboss-user] [JBoss Seam] - Re: SelectItems with objects?

2007-02-06 Thread petemuir
Are you sure you're in a conversation? (You need to be). Either that or try using id-equality (override equals() to check equality on the id). View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012203#4012203 Reply to the post : http://www.jboss.com/index.html?

[jboss-user] [JBoss Seam] - Re: SelectItems with objects?

2007-02-06 Thread SmokingAPipe
I looked at the HTML output and I can see that the option values are being correctly set as the entity IDs. So, now I really don't understand this. Hmm. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012200#4012200 Reply to the post : http://www.jboss.com

[jboss-user] [JBoss Seam] - Re: SelectItems with objects?

2007-02-06 Thread SmokingAPipe
Ok, I had a few problems, which I sorted out (I still have a lot of problems but at least these are now sorted). First, if I'm using an unusual name for the entityManager, I need to do this: and then I need to have a factory that uses that. Stupid mistakes. Now everything is working as far a

[jboss-user] [JBoss Seam] - Re: SelectItems with objects?

2007-02-06 Thread SmokingAPipe
I tried it like this: | | | java:/EntityManagerFactories/smpcData | | and then I got: java.lang.IllegalStateException: entityManager is null | org.jboss.seam.framework.EntityQuery.validate(EntityQuery.java:27) | org.jboss.seam.framework.EntityQuery

[jboss-user] [JBoss Seam] - Re: SelectItems with objects?

2007-02-06 Thread petemuir
- you'll also need to add the namespace for the selectitems prefix. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011792#4011792 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011792 _

[jboss-user] [JBoss Seam] - Re: SelectItems with objects?

2007-02-06 Thread SmokingAPipe
Quick question: I'm using SMPC but my EntityManager is not named entityManager. What do I put in my components.xml to fix that? I'm eager to try this now because it looks like exactly the right way to do this. I guess I will switch to 1.1.5 in the near future so I'll try that also. View the

[jboss-user] [JBoss Seam] - Re: SelectItems with objects?

2007-02-06 Thread SmokingAPipe
Ok I may go ahead and try that. Btw here's the link: http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamSelectItemsNewDesign View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011780#4011780 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mo

[jboss-user] [JBoss Seam] - Re: SelectItems with objects?

2007-02-06 Thread petemuir
Wel, the wiki version should work fine with 1.1.0 I think. The entityconverter is there so that you can reference a list of objects, which have @Id fields/methods and uses that as the value to write to the page - take a look at the wiki - it explains it all. View the original post : http://ww

[jboss-user] [JBoss Seam] - Re: SelectItems with objects?

2007-02-06 Thread SmokingAPipe
COOL! That's exactly what I'm talking about. A select menu where the values are entities. This is a pretty common usage but it's not something which is handled well in any of the existing systems (whether JSP, JSF, or even PHP or whatever). If there's a good Seam solution that would be cool.

[jboss-user] [JBoss Seam] - Re: SelectItems with objects?

2007-02-06 Thread petemuir
You should take a look either at SeamSelectItems on the wiki or s:selectItems in 1.1.5 (which is based on SeamSelectItems). The wiki one comes with an EntityConverter (I assume from what you are saying the objects are entities) which should work ootb. The one in 1.1.5 doesn't, but I will packa