Copying seam-dev because this seems very relevant ;)<br>--<br><br>A pitfall with the class/annotations configuration: the potential loss of ability for runtime modification during development. Being able to change configuration while the server is running, seeing your changes immediately, is a huge benefit for productivity.<br>

<br>I don&#39;t know if Seam2 provided runtime config reloading, but I would hesitate use a Java-based option. There are places where XML is useful, as long as it is kept simple. In my opinion, we need to be really careful when applying annotations/single objects to concepts with which they do not directly align, or &quot;fit,&quot; in a one-to-one manner.<br>

<br>The enumeration concept is interesting because, unlike classes, enums do not claim to be anything more than &quot;a representation of a set of concepts and some standard behaviors.&quot;<br>
<br>   public enum MyAppPage implements Page&lt;MyAppPage&gt; {
<br>      @View(.....)
<br>      login {
<br>         @Inject Login loginBean;
<br>         public MyAppPage next(MyAppPage page, Object outcome) {
<br>            if ( loginBean.isLoggedIn() )
<br>               return main;
<br>            else
<br>               return login;
<br>         }
<br>      }<br>   }<br><br>This forces all navigation logic from a specific view into one Enum definition, which is nicely centralized; however, I&#39;m not sure what the intent is here: Is this a no-op navigation? <br><br>

      @View(.....)
