<%@ page contentType="text/html;charset=Shift_JIS" language="java" %>
<%-- 共通ページヘッダ --%>
<%@ include file="/jsp/common/PageHeader.inc" %>
<%-- bean --%>
<jsp:useBean id="selectionControl" scope="session" type="SelectionControl" />
<jsp:useBean id="selection" scope="session" type="ISelection" />

<html:html locale="true">
<head>
<title>区分登録変更</title>
<html:base/>
<LINK rel="stylesheet" href="style.css">
</head>
<body>
<!--======================= メニュー ==============================-->
<%@ include file="/jsp/common/Menu9.inc" %>
<!--======================= メニュー end ==========================-->
<font color="red"><html:errors/></font>
<html:form action="/selectionEdit">
  <TABLE cellpadding="3" cellspacing="1">
    <TR> 
      <TD class="label3" colspan="2">
         <%= selectionControl.getTableNameJapanese() %>の設定内容
      </TD>
    </TR>
    <TR> 
<%    if (selectionControl.getAction().equals("add")) { 
%>
        <td class="label2"><font color="red">*</font>コード： </td>
        <td class="bak1"> 
          <html:text property="code" size="10" maxlength="2" />
        </td>
<%    } else {
%>
        <td class="label2">コード： </td>
        <TD class="bak1">
           <%= selection.getCode() %>
        </TD>
<%    }
%>
    </TR>
    <TR> 
<%    if ((selectionControl.getAction().equals("add")) || 
          (selectionControl.getAction().equals("update"))) {
%>
        <TD class="label2"> 
          <font color="red">*</font>名称：
        </TD>
        <TD class="bak1"> 
          <html:text property="name" size="66" maxlength="64" />
        </TD>
<%    } else {
%>
        <td class="label2">名称： </td>
        <TD class="bak1">
           <%= selection.getName() %>
        </TD>
<%    }
%>
    </TR>
    <TR> 
<%    if ((selectionControl.getAction().equals("add")) || 
          (selectionControl.getAction().equals("update"))) {
%>
          <TD class="label2">
            <font color="red">*</font>略称：
          </TD>
          <TD class="bak1"> 
            <html:text property="shortName" size="40" maxlength="40" />
          </TD>
<%    } else {
%>
          <td class="label2">略称： </td>
          <TD class="bak1">
             <%= selection.getShortName() %>
          </TD>
<%    }
%>
    </TR>
    <tr> 
<%    if ((selectionControl.getAction().equals("add")) || 
          (selectionControl.getAction().equals("update"))) {
%>
        <td class="label2">説明：</td>
        <td class="bak1"> 
          <html:textarea property="info" cols="64" rows="5" />
        </td>
<%    } else {
%>
        <td class="label2">説明： </td>
        <TD class="bak1">
           <%= selection.getInfo() %>
        </TD>
<%    }
%>
    </tr>
    <tr> 
      <td colspan="2">
<%      String label = null;
        String action = selectionControl.getAction();
        if (action.equals("add")) {
            label = "追加";
        } else if (action.equals("update")) {
            label = "更新";
        } else if (action.equals("delete")) {
            label = "削除";
        }
%>
        <html:submit value="<%= label %>" property="submit" />
        <html:reset value="リセットする" />
        <html:link forward="/selection" paramId="t" paramName="selectionControl" paramProperty="tableName">一覧へ戻る</html:link><br>
      </td>
    </tr>
  </table>
</html:form>

<%-- 共通ページフッダ --%>
<%@ include file="/jsp/common/PageFooter.inc" %>
</body>
</html:html>
