我正在寻找一个archtype来创建一个基于的Maven项目
我所看到的所有例子(我一直在寻找最后4小时)都有不同的版本,当我试图在第4个错误之后逐步更改版本时,我开始使用另一个原型导致花费的时间很长.
如果有人使用最后一个基础"获得陈述"项目,我希望你能告诉我如何做到这一点.
我想在sqlight db b中写这行:
CREATE TABLE "android_metadata" ("locale" TEXT DEFAULT 'en_US')
Run Code Online (Sandbox Code Playgroud)
因此,在我生成此数据库的java文件中,我正在做:
stat.executeUpdate("create table "+"android_metadata"+"("+"locale"+ " TEXT DEAFULT"+");");
PreparedStatement prep1 = conn.prepareStatement(
"insert into "+"android_metadata"+" values (?);");
prep1.setString(1, "en_US") ;
Run Code Online (Sandbox Code Playgroud)
但是输出不是similer如何使sqlight语言环境在声明中使用""作为"locale",而字段语言环境只是TEXT
作为此博客的模拟开始:http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/
THANX
我的应用程序中有一个导航器,我想更改他的 css:
<div wicket:id="navigator">
Run Code Online (Sandbox Code Playgroud)
我怎样才能参考他?...并改变他的观点(css)?任何人都可以参考我的例子吗?
编辑
我的目标是将我的按钮添加到导航器中......
<table cellspacing="0" class="dataview" >
<tbody>
<thead>
<tr>
<th>Name</th>
<th>password</th>
<th>Delete</th>
</tr>
</thead>
<tr wicket:id="simple" >
<td><span wicket:id="name">Test ID</span></td>
<td><span wicket:id="password">Test ID</span></td>
<td><a href="#" wicket:id="deleteLink" class="button"></a></td>
</tr>
</tbody>
</table>
<div wicket:id="navigator">
Run Code Online (Sandbox Code Playgroud) 我希望我的页面动态加载 javascript 到我的身体:
<script type= "text/javascript" src="this path should be decided from wicket dynamically"/>
Run Code Online (Sandbox Code Playgroud)
我使用的是 wicket版本 1.4,因此JavaScriptResourceReference 在我的版本中不存在(我检查它不是 ' )
我该如何解决这个问题?提前致谢 :)。
我正在使用spring运行wicket并使用spring安全性,当tomcat会话时,在web.xml中声明的那个已过期
<session-config>
<session-timeout>1</session-timeout>
</session-config>
Run Code Online (Sandbox Code Playgroud)
我想使用过滤器(不覆盖现有的httpSession或Session)来捕获此事件我如何使用spring实现?
10倍
我想实现两个目标:
我希望我的模型每次都可以从DB中加载到生命周期中(对于每个请求,只有一个请求到DB)
我希望我的模型能够动态地附加到页面上,而wicket将为我完成所有这些重要的绑定
为了实现这两个目标,我得出结论,我需要同时使用CompoundPropertyModel和LoadableDetachableModel.
有谁知道这是一个好方法吗?
我该new CompoundPropertyModel(myLoadableDetachableModel)怎么办?
嗨,我认识Java很长一段时间,最近我一直深入Java世界.作为一名经验丰富的c#开发人员,我觉得使用Java枚举很奇怪.例如,如果我在控制台项目上显示如下:
public enum AdminOpertionFirstlayer
{MANAGE_SUPPLY,
MANAGE_CUSTOMERS_SERVICE,
ORDERS_MANAGEMENT,
REPORTING_OPRATIONES}
Run Code Online (Sandbox Code Playgroud)
我发现很难将它们写给用户,因为我必须定义新的变量
*AdminOpertionFirstlayer []adminOpertionFirstlayerArr =
AdminOpertionFirstlayer.values();
Run Code Online (Sandbox Code Playgroud)
为了实现这个目标:
for (int i = 0; i < adminOpertionFirstlayerArr.length; i++) {
String s = String.format("%d. %s",
i+1,
adminOpertionFirstlayerArr[i].toString());
Screen.print(s);
}
AdminOpertionFirstlayer chosen= adminOpertionFirstlayerArr
[(Integer.parseInt(dataIn.readLine()))-1];
Run Code Online (Sandbox Code Playgroud)
但我觉得申报*是不好的做法
谢谢
编辑
这样做是可以理解和可读吗?
public enum MainMenuOptiones{
ADMIN {public void secondLayerMenu(){
Main.AdminSecondLayerMenu();}},
CUSTOMER{public void secondLayerMenu(){
Main.customerSecondLayerMenu();}},
EXIT{public void secondLayerMenu(){
System.exit(1);}},
UNAPPLICABLE{public void secondLayerMenu(){
Screen.printToScreen("chice doesnt exist try again");}};
abstract public void secondLayerMenu();
}
Run Code Online (Sandbox Code Playgroud)
phrphes而不是使用我可以使用的所有开关机制
enumInstance.secondLayerMenu();
Run Code Online (Sandbox Code Playgroud) 使用wicket我想在点击按钮或链接时打开一个新选项卡,我该如何实现它?
我设法做的是在弹出这样打开它:
PopupSettings popupSettings = new PopupSettings("popuppagemap").setLeft(0).setHeight(500).setWidth(500).setHeight(0);
// Popup example
final Link<Void> setPopupSettings = new BookmarkablePageLink<Void>("searchBtn", HomePage.class)
.setPopupSettings(popupSettings);
Run Code Online (Sandbox Code Playgroud)
但是这会在一个新窗口中打开它.
碰巧用户点击输入我不希望将其包含在我输入的一部分中,字符串可以以3次结束\n所以只需替换一个不会完成我的解决方案的工作;
String values[] = string_Ends_With_Back_Slash_N.split("\n");
String String_without_Back_Slash_N =new String (values [0]);
//or just to point there without the new but i want later to dump the garbage.
Run Code Online (Sandbox Code Playgroud)
或者至少现在将值转储到gc ....
所以两个q:
我想使用Java脚本获取“选择一个”菜单,如何获取selecteditem 值?
<h:outputLabel value="#{l.description1}" styleClass="dataValue" />
<t:selectOneMenu id="chooseLevelTypeId"
value="#{AssetWizardComptTypeTile.levelTypeId}">
<f:selectItem itemLabel="" itemValue="0" />
<f:selectItems value="#{GeneralTables.levelTypesList}" />
<a4j:support event="onchange" action="#{WizardMainControl.action}"
??oncomplete="if (document.getElementById('wizardForm:chooseLevelTypeId').selecteditem == 'somthing')
document.getElementById('wizardForm:a1').style.display = 'block';"
reRender="chooseLevelTypeDesc" />
</t:selectOneMenu>
Run Code Online (Sandbox Code Playgroud) wicket ×5
java ×4
spring ×2
wicket-1.6 ×2
android ×1
hibernate ×1
javascript ×1
jsf ×1
maven ×1
sql ×1
string ×1
tomcat ×1
wicket-1.5 ×1