Hi

I could not resist the temptation to try another algorithm. I committed an
alternative using a topological sorting algorithm extracted from

https://svn.apache.org/repos/asf/excalibur/trunk/fortress/container-api/src/java/org/apache/avalon/fortress/util/dag/

Since this one is in apache codebase we can copy it to myfaces and customize
it from our needs. It works in all examples including the one proposed.

I open an issue to track this one:

https://issues.apache.org/jira/browse/MYFACES-2537

Suggestions are welcome.

regards,

Leonardo Uribe

2010/2/4 Curtiss Howard <curtiss.how...@gmail.com>

> On Thu, Feb 4, 2010 at 12:08 PM, Leonardo Uribe <lu4...@gmail.com> wrote:
> > Hi
> >
> > The algorithm proposed fails because it is not able to process the nodes
> in
> > the correct order (the algorithm assign a weight equal to all nodes, so
> it
> > fails when try to order them in a psedo "postorder" form). I don't see a
> > quick solution for that one, so I think is better and faster try another
> > algorithm.
> >
> > I have some junit tests here:
> >
> > org.apache.myfaces.config.OrderingFacesConfigTest
> >
> > The tests call OrderingFacesConfigTest.applyAlgorithm, so it is easy to
> try
> > another one.
> >
> > Note any algorithm is executed when the application is initialized, and
> the
> > possible number of application config resources is relatively small.
> >
> > Suggestions are welcome.
> >
> > regards,
> >
> > Leonardo Uribe
> >
>
> Thanks for looking into that Leonardo.  I will go ahead and write a
> new implementation that uses a tree (as explained in the first email).
>
> Thanks,
>
>
> Curtiss Howard
>

Reply via email to