[weld-dev] [seam-dev] Replacing pages.xml

Marcell Manfrin Barbacena barbacena at gmail.com
Fri Feb 19 16:03:13 EST 2010


I posted this sometime ago and I think it relates to this then I am re-posting:

--
One of the things I would like to have is something like a plugable
application module with JSF as in:
http://wicketinaction.com/2008/10/creating-pluggable-applications-with-wicket-and-spring/

However if we stick with wicket to get the view part modularity the
only thing necessary to have is a way to retreive all avaliable beans
with a given Steriotype or Qualifier (the spring way is
BeanFactoryUtils.beansOfTypeIncludingAncestors)
--

I think doing this pages configuration in java we could do the same
feature with jsf. (But we would also need a bit more)

[]s

===
"Our deepest fear is not that we are inadequate.
Our deepest fear is that we are powerful beyond measure.
It is our light, not our darkness that most frightens us.
Your playing small does not serve the world.
There is nothing enlightened about shrinking so that other people
won't feel insecure around you.
We are all meant to shine.
And as we let our own light shine, we unconsciously give other people
permission to do the same.
As we are liberated from our own fear, our presence automatically
liberates others."
by Marianne Williamson
--
Marcell Manfrin Barbacena
barbacena at gmail.com
marcell at tre-pb.gov.br
Skype: callto://marcell84bruk
+55 (83) 8808-8555 (Mobile)
+55 (83) 3224-5945 (Home)



On Fri, Feb 19, 2010 at 5:51 PM, Arbi Sookazian <asookazian at gmail.com> wrote:
> Seam has a relatively small number of (mostly static) xml config files
> (thank God).  I'm not sure it'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's easier to read in xml format sometimes.  If you leave the option of
> class or xml then it's ok.
>
> 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't beat this comment down, yes, maybe I'm
> missing something).
>
> It would be pretty cool if there was a new utility that converted a
> pages.xml to class/OO format...
>
> On Fri, Feb 19, 2010 at 12:35 PM, Stuart Douglas
> <stuart at baileyroberts.com.au> wrote:
>>
>>  find . | grep xhtml | wc
>>     392     392   21192
>>
>> It's going to be a big enum... we would need to make sure that you could
>> split it up.
>>
>> 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't really configure it via xml, which I am not too worried
>> about but may alienate some users.
>>
>> Stuart
>>
>> On 19/02/2010, at 4:40 PM, Gavin King wrote:
>>
>> > You should even be able to make this work:
>> >
>> >      @View(.....)
>> >      login {
>> >         @Inject Login loginBean;
>> >         public MyAppPage next(MyAppPage page, Object outcome) {
>> >            if ( loginBean.isLoggedIn() )
>> >               return main;
>> >            else
>> >               return login;
>> >         }
>> >      },
>> >
>> > of course we would need a little infrastructure for injecting into enum
>> > values.
>> >
>> > On Thu, Feb 18, 2010 at 11:37 PM, Gavin King <gavin.king at gmail.com>
>> > wrote:
>> >> Oops, this is a MUCH better way to write this code:
>> >>
>> >>
>> >>   public enum MyAppPage implements Page<MyAppPage> {
>> >>
>> >>      @View(.....)
>> >>      login {
>> >>         public MyAppPage next(MyAppPage page, Object outcome) {
>> >>            if (Boolean.TRUE.equals(outcome))
>> >>               return main;
>> >>             else
>> >>               return login;
>> >>        }
>> >>      },
>> >>
>> >>      @View(.....)
>> >>      main {
>> >>         public MyAppPage next(MyAppPage page, Object outcome) {
>> >>            return main;
>> >>         }
>> >>      },
>> >>
>> >>      @View(.....)
>> >>      logout {
>> >>         public MyAppPage next(MyAppPage page, Object outcome) {
>> >>            return login;
>> >>         }
>> >>      };
>> >>
>> >>   }
>> >>
>> >
>> >
>> >
>> > --
>> > Gavin King
>> > gavin.king at gmail.com
>> > http://in.relation.to/Bloggers/Gavin
>> > http://hibernate.org
>> > http://seamframework.org
>>
>>
>> _______________________________________________
>> weld-dev mailing list
>> weld-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/weld-dev
>
>
> _______________________________________________
> weld-dev mailing list
> weld-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/weld-dev
>



More information about the weld-dev mailing list