Stripes 1.5 - any way to ask the system for a list of all ActionBeans?

孤街浪徒 提交于 2019-12-24 09:18:07

问题


I'm building an application where I have my default webpage as 'index.jsp' which consists of a list of <stripes:link...> tags, to link out to my various actionBeans (to their defaulthandlers).

As my application evolves and gathers more actionBeans I'm going back and adding in a new link to them : is there a way to automate this - considering that the stripes framework (I believe) iterates through all the actionBeans when it loads up - is there a way to ask the framework for this information ?


回答1:


The ActionResolver interface has several methods you could use, including getActionBeanClasses()

StripesFilter.getConfiguration() lets you access the configuration object (and hence the ActionResolver) in a static way.

Here's how to do it:

StripesFilter.getConfiguration().getActionResolver().getActionBeanClasses()


来源:https://stackoverflow.com/questions/4605196/stripes-1-5-any-way-to-ask-the-system-for-a-list-of-all-actionbeans

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!