6 Replies Latest reply on Apr 19, 2007 2:13 AM by Atle Prange

    [OT] Trinidad 1.0.0-incubating

    Matthias Wessendorf Newbie

      Hi,

      since some of you guys are using Trinidad w/ the Seam technology stack, I wanna keep you posted, that there is now a first release of the Trinidad components:
      http://jroller.com/page/mwessendorf?entry=apache_trinidad_1_0_0

      Thx,
      Matthias

        • 1. Re: [OT] Trinidad 1.0.0-incubating
          Pete Muir Master

          I've put together a Seam-Trinidad example based on the 1.0.0 release of Trinidad:

          http://pmuir.blogspot.com/2007/04/seamdiscs-jboss-seam-and-apache.html

          It also integrates RichFaces/Ajax4jsf and demonstrates using the support Seam has for tying Trinidad's table paging and ordering to the persistence layer tightly.

          http://pmuir.blogspot.com/2007/04/backing-trinidads-datatable-with-seam.html

          It's currently only available in Seam CVS, but will be in 1.3BETA1 when it's available.

          • 2. Re: [OT] Trinidad 1.0.0-incubating
            Atle Prange Newbie

            Pete: I read your blogpost about facelets-plugins which seems very interesting. But i cant seem to locate the Seam Wiki you refer to. (I tried the CVS ROOT of Seam)
            ( I have just made a small site with wiki functionality using seam and facelets, following the first strategy you mention. But I realize that whatever I do which i think might be smart, you guys are making it faster and better than me. Maybe i should just lean back and wait a bit longer. Chances are that you build the while application i am developing before me ;) - keep up the good work )

            Any hints on where we can find the Seam Wiki?

            • 3. Re: [OT] Trinidad 1.0.0-incubating
              Pete Muir Master

              It's in CVS at examples/wiki - Christian can give you a better idea of where he's got to with it.

              • 4. Yeah!
                Atle Prange Newbie

                This looks excellent!

                I used a different approach. I modified the seam antlr grammer so it would recognize the macros, and replaced it with a home made injection tag (<wiki:inject name="macroname" factory="wiki.macroname('param1','param2')" />)

                I then run the facelet compiler over the content, leaving it to create the components. The inject tag works just as a normal UI:include: It includes a facelet with the same name as the macro, but it additionaly calls a factory method on a seam component named 'wiki.', which creates a java bean that is then passed to the included facelet. That way i can have a different bean for each macro, based on the params the user supplies. (The params are supplied to the factory as strings)

                My approach has several obvious downsides:
                Compiling the text every time is time consuming
                No form submits, since the components disappear after they have been rendered (i think)

                The pros: I can back every macro with a bean, which is created based on macro parameters.

                Next i am thinking of implementing markers, that can give text some semantic meaning that is a bit more advanced than the normal tags.

                The beauty of seam is that it just makes it so easy to implement!

                • 5. Re: [OT] Trinidad 1.0.0-incubating
                  Pete Muir Master

                  This sounds approximately like the way the wiki works - I don't quite get how you are using the macros - you put your wiki:inject tag inline with the wikitext? The Seam wiki add's [<=plugin] to the wikitext grammer, and then includes the relevant plugin at this point. Each plugin has a preferences bean (a bit like the your macro bean I guess). You could probably apply the approach I described in the blog to your include as well (it solves the disappearing components problems)

                  • 6. Re: [OT] Trinidad 1.0.0-incubating
                    Atle Prange Newbie

                    Yes, i replace all text that looks like [:<param_1>;...;<param_n>] into <wiki:include name="" factory="wiki.('param_1',...,'param_n')"/>

                    The text is then compiled by the facelet compiler and finally rendered.

                    I'll try to understand your approach a bit better, it seems more elegant :), and then see if i can combine them somehow...