12 Replies Latest reply on Feb 11, 2007 1:16 PM by pmuir

    SelectItems and Seam

    manuel.gentile

      Why the seam group do not include SelectItems component in the offical release?
      Thanks:-)

        • 1. Re: SelectItems and Seam
          pmuir

          I need to have a chat with Gavin about this and see how he wants to play this one.

          Personally, I would like to see the tag (but probably not the converters at this stage) moved into seam-ui.

          • 2. Re: SelectItems and Seam

            I support that! Together with the ejb queries in components.xml it the tag is just brilliant!


            Regards

            Felix

            P.S.: Could you include a usage pattern of that type in the documentation on the wiki? I think many people haven't realized how powerful the combination is.

            • 3. Re: SelectItems and Seam
              pmuir

              Feel free to update it :)

              • 4. Re: SelectItems and Seam
                pmuir
                • 5. Re: SelectItems and Seam
                  pmuir

                  I've committed this to CVS. It would be great if some of you could put it through its paces prior to the 1.1.5 release later this week. It's documented in with the rest of the JSF controls, and is demonstrated in the ui example.

                  You should note that the wiki version is a bit different to the version I've committed - the cache and key attributes have been removed and the converters aren't there (or automatically added). You can use Seam's s:convertEnum converter for enums and the si:convertEntity should work for entities. I'll try to get round to packaging up the si:convertEntity into a seperate package (on the wiki) tomorrow.

                  • 6. Re: SelectItems and Seam


                    Feel free to update it :)


                    I have added a very simple example.

                    Regards

                    Felix


                    • 7. Re: SelectItems and Seam

                      I have been waiting for SelectItems to finally be included in the main distribution of Seam. Thank you Peter for all you hard work.

                      I read you comment about "converters aren't there (or automatically added)" and si:convertEntity for entities.

                      I use the org.jboss.seam.EntityConverter a great deal and was wondering why this was not included.

                      I also noted that you were going to post a separately packaged version, but could not locate this on the Wiki.

                      Are there any directions or examples for using the new 1.1.5 included version vs to external version especially in regards to org.jboss.seam.EntityConverter ?

                      • 8. Re: SelectItems and Seam
                        pmuir

                        Yes.

                        The entityConverter very handy, but (to me) it's really a bit of a hack (which is why I didn't include it in 1.1.5). I think it's probably better kept separate for now at least.

                        So, I've been working on a separate version of the converter (which is basically ready) - but ran into http://jira.jboss.org/jira/browse/JBSEAM-755.

                        For now, you can either use s:selectItems or si:selectItems (or a mixture of both in your app). Using the entityconverter from 1.1.1beta4 should work fine afaik (you'll just have to attach it manually each time using si:convertEntity - or do the same using a facelets component handler or similar).

                        So, direction wise, I plan to fix JBSEAM-755 for 1.1.6, and also post the separate entityconverter. And I do have some ideas about a better way of doing this - I just need to work through them :)

                        • 9. Re: SelectItems and Seam

                          If I include the 1.1.1beta4 jars and upgrade to 1.1.5 will there be any conflict with the new implementation if I do not use <s:selectItems>?

                          • 10. Re: SelectItems and Seam
                            pmuir

                            Not AFAIK.

                            • 11. Re: SelectItems and Seam

                              Thanks for you prompt reply. I am upgrading a project this weekend, and I will let you know how it goes.

                              • 12. Re: SelectItems and Seam
                                pmuir

                                http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamEntityConverter

                                This is the EntityConverter split out of SeamSelectItems. It should work just as before (except you do need to attach it yourself using one of the standard JSF mechanisms for attaching converters) - I've marked it draft for now so any problems, please report them here.

                                I've created http://jira.jboss.com/jira/browse/JBSEAM-815 - if this is something you would like to see please vote for it!