所以,我有一个使用Wicket 1.4框架的基于Web的应用程序,它使用Spring bean,Java Persistence API(JPA)和OpenSessionInView模式.我希望找到一个声明性的安全模型,但不需要大量的XML配置 - 我更喜欢注释.
以下是目前的选项:
Spring Security(指南) - 看起来很完整,但是我找到的每个指南都将它与Wicket结合起来仍然称之为Acegi Security,这让我觉得它必须陈旧.
Wicket-Auth-Roles(指南1和指南2) - 大多数指南建议将它与Spring Security混合使用,我喜欢@Authorize("ROLE1","ROLE2"等)的声明式风格.我担心必须扩展AuthenticatedWebApplication,因为我已经扩展了org.apache.wicket.protocol.http.WebApplication,而Spring已经代理了org.apache.wicket.spring.SpringWebApplicationFactory.
SWARM/WASP(指南) - 这看起来是最新的(虽然几年前主要的贡献者已经过去了),但我讨厌所有JAAS风格的文本文件,这些文件声明了主体的权限.我也不喜欢为用户可能想做的每件事创建一个Action类.安全型号对我来说也不是很明显.另外,没有Authn的例子.
此外,看起来很多人建议混合第一和第二选项.不过,我无法分辨出最佳做法是什么.
我只是学习Wicket,谷歌搜索产生了关于如何使用Wicket主题/模板网站的不同结果.似乎常见的方法是:
在Wicket中做到这一点的最佳做法/"正确"方法是什么?或者这些不同的方法各有特定的用途?
我是Android的新手(比如2天),但我对其他布局工具包很有经验.我正试图将一个AdView放在TabHost下面,似乎我可以让TabWidget或AdView正确显示,但绝不会同时显示.
首先,这是我想要完成的ASCII艺术版本:
-------------------------------------------- | Tab 1 | Tab 2 | -------------------------------------------- | MapView when tab 1 is selected | | | | | | | | | | | | | -------------------------------------------- | AdView that stays no matter what tab | --------------------------------------------
正如您所看到的,我正在尝试在TabWidget或FrameLayout 之外获取AdView .我希望它低于整个tabhost内容.
这是我在添加AdView 之前的布局:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:myapp="http://schemas.android.com/apk/res/org.mbs3.android.ufcm"
android:layout_height="fill_parent"
android:layout_width="wrap_content"
>
<TabHost android:id="@+id/tabhost" android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout android:layout_width="fill_parent"
android:id="@+id/home_layout" android:orientation="vertical"
android:layout_height="fill_parent">
<TabWidget android:id="@android:id/tabs"
android:layout_width="fill_parent" android:layout_height="wrap_content" />
<FrameLayout android:id="@android:id/tabcontent"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<RelativeLayout android:id="@+id/emptylayout1" …
Run Code Online (Sandbox Code Playgroud)