?? newsform_jsp.java
字號:
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
import java.net.*;
import ws.woa.core.*;
import ws.woa.util.*;
import ws.woa.news.*;
public class NewsForm_jsp extends HttpJspBase {
private static java.util.Vector _jspx_includes;
public java.util.List getIncludes() {
return _jspx_includes;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
javax.servlet.jsp.PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=Shift_JIS");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\r\n");
/**
* WOA ニュース管理(ニュース一覧)
*/
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n\r\n");
ws.woa.news.NewsBean news = null;
synchronized (request) {
news = (ws.woa.news.NewsBean) pageContext.getAttribute("news", PageContext.REQUEST_SCOPE);
if (news == null){
try {
news = (ws.woa.news.NewsBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "ws.woa.news.NewsBean");
} catch (ClassNotFoundException exc) {
throw new InstantiationException(exc.getMessage());
} catch (Exception exc) {
throw new ServletException("Cannot create bean of class " + "ws.woa.news.NewsBean", exc);
}
pageContext.setAttribute("news", news, PageContext.REQUEST_SCOPE);
}
}
out.write("\r\n");
ws.woa.core.UserInfo[] users = null;
synchronized (request) {
users = (ws.woa.core.UserInfo[]) pageContext.getAttribute("users", PageContext.REQUEST_SCOPE);
if (users == null){
try {
users = (ws.woa.core.UserInfo[]) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "ws.woa.core.UserInfo[]");
} catch (ClassNotFoundException exc) {
throw new InstantiationException(exc.getMessage());
} catch (Exception exc) {
throw new ServletException("Cannot create bean of class " + "ws.woa.core.UserInfo[]", exc);
}
pageContext.setAttribute("users", users, PageContext.REQUEST_SCOPE);
}
}
out.write("\r\n");
ws.woa.core.GroupInfo[] groups = null;
synchronized (request) {
groups = (ws.woa.core.GroupInfo[]) pageContext.getAttribute("groups", PageContext.REQUEST_SCOPE);
if (groups == null){
try {
groups = (ws.woa.core.GroupInfo[]) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "ws.woa.core.GroupInfo[]");
} catch (ClassNotFoundException exc) {
throw new InstantiationException(exc.getMessage());
} catch (Exception exc) {
throw new ServletException("Cannot create bean of class " + "ws.woa.core.GroupInfo[]", exc);
}
pageContext.setAttribute("groups", groups, PageContext.REQUEST_SCOPE);
}
}
out.write("\r\n\r\n");
out.write("<SCRIPT LANGUAGE=\"JavaScript\">\r\n////////////////////////////////////////////////////\r\n// 送信時の入力チェック\r\nfunction submitCheck(){\r\n if(!checkNotEmpty('件名',document.Form1.Subject) ||\r\n !checkBytes('件名',document.Form1.Subject,200)||\r\n !checkNotEmpty('本文',document.Form1.Content)){\r\n return false;\r\n } else {\r\n ");
if(request.getParameter("Action").equals("REG_FORM")){
out.write("\r\n return confirm('登録します。よろしいですか?');\r\n ");
} else {
out.write("\r\n return confirm('更新します。よろしいですか?');\r\n ");
}
out.write("\r\n }\r\n}\r\n");
out.write("</SCRIPT>\r\n\r\n");
out.write("<h2>ニュース管理");
out.write("</h2>\r\n\r\n");
out.write("<form action=\"newsadmin.module\" method=\"POST\" name=\"Form1\" onsubmit=\"return submitCheck()\">\r\n");
out.write("<table>\r\n");
out.write("<tr>\r\n ");
out.write("<th width=\"100\">件名");
out.write("</th>\r\n ");
out.write("<td>");
out.write("<input type=\"text\" name=\"Subject\" size=\"60\" value=\"");
out.print( StrUtil.formFilter(news.getSubject()) );
out.write("\">");
out.write("</td>\r\n");
out.write("</tr>\r\n");
out.write("<tr>\r\n ");
out.write("<th>本文");
out.write("</th>\r\n ");
out.write("<td>");
out.write("<textarea name=\"Content\" cols=\"60\" rows=\"20\">");
out.print( StrUtil.formFilter(news.getContent()) );
out.write("</textarea>");
out.write("</td>\r\n");
out.write("</tr>\r\n");
out.write("<tr>\r\n ");
out.write("<th>閲覧許可");
out.write("</th>\r\n ");
out.write("<td>\r\n ");
out.print( new AcceptSetupForm("Form1",news.getAcceptFlag(),news.getAcceptID(),groups,users).toHTML() );
out.write("\r\n ");
out.write("</td>\r\n");
out.write("</tr>\r\n");
out.write("</table>\r\n");
out.write("<br>\r\n");
if(request.getParameter("Action").equals("REG_FORM")){
out.write("\r\n ");
out.write("<input type=\"submit\" value=\" 登 録 \">\r\n");
} else {
out.write("\r\n ");
out.write("<input type=\"submit\" value=\" 更 新 \">\r\n");
}
out.write("\r\n");
out.write("<input type=\"reset\" value=\"リセット\">\r\n");
out.write("<input type=\"button\" value=\" 戻 る \" onclick=\"history.back()\">\r\n\r\n");
if(request.getParameter("Action").equals("REG_FORM")){
out.write("\r\n ");
out.write("<input type=\"hidden\" name=\"Action\" value=\"REG_EXEC\">\r\n");
} else {
out.write("\r\n ");
out.write("<input type=\"hidden\" name=\"NewsID\" value=\"");
out.print( news.getNewsID() );
out.write("\">\r\n ");
out.write("<input type=\"hidden\" name=\"Action\" value=\"UPD_EXEC\">\r\n ");
out.write("<input type=\"hidden\" name=\"Page\" value=\"");
out.print( StrUtil.tagFilter(request.getParameter("Page")) );
out.write("\">\r\n");
}
out.write("\r\n");
out.write("</form>\r\n");
} catch (Throwable t) {
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -