📄 catalogresourceupdate.jsp
字号:
<?xml version="1.0" encoding="gb2312" ?><%@ page language="java" contentType="text/html; charset=gb2312" pageEncoding="gb2312"%>
<%@ page import="com.eline.wap.common.util.*"%>
<%@ page import="com.eline.wap.catalog.model.*"%>
<%@ page import="com.eline.wap.catalog.client.*"%>
<%
int catalogId = StringUtils.getInt(request.getParameter("catalogId"), -1);
System.out.println("catalogResourceUpdate.jsp?catalogId=" + catalogId);
CatalogHelper helper = new CatalogHelper();
Item baseItem = helper.getItem(catalogId);
System.out.println("baseItem=" + baseItem);
if (baseItem == null || !(baseItem instanceof SingleItem)) { // 如果该对象不符合,则跳转到出错页面
String jumpToURL = null;
if (baseItem != null) {
System.out.println("baseItem.getType()=" + baseItem.getType());
if (baseItem.getType() == Item.TYPE_SINGLE) {
jumpToURL = SiteUrls.getInstance().getProperty(SiteUrls.CATALOG_RESOURCE_UPDATE) + "?catalogId=" + catalogId;
} else if (baseItem.getType() == Item.TYPE_EFFECT)
jumpToURL = SiteUrls.getInstance().getProperty(SiteUrls.CATALOG_EFFECT_UPDATE) + "?catalogId=" + catalogId;
else
jumpToURL = SiteUrls.getInstance().getProperty(SiteUrls.CATALOG_FAILURE);
}
System.out.println("jumpToURL=" + jumpToURL);
response.sendRedirect(jumpToURL);
return;
}
SingleItem item = (SingleItem) baseItem;
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>Insert title here</title><style type="text/css">
body, table, td, select, input, textarea { font-size: 9pt; font-family: SimSun; }
.button2w { width: 50px; }
.menuBar td { color: #000000; }
.menuBar a { color: #000000; text-decoration: none }
.menuBar a:hover { color: #f08000; text-decoration: underline }
</style>
<script language="javascript" id="clientEventHandlersJS">
<!--
function form1_onsubmit() {
document.forms["Form1"].action = "<%=SiteUrls.getInstance().getProperty(SiteUrls.CATALOG_RESOURCE_DEPLOY)%>?webAction=2";
if (document.all["name"].value.length < 1) {
window.alert("您必须正确填写目录名称");
return false;
}
if (document.all["resourceId"].value.length < 1) {
window.alert("您必须正确填写资源ID");
return false;
}
return true;
}
function buttonCancel_onclick() {
var dlgWnd = window;
if (window.parent != null)
dlgWnd = window.parent;
dlgWnd.close();
return true;
}
-->
</script>
</head>
<body bottomMargin="0" bgcolor="#d4d0c8" leftMargin="0" topMargin="0"
rightMargin="0">
<table cellspacing="2" cellpadding="0" width="100%" border="0">
<tr>
<td valign="top">
<span style="font-size: 3px"> <br /></span>
<form action="<%=SiteUrls.getInstance().getProperty(SiteUrls.CATALOG_RESOURCE_DEPLOY) %>?webAction=2" method="post">
<table cellspacing="1" cellpadding="1" border="0" width="100%">
<tr>
<th align="left" colspan="2">资源连接修改</th>
</tr>
<tr>
<td align="left" colspan="2"><hr size="1" /></td>
</tr>
<tr>
<td width="100">名称</td>
<td><input type="text" name="name" value="<%=item.getName() %>" size="25" maxlength="50" /></td>
</tr>
<tr>
<td width="100">连接属性</td>
<td><select name="type">
<option <%=item.getSingleAttribute() == 0 ? "selected" : "" %> value="0">书籍</option>
<option <%=item.getSingleAttribute() == 1 ? "selected" : "" %> value="1">资讯</option>
<option <%=item.getSingleAttribute() == 2 ? "selected" : "" %> value="2">铃声</option>
<option <%=item.getSingleAttribute() == 3 ? "selected" : "" %> value="3">图片</option>
<option <%=item.getSingleAttribute() == 4 ? "selected" : "" %> value="4">KJAVA</option>
<option <%=item.getSingleAttribute() == 5 ? "selected" : "" %> value="5">动画</option>
</select><font color="red">*</font>
</td>
</tr>
<tr>
<td width="100">资源ID</td>
<td><input name="resourceId" value="<%=item.getResourceId() %>" size="10" /><font color="red">*</font>
</td>
</tr>
<tr>
<td width="100">状态</td>
<td><select name="active">
<option <%=item.isActive() ? "selected" : "" %> value="1">有效</option>
<option <%=item.isActive() ? "" : "selected" %> value="0">无效</option>
</select>
</td>
</tr>
<tr>
<td colspan="2"><hr size="1" /></td>
</tr>
<tr>
<td colspan="2">注意事项</td>
</tr>
<tr>
<td colspan="2"><textarea readonly disabled rows="5" cols="77">注意:
修改资源连接并不会真正修改资源的属性,而只是修改本连接有关的内容!</textarea>
<input type="hidden" name="indexId" value="<%=catalogId %>" />
</td>
</tr>
<tr>
<td colspan="2"><hr size="1" /></td>
</tr>
<tr>
<td colspan="2" align="center"><input value="提交" type="submit" name="ButtonSubmit" class="button2w" /><input value="放弃" type="button" name="ButtonCancel" class="button2w" onclick="return buttonCancel_onclick()" /></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -