Thanks a lot - that will help much!

--
Boris Klug
Debeka Hauptverwaltung

Zitat von Bruno Aranda <[EMAIL PROTECTED]>:

> Hi Boris,
>
> Both objectives can be achieved using the RuntimeConfig singleton.
>
> 1. To get the collection of navigation rules:
>
> ExternalContext externalContext = FacesConfig.getCurrentInstance
> ().getExternalContext();
> RuntimeConfig.getCurrentInstance(externalContext).getNavigationRules();
>
> 2. To add dinamically navigation rules (and managed beans):
>
> // example navigation rule
> NavigationRule navRule = new NavigationRule();
> NavigationCase navCase = new NavigationCase();
> navCase.setFromOutcome(fromOutcome);
> navCase.setToViewId(contentPath);
>
> RuntimeConfig.getCurrentInstance
> (externalContext).addNavigationRule(navRule);
>
> Regards,
>
> Bruno
>
> 2005/6/1, Klug, Boris <[EMAIL PROTECTED]>:
> >
> > Hi!
> >
> > I have a question regarding navigation rules. We use MyFaces with Tiles -
> > it
> > works fine so far. Our application looks up objects in a database and the
> > JSF
> > part is a kind of browser for these objects.
> > For some objects (e.g. an order) we want to have special pages
> > (templates), for
> > all others a generic template shows the fields of the object.
> > The way it should work is that we lookup the class name of an object (e.g.
> > Order) and than lookup if there is an navigation rule with a name
> > containing
> > the class name (e.g. temp_order).
> >
> > So the first question is: Is there a way to lookup the given (static)
> > navigation
> > rules?
> >
> > The second question is: Is there a way to dynamicly add navigation rules
> > to JSF
> > (and Tiles?) from Java? I think about implementing the pages for special
> > object
> > as a kind of plug ins.
> >
> > Thanks for your help in advance!
> >
> > --
> > Boris Klug

Reply via email to