<br>      main {
<br>         public MyAppPage next(MyAppPage page, Object outcome) {
<br>            return main;
<br>         }
<br>      },
<br><br>      @View(.....)
<br>      logout {
<br>         public MyAppPage next(MyAppPage page, Object outcome) {
<br>            return login;
<br>         }
<br>      };
<br><br>Also, how will this address the bookmarkability issue? How are parameters passed between pages? -- Pages.xml used explicit syntax for parameter passing:<br><pre class="XML"><a id="events.pageaction.navigation"><span class="xml_tag_symbols">&lt;</span><span class="xml_tag_name">param</span><span class="xml_plain"> </span><span class="xml_attribute_name">name</span><span class="xml_tag_symbols">=</span><span class="xml_attribute_value">&quot;documentId&quot;</span><span class="xml_plain"> </span><span class="xml_attribute_name">value</span><span class="xml_tag_symbols">=</span><span class="xml_attribute_value">&quot;#{documentEditor.documentId}&quot;</span><span class="xml_tag_symbols">/&gt;</span><span class="xml_plain"></span></a></pre>
Which would be difficult to translate into an Enum solution like the one that Gavin suggested. I&#39;m not seeing an immediate solution, save adding an additional method that returns a list of parameter names and expressions to be propagated, but now we&#39;re talking about a lot of boilerplate code in order to do something simple.<br>
<br>I&#39;m probably going to lite a fire by saying this, but sometimes XML is more concise than Java. I&#39;d like to be convinced that this is a good option to provide, and that it will be simpler or more usable than XML. Right now my gut is telling me that it&#39;s going to be more complicated both for our development, and the users&#39;. <br>
<br>I am a big fan of the Injectability, and I think that&#39;s a strong point toward a native Java solution, but I&#39;m not sure it&#39;s enough when you can already reference beans through EL in pages.xml and get direct access to both contexts and dependencies - giving you the best of both worlds in a pretty reusable way.<br>
<br>Thoughts?<br>Lincoln<br><br><div class="gmail_quote">On Fri, Feb 19, 2010 at 4:03 PM, Marcell Manfrin Barbacena <span dir="ltr">&lt;<a href="mailto:barbacena@gmail.com" target="_blank">barbacena@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I posted this sometime ago and I think it relates to this then I am re-posting:<br>
<br>
--<br>
One of the things I would like to have is something like a plugable<br>
application module with JSF as in:<br>
<a href="http://wicketinaction.com/2008/10/creating-pluggable-applications-with-wicket-and-spring/" target="_blank">http://wicketinaction.com/2008/10/creating-pluggable-applications-with-wicket-and-spring/</a><br>
<br>
However if we stick with wicket to get the view part modularity the<br>
only thing necessary to have is a way to retreive all avaliable beans<br>
with a given Steriotype or Qualifier (the spring way is<br>
BeanFactoryUtils.beansOfTypeIncludingAncestors)<br>
--<br>
<br>
I think doing this pages configuration in java we could do the same<br>
feature with jsf. (But we would also need a bit more)<br>
<br>
[]s<br>
<br>
===<br>
&quot;Our deepest fear is not that we are inadequate.<br>
Our deepest fear is that we are powerful beyond measure.<br>
It is our light, not our darkness that most frightens us.<br>
Your playing small does not serve the world.<br>
There is nothing enlightened about shrinking so that other people<br>
won&#39;t feel insecure around you.<br>
We are all meant to shine.<br>
And as we let our own light shine, we unconsciously give other people<br>
permission to do the same.<br>
As we are liberated from our own fear, our presence automatically<br>
liberates others.&quot;<br>
by Marianne Williamson<br>
<font color="#888888">--<br>
Marcell Manfrin Barbacena<br>
<a href="mailto:barbacena@gmail.com" target="_blank">barbacena@gmail.com</a><br>
<a href="mailto:marcell@tre-pb.gov.br" target="_blank">marcell@tre-pb.gov.br</a><br>
Skype: <a href="callto://marcell84bruk" target="_blank">callto://marcell84bruk</a><br>
+55 (83) 8808-8555 (Mobile)<br>
+55 (83) 3224-5945 (Home)<br>
</font><div><div></div><div><br>
<br>
<br>
On Fri, Feb 19, 2010 at 5:51 PM, Arbi Sookazian &lt;<a href="mailto:asookazian@gmail.com" target="_blank">asookazian@gmail.com</a>&gt; wrote:<br>
&gt; Seam has a relatively small number of (mostly static) xml config files<br>
&gt; (thank God).  I&#39;m not sure it&#39;s even necessary to convert the pages.xml to a<br>
&gt; class or even if all users would want that.  Yes, type safety is good, but<br>
&gt; it&#39;s easier to read in xml format sometimes.  If you leave the option of<br>
&gt; class or xml then it&#39;s ok.<br>
&gt;<br>
&gt; Is the Page class/enum going to be something that is extended or<br>
&gt; polymorphic, etc?  Why convert to OO if the only reason is type-safety<br>
&gt; assurance in this case (plz don&#39;t beat this comment down, yes, maybe I&#39;m<br>
&gt; missing something).<br>
&gt;<br>
&gt; It would be pretty cool if there was a new utility that converted a<br>
&gt; pages.xml to class/OO format...<br>
&gt;<br>
&gt; On Fri, Feb 19, 2010 at 12:35 PM, Stuart Douglas<br>
&gt; &lt;<a href="mailto:stuart@baileyroberts.com.au" target="_blank">stuart@baileyroberts.com.au</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;  find . | grep xhtml | wc<br>
&gt;&gt;     392     392   21192<br>
&gt;&gt;<br>
&gt;&gt; It&#39;s going to be a big enum... we would need to make sure that you could<br>
&gt;&gt; split it up.<br>
&gt;&gt;<br>
&gt;&gt; The only real problem I have with this approach is that all the metadata<br>
&gt;&gt; that is availible is hard coded into the page class, which means the page<br>
&gt;&gt; class has to know about every module that wants to use page level metadata.<br>
&gt;&gt; Also, you can&#39;t really configure it via xml, which I am not too worried<br>
&gt;&gt; about but may alienate some users.<br>
&gt;&gt;<br>
&gt;&gt; Stuart<br>
&gt;&gt;<br>
&gt;&gt; On 19/02/2010, at 4:40 PM, Gavin King wrote:<br>
&gt;&gt;<br>
&gt;&gt; &gt; You should even be able to make this work:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;      @View(.....)<br>
&gt;&gt; &gt;      login {<br>
&gt;&gt; &gt;         @Inject Login loginBean;<br>
&gt;&gt; &gt;         public MyAppPage next(MyAppPage page, Object outcome) {<br>
&gt;&gt; &gt;            if ( loginBean.isLoggedIn() )<br>
&gt;&gt; &gt;               return main;<br>
&gt;&gt; &gt;            else<br>
&gt;&gt; &gt;               return login;<br>
&gt;&gt; &gt;         }<br>
&gt;&gt; &gt;      },<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; of course we would need a little infrastructure for injecting into enum<br>
&gt;&gt; &gt; values.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Thu, Feb 18, 2010 at 11:37 PM, Gavin King &lt;<a href="mailto:gavin.king@gmail.com" target="_blank">gavin.king@gmail.com</a>&gt;<br>
&gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt;&gt; Oops, this is a MUCH better way to write this code:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;   public enum MyAppPage implements Page&lt;MyAppPage&gt; {<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;      @View(.....)<br>
&gt;&gt; &gt;&gt;      login {<br>
&gt;&gt; &gt;&gt;         public MyAppPage next(MyAppPage page, Object outcome) {<br>
&gt;&gt; &gt;&gt;            if (Boolean.TRUE.equals(outcome))<br>
&gt;&gt; &gt;&gt;               return main;<br>
&gt;&gt; &gt;&gt;             else<br>
&gt;&gt; &gt;&gt;               return login;<br>
&gt;&gt; &gt;&gt;        }<br>
&gt;&gt; &gt;&gt;      },<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;      @View(.....)<br>
&gt;&gt; &gt;&gt;      main {<br>
&gt;&gt; &gt;&gt;         public MyAppPage next(MyAppPage page, Object outcome) {<br>
&gt;&gt; &gt;&gt;            return main;<br>
&gt;&gt; &gt;&gt;         }<br>
&gt;&gt; &gt;&gt;      },<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;      @View(.....)<br>
&gt;&gt; &gt;&gt;      logout {<br>
&gt;&gt; &gt;&gt;         public MyAppPage next(MyAppPage page, Object outcome) {<br>
&gt;&gt; &gt;&gt;            return login;<br>
&gt;&gt; &gt;&gt;         }<br>
&gt;&gt; &gt;&gt;      };<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;   }<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; --<br>
&gt;&gt; &gt; Gavin King<br>
&gt;&gt; &gt; <a href="mailto:gavin.king@gmail.com" target="_blank">gavin.king@gmail.com</a><br>
&gt;&gt; &gt; <a href="http://in.relation.to/Bloggers/Gavin" target="_blank">http://in.relation.to/Bloggers/Gavin</a><br>
&gt;&gt; &gt; <a href="http://hibernate.org" target="_blank">http://hibernate.org</a><br>
&gt;&gt; &gt; <a href="http://seamframework.org" target="_blank">http://seamframework.org</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; weld-dev mailing list<br>
&gt;&gt; <a href="mailto:weld-dev@lists.jboss.org" target="_blank">weld-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; weld-dev mailing list<br>
&gt; <a href="mailto:weld-dev@lists.jboss.org" target="_blank">weld-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br>
&gt;<br>
<br>
_______________________________________________<br>
weld-dev mailing list<br>
<a href="mailto:weld-dev@lists.jboss.org" target="_blank">weld-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a></div></div></blockquote></div><br><br clear="all"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br>

<a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>&quot;Keep it Simple&quot;<br>