I have implemented everything except the getServices(). It is about as
performant as it is going to get. All of the data structures needed for
the root model are kept by the MenuContentHandlerImpl (and thus, the
root model which contains the entire tree, is shared). Upon each
request, the root model gets rebuilt, but that is trivial, since it just
goes to the MenuContentHandlerImpl to get its TreeModel and hashMaps
(which are already built) -- so no parsing is done, no going through the
tree to construct the hashMaps is done.
My question to you Adam is when is the ClassLoaderUtils going to be in
incubator? and what will be its package? I can't seem to find any
javadocs for it, do you know where they are?
Adam Winer (JIRA) wrote:
[ http://issues.apache.org/jira/browse/ADFFACES-15?page=comments#action_12417639 ]
Adam Winer commented on ADFFACES-15:
------------------------------------
In talking over the menu model (and other collection models and data models),
I've realized that XMLMenuModel is necessarily a per-request object; it cannot
be shared among multiple users or threads (the iteration through model makes
the object stateful and single-threaded).
As a consequence, we need some refactoring:
- Caching of the parsed XML needs to be handled by the MenuContentHandler,
which can
be a single shared instance, probably by the MenuContentHandler storing
shared results
on the application map.
- XMLMenuModel doesn't need to store anything itself anywhere other than on the
instance, or perform any caching itself (since it's necessarily a
per-request object).
We can chat offline if the above isn't clear; sorry for not realizing this the
first time through!
A couple of other things I noticed in this pass:
- I've moved ClassLoaderUtils into the adf-faces-api JAR, so you can use its
getServices() method instead of javax.imageio.spi.ServiceRegistry.
- MenuContentHandler doesn't need all of the methods that it currently has to
be public. However, it'll probably need some new APIs given the above
refactoring.
Added XMLMenuModel
------------------
Key: ADFFACES-15
URL: http://issues.apache.org/jira/browse/ADFFACES-15
Project: MyFaces ADF-Faces
Type: New Feature
Environment: software platform
Reporter: Gary Kind
Attachments: trunk.patch
Additions to MyFaces ADF-Faces to allow easy creation of menus (navigation and
tabbed navigation) for .jspx pages using ADF-Faces UI components. Menus are
specified in XML Metadata files. In the .jspx page menu items are
af:commandNavigationItems nodestamped inside of location-specific facets that
are children of af:panelPage. The Menu Model managed bean that processes the
metadata files, along with the navigation-rules/cases are specified in the
faces-config.xml file.