[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-27 Thread Newlukai
Ah... OK. Seems interesting. I will test it these days. I will tell you how it works. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988829#3988829 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988829

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-27 Thread petemuir
Nope, that won't work. A converter probably isn't suitable here. This, to me, sounds like a good use for returning the key directly to the backing bean. I've added an example to the wiki on doing this. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=398879

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-27 Thread Newlukai
No problem. But ... erm ... I've another question: In my application there is a table which contains priorities. The table contains two columns: the ID and the description of the priority. On some pages the user can filter all shown entries by priority. Adding a noSelectionLabel the user has al

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-24 Thread petemuir
Thanks, I've added that to wiki page View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988467#3988467 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988467 ___ jboss-user mailing

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-23 Thread Newlukai
I've got an appointment so I quickly wrote down what I've done: 1. Download selectitems.jar and selectitems-ui.jar. 2. Place them in WEB-INF/lib of your war file. 3. Add following property to your persistence.xml: 4. Add following entry to your components.xml: | java:/selectItem

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-23 Thread Newlukai
*dancing on my desk* It works ... I'v full access on all the columns entity B and entity A have. And I can choose an entity B from a dropdown to save in entity A. It's just great. Thank you Mr Muir. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988177#398

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-23 Thread petemuir
causes jboss to publish an EntityManagerFactory in JNDI for this PersistenceContext. As I mentioned above EntityConverter requires access to your EntityManager. You tell SelectItemsConfig the name under which the EntityManagerFactory is published in JNDI, the EntityConverter can then do a J

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-23 Thread Newlukai
Ah. OK. I didn't set this value in persistence.xml. What does this property do? I try to explain it for my own: In persistence.xml I'm setting up how to connect the database. Whit the property you mentioned I give it a JNDI name?!? And this JNDI name is the value that is needed by the SelectItem

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-23 Thread petemuir
Btw. regarding your comment on a step-by-step guide, if you feel like writing up how you got SeamSelectItems up and running, I'll quite happily edit it and include it in the wiki page. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988161#3988161 Reply to th

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-23 Thread petemuir
So in persistence.xml you need to define And use the value of this as the value of the persistenceUnitJndiName View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988160#3988160 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-23 Thread petemuir
Ok, so the EntityConverter requires access to an EntityManager to load objects. Just set this as you would set up an EntityManager for Seam - | java:/selectItemsEntityManagerFactory | | | | java:/selectItemsEntityManagerFactory |

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-23 Thread Newlukai
Yeah, it works. Thanks! Now I've got the real error message: Cannot access entityManager; ensure persistenceUnitJndiName is set on SelectItemsConfig class in components.xml So I've to set the JNDIName. But to which value? I didn't have a components.xml before I used si:selectItems. I set it to

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-23 Thread petemuir
Ok, I've put up a new zip, same version no, with (I hope) a fix. I wasn't able to replicate your problem (I'm using 1.1.0.CR1) so let me know. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988128#3988128 Reply to the post : http://www.jboss.com/index.html?

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-23 Thread Newlukai
It's 1.0.1 GA on a AS 4.0.4 Patch1. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988116#3988116 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988116 ___ jboss-user mailing

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-23 Thread petemuir
What version of Seam? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988110#3988110 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988110 ___ jboss-user mailing list jboss-use

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-23 Thread Newlukai
I'm trying to use and I followed all the hints in the example, but I still get an exception: java.lang.NullPointerException | at org.jboss.seam.core.Messages$1.get(Messages.java:51) | at org.jboss.seam.core.Messages$1.get(Messages.java:79) | at org.jboss.seam.selectitems.jsf.S

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-22 Thread Newlukai
Hmm. OK. Yesterday I searched around the web for possibilities to handle a ManyToOne-releationship in a dropdown-box. And I think that your http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamSelectItemsNewDesign offers all the things I need with a great usability. But I think there should be a guidel

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-22 Thread petemuir
Well there are really two approaches: 1) Traditional JSF - write a converter and outject a List - this is described on the wiki http://wiki.jboss.org/wiki/Wiki.jsp?page=SelectItems 2) Use the SeamSelectItems package - an old version of which is being discussed here View the original post : ht

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-22 Thread Newlukai
I#ve got the same problem. The real differences between your and my version is the usage of the EntityConverter and the @SelectItems. Could you please tell me what you did to get it working? Do I have to use @SelectItems and/or the EntityConverter or does it also work with a "pure" Seam? View

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-01 Thread johnurban
Wow, I get to answer my own question for a change: The validation error was resolved when I read the example by Mr. Muir. I had to override the equals method: | @Override | public boolean equals(Object obj) { | if (!(obj != null && obj instanceof Room)) |

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-01 Thread johnurban
Thank you for the extra eyes. I'm beginning to wish I had NOT started w/ the hibernate generated code for this particular app. Configuration seems to be a big part of this. I got past the entitymanager issue, now I'm stuck with the exact same code giving me a Validation error on the jsp. My que

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-01 Thread petemuir
"petemuir" wrote : Check you've configured org.jboss.seam.selectitems.SelectItemsPersistenceConfig -> persistenceUnitJndiName in components.xml - it should be set the same as org.jboss.seam.core.ManagedPersistenceContext -> persistenceUnitJndiName | java:/seamappEntityManager

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-01 Thread johnurban
I should also say, that the rooms and organization lookups work fine using the EntityManager from inside RoomServiceBean. But it appears that the the jsf is trying to access the EntityManager from somewhere other than than RoomServiceBean, because I get no System.out messages once I click on the

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-01 Thread johnurban
my components.xml | | | | true | seamapp/#{ejbName}/local | | | java:/seamappEntityManagerFactory | | | java:/selectItemsEntityManagerFactory | | | | | View the original post : http:/

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-01 Thread petemuir
"johnurban" wrote : So, some magic is happening between jsf submit and RoomServiceBean. Yes it is :) Check you've configured org.jboss.seam.selectitems.SelectItemsPersistenceConfig -> persistenceUnitJndiName in components.xml - it should be set the same as org.jboss.seam.core.ManagedPersisten

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-11-01 Thread johnurban
I was able to get the example working after closely following your example Mr. Muir. Thank you. In your example you have Client and ClientType POJO's. My next hurdle is getting the Client object to persist from a JSF. Is there an example already out there showing how to persist an object that h

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-10-25 Thread petemuir
anonymous wrote : In Seam what are the best guidelines for determining when/when not to use SLSB/SFSB? This is an interesting question. I think the answer depends on style/what you are doing. I'm increasingly using the pattern of a stateful component to manage the flow and a stateless 'servic

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-10-25 Thread johnurban
Thanks. Looks like my decision to add to the already generated code was a bad idea. I like your idea of simplifying. So that brings me to a design question: In this case should I create a new SLSB to persist the new person record rather than the generated PersonEditorBen(SFSB)? If I do create

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-10-25 Thread petemuir
I'm still concerned about personEditor having a SESSION scope [1]. I would suggest trying a really simple stateless session bean that just returns all the rooms in your data: ... | @SelectItems(label="description") | List allRooms; | | @Factory("allRooms") | void getRoomList() { |

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-10-25 Thread johnurban
Thanks petemuir. I think you've got me on the right track now. Getting that old null exception again. I've debuged the code and I have exactly 3 rooms in my lists. The count says 3. | 08:03:31,281 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception | java.lang.IllegalArgumentExc

[jboss-user] [JBoss Seam] - Re: Challenge: Simple Example Adding Records With Lookup Dro

2006-10-24 Thread petemuir
Have you tried the example in my selectitems code (http://jroller.com/page/pmuir?entry=selectitems_revisited). It contains both a select many and select one drop down that will end up being represented as youy suggest. If you have problems getting the example running (follow the readme) let me