myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Kienenberger <mkien...@gmail.com>
Subject Re: Creating runtime Navigation Cases
Date Mon, 03 Sep 2012 18:19:47 GMT
I would say it's intended behavior.   In a production system,
configuration files do not get reloaded.

However, I suspect you're now in the realm of non-specified JSF
design.   The way that the Runtime configuration works is specific to
the MyFaces implementation.

The portable solution is to write a NavigationHandler rather than to
try to populate the navigation case rules.



On Mon, Sep 3, 2012 at 1:40 PM, Sergio Vieira Rolanski
<sergio@strategos.com.br> wrote:
> Do you know if that is the intended behaviour or is it a bug?
>
> (Just want to be sure, before I open a bug report.)
>
> 2012/9/3 Mike Kienenberger <mkienenb@gmail.com>
>
>> Actually, that's probably exactly the reason, now that you point it out.
>>
>> Configuration files are not re-read in production mode, so calling
>> setNavigationRulesChanged() won't have any effect.
>>
>>
>>
>> On Mon, Sep 3, 2012 at 1:13 PM, Sergio Vieira Rolanski
>> <sergio.strategos@gmail.com> wrote:
>> > That is nice idea.
>> >
>> > Nevertheless, I'm calling
>> "runtimeConfig.setNavigationRulesChanged(true);"
>> > and MyFaces doesn't seem to take into account, unless MyFaces is in
>> > development mode. So, it seems like a bug to me.
>> >
>> > 2012/9/3 Mike Kienenberger <mkienenb@gmail.com>
>> >
>> >> I don't use JSCookMenu, but I took a different approach for navigation.
>> >>
>> >> Rather than creating navigation cases and adding them to the
>> >> RuntimeConfig, you can create your own navigation handler.   If the
>> >> navigation case matches your rules, perform the navigation..
>> >> Otherwise, delegate back to the original navigation handler.
>> >>
>> >> On Mon, Sep 3, 2012 at 10:37 AM, Sergio Vieira Rolanski
>> >> <sergio@strategos.com.br> wrote:
>> >> > Hi,
>> >> >
>> >> > I'm dynamically creating a menu (JSCookMenu) by reading the menu and
>> >> > submenus from the database.
>> >> >
>> >> > I'm also create navigation cases and add them to RuntimeConfig, this
>> was
>> >> > working just fine with MyFaces/Tomahawk 1.1.
>> >> >
>> >> > I'm trying to upgrade to MyFaces/Tomahawk 2.0 and this dynamic menu
>> >> > creation code only works when I'm in development mode by setting
>> >> > "javax.faces.PROJECT_STAGE" to "development".
>> >> >
>> >> > Is this intended behaviour?
>> >> >
>> >> > --
>> >> > Sergio
>> >>
>>

Mime
View raw message