Ouch. I've debugged and found the problem. It turns out that the page is being
initialized and then cached from a mention in pages.xml:
<page view-id="/home.xhtml">
| <restrict>#{(not empty authenticator.currentClient)}</restrict>
| </page>
Is this intentional? I'd have expected even views mentioned in pages.xml to load
definitions out of foo.page.xml as well (with foo.page.xml overriding anything found in
pages.xml). Is this behavior documented anywhere? The only mention I can find is in the
reference manual where it just says:
anonymous wrote : If you have a lot of different page actions and page parameters, or even
just a lot of navigation rules, you will
| almost certainly want to split the declarations up over multiple files. You can define
actions and parameters for
| a page with the view id /calc/calculator.jsp in a resource named
calc/calculator.page.xml. The root
| element in this case is the element, and the view id is implied:
|
(no warning to avoid definitions in both foo.page.xml and pages.xml).
I can work around by moving all the definitions from my foo.page.xml into pages.xml, but
this feels error prone -- all of my restrict markup is in my pages.xml (most are
wildcards, but a few pages are marked up explicitly), while most of my navigation and
action markup is in foo.page.xml files -- until now I thought hey could all coexist. Now
it would seem I need to choose one or the other...
As others have commented recently, a Seam "best practices" guide would sure be
a nice thing to have so that we don't all have to stumble on simple stuff like this
and debug the innards of the framework to determine why it's not working like we think
it ought to.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4081838#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...