Skip to main content
summaryrefslogtreecommitdiffstats
blob: bc1a670a4830b71640c14d62b90eb6d43020166d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<%
/*******************************************************************************
 * Copyright (c) 2001, 2006 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 * IBM Corporation - initial API and implementation
 * yyyymmdd bug      Email and other contact information
 * -------- -------- -----------------------------------------------------------
 * 20060427   127443 jesper@selskabet.org - Jesper S Moller
 *******************************************************************************/
%>
<%@ page contentType="text/html; charset=UTF-8" import="org.eclipse.wst.ws.internal.explorer.platform.constants.*,
                                                                                          org.eclipse.wst.ws.internal.explorer.platform.perspective.*,
                                                                                          org.eclipse.wst.ws.internal.explorer.platform.util.*,
                                                                                          org.eclipse.core.resources.*,
                                                                                          org.eclipse.core.runtime.*" %>

<jsp:useBean id="controller" class="org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller" scope="session"/>
<jsp:useBean id="formProperties" class="java.util.Hashtable" scope="request"/>
<script language="javascript">
  function toggleDivContainer(divId)
  {
    var divContainer = document.getElementById(divId);
    if (divContainer.style.display == "none")
      divContainer.style.display = "";
    else
      divContainer.style.display = "none";
  }
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html lang="<%=response.getLocale().getLanguage()%>">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title><%=controller.getMessage("FORM_TITLE_IMPORT_TO_WORKBENCH")%></title>
  <link rel="stylesheet" type="text/css" href="<%=response.encodeURL(controller.getPathWithContext("css/windows.css"))%>">
  <jsp:include page="/scripts/formsubmit.jsp" flush="true"/>
  <jsp:include page="/scripts/formutils.jsp" flush="true"/>
</head>
<body dir="<%=org.eclipse.wst.ws.internal.explorer.platform.util.DirUtils.getDir()%>" class="contentbodymargin">
<div id="contentborder">

  <form action="<%=response.encodeURL(controller.getPathWithContext((String)formProperties.get("formActionLink")))%>" method="post" target="<%=FrameNames.PERSPECTIVE_WORKAREA%>" enctype="multipart/form-data">

  <%
  String titleImagePath = "images/import_to_workbench_highlighted.gif";
  String title = controller.getMessage("ALT_IMPORT_WSDL_TO_WORKBENCH");
  %>
  <%@ include file = "/forms/formheader.inc" %>
  <table>
    <tr>
      <td>
        <%=controller.getMessage("FORM_LABEL_IMPORT_TO_WORKBENCH_DESC")%>
      </td>
    </tr>
  </table>
  <table>
    <tr>
      <td class="labels" height=40 valign="center">
        <label for="select_workbench_project_name"><%=controller.getMessage("WORKBENCH_PROJECT_NAME")%></label>
      </td>
      <td class="labels" height=40 valign="center" nowrap>
        <%
        IWorkspaceRoot iWorkspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
        IProject[] projects = iWorkspaceRoot.getProjects();
        %>
        <select id="select_workbench_project_name" name="<%=ActionInputs.WORKBENCH_PROJECT_NAME%>" class="selectlist">
        <%
        for (int i = 0; i < projects.length; i++) {
          try {
            if (!projects[i].isOpen())
              continue;
            String projectName = projects[i].getName();
        %>
        <option value="<%=projectName%>"><%=projectName%>
        <%
          }
          catch (Exception e) {}
        }
        %>
        </select>
      </td>
    </tr>
  </table>

  <table width="95%" border=0 cellpadding=3 cellspacing=0>
    <tr>
      <td class="labels" height=10 valign="bottom">
        <input type="checkbox" checked id="input_import_wsdl" name="<%=ActionInputs.IMPORT_FILE%>" value="<%=ActionInputs.IMPORT_FILE%>" onClick="toggleDivContainer('div_import_wsdl')">
        <label for="input_import_wsdl"><%=controller.getMessage("LABEL_IMPORT_WSDL")%></label>
      </td>
    </tr>
  </table>
  <div id="div_import_wsdl">
    <table width="95%" border=0 cellpadding=3 cellspacing=0>
      <tr>
        <td>
          <label for="input_imported_wsdl_file_name"><%=controller.getMessage("IMPORTED_WSDL_FILE_NAME")%></label>
        </td>
      </tr>
      <tr>
        <td height=10 valign="bottom" width="60%">
<%
 String wsdlFileName="temp.wsdl";
 String wsdlURL = (String)formProperties.get("wsdlURL");
 if (wsdlURL != null && wsdlURL.endsWith(".wsdl"))
 {
   int lastSeparatorPos = Math.max(wsdlURL.lastIndexOf("/"),wsdlURL.lastIndexOf("\\"));
   if (lastSeparatorPos > 0)
     wsdlFileName = wsdlURL.substring(lastSeparatorPos+1,wsdlURL.length());
 }
%>   
          <input type="text" id="input_imported_wsdl_file_name" name="<%=ActionInputs.IMPORTED_FILE_NAME%>" value="<%=HTMLUtils.charactersToHTMLEntitiesStrict(wsdlFileName)%>" size=50 class="textenter">
        </td>
      </tr>
    </table>
  </div>

  <table width="95%" border=0 cellpadding=3 cellspacing=0>
    <tr>
      <td class="labels" height=10 valign="bottom">&nbsp;</td>
    </tr>
  </table>

  <input type="hidden" name="<%=ActionInputs.IMPORTED_WSDL_URL%>" value="<%=wsdlURL%>">
  <table width="95%" border=0 cellpadding=3 cellspacing=0>
    <tr>
      <td class="labels" height=10 valign="bottom">
        <input type="checkbox" id="input_import_wsil" name="<%=ActionInputs.IMPORT_TO_WSIL%>" value="<%=ActionInputs.IMPORT_TO_WSIL%>" onClick="toggleDivContainer('div_import_wsil')">
        <label for="input_import_wsil"><%=controller.getMessage("LABEL_IMPORT_TO_WSIL")%></label>
      </td>
    </tr>
  </table>
  <div id="div_import_wsil" style="display:none;">
    <table width="95%" border=0 cellpadding=3 cellspacing=0>
      <tr>
        <td class="labels" height=10 valign="bottom">
          <label for="input_imported_wsil_file_name"><%=controller.getMessage("WSIL_FILE_NAME")%></label>
        </td>
      </tr>
      <tr>
        <td height=10 valign="bottom" width="60%">
<%
 String wsilFileName = (String)formProperties.get("wsilFileName");
 if (wsilFileName == null || wsilFileName.length() <= 0)
   wsilFileName = wsdlFileName.substring(0, wsdlFileName.length()-4) + "wsil";
%>   
          <input type="text" id="input_imported_wsil_file_name" name="<%=ActionInputs.WSIL_FILE_NAME%>" value="<%=HTMLUtils.charactersToHTMLEntitiesStrict(wsilFileName)%>" size=50 class="textenter">
        </td>
      </tr>
    </table>
  </div>

<jsp:include page="/forms/simpleCommon_table.jsp" flush="true"/>    
  </form>
</div>
</body>
</html>

Back to the top