Seam has a relatively small number of (mostly static) xml config files (thank God).  I&#39;m not sure it&#39;s even necessary to convert the pages.xml to a class or even if all users would want that.  Yes, type safety is good, but it&#39;s easier to read in xml format sometimes.  If you leave the option of class or xml then it&#39;s ok.<br>
<br>Is the Page class/enum going to be something that is extended or polymorphic, etc?  Why convert to OO if the only reason is type-safety assurance in this case (plz don&#39;t beat this comment down, yes, maybe I&#39;m missing something).<br>
<br>It would be pretty cool if there was a new utility that converted a pages.xml to class/OO format...<br><br><div class="gmail_quote">On Fri, Feb 19, 2010 at 12:35 PM, Stuart Douglas <span dir="ltr">&lt;<a href="mailto:stuart@baileyroberts.com.au">stuart@baileyroberts.com.au</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> find . | grep xhtml | wc<br>
     392     392   21192<br>
<br>
It&#39;s going to be a big enum... we would need to make sure that you could split it up.<br>
<br>
The only real problem I have with this approach is that all the metadata that is availible is hard coded into the page class, which means the page class has to know about every module that wants to use page level metadata. Also, you can&#39;t really configure it via xml, which I am not too worried about but may alienate some users.<br>

<br>
Stuart<br>
<br>
On 19/02/2010, at 4:40 PM, Gavin King wrote:<br>
<br>
&gt; You should even be able to make this work:<br>
&gt;<br>
&gt;      @View(.....)<br>
&gt;      login {<br>
&gt;         @Inject Login loginBean;<br>
&gt;         public MyAppPage next(MyAppPage page, Object outcome) {<br>
&gt;            if ( loginBean.isLoggedIn() )<br>
&gt;               return main;<br>
&gt;            else<br>
&gt;               return login;<br>
&gt;         }<br>
&gt;      },<br>
&gt;<br>
&gt; of course we would need a little infrastructure for injecting into enum values.<br>
&gt;<br>
&gt; On Thu, Feb 18, 2010 at 11:37 PM, Gavin King &lt;<a href="mailto:gavin.king@gmail.com">gavin.king@gmail.com</a>&gt; wrote:<br>
&gt;&gt; Oops, this is a MUCH better way to write this code:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;   public enum MyAppPage implements Page&lt;MyAppPage&gt; {<br>
&gt;&gt;<br>
&gt;&gt;      @View(.....)<br>
&gt;&gt;      login {<br>
&gt;&gt;         public MyAppPage next(MyAppPage page, Object outcome) {<br>
&gt;&gt;            if (Boolean.TRUE.equals(outcome))<br>
&gt;&gt;               return main;<br>
&gt;&gt;             else<br>
&gt;&gt;               return login;<br>
&gt;&gt;        }<br>
&gt;&gt;      },<br>
&gt;&gt;<br>
&gt;&gt;      @View(.....)<br>
&gt;&gt;      main {<br>
&gt;&gt;         public MyAppPage next(MyAppPage page, Object outcome) {<br>
&gt;&gt;            return main;<br>
&gt;&gt;         }<br>
&gt;&gt;      },<br>
&gt;&gt;<br>
&gt;&gt;      @View(.....)<br>
&gt;&gt;      logout {<br>
&gt;&gt;         public MyAppPage next(MyAppPage page, Object outcome) {<br>
&gt;&gt;            return login;<br>
&gt;&gt;         }<br>
&gt;&gt;      };<br>
&gt;&gt;<br>
&gt;&gt;   }<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Gavin King<br>
&gt; <a href="mailto:gavin.king@gmail.com">gavin.king@gmail.com</a><br>
&gt; <a href="http://in.relation.to/Bloggers/Gavin" target="_blank">http://in.relation.to/Bloggers/Gavin</a><br>
&gt; <a href="http://hibernate.org" target="_blank">http://hibernate.org</a><br>
&gt; <a href="http://seamframework.org" target="_blank">http://seamframework.org</a><br>
<br>
<br>
_______________________________________________<br>
weld-dev mailing list<br>
<a href="mailto:weld-dev@lists.jboss.org">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><br>
</blockquote></div><br>