| 1 |
<%-- |
| 2 |
Copyright 2005-2006 The Portal Application Laboratory Team. |
| 3 |
|
| 4 |
Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 |
you may not use this file except in compliance with the License. |
| 6 |
You may obtain a copy of the License at |
| 7 |
http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
Unless required by applicable law or agreed to in writing, software |
| 9 |
distributed under the License is distributed on an "AS IS" BASIS, |
| 10 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 |
See the License for the specific language governing permissions and |
| 12 |
limitations under the License. |
| 13 |
--%> |
| 14 |
|
| 15 |
<%@ taglib uri='http://java.sun.com/portlet' prefix='portlet'%> |
| 16 |
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> |
| 17 |
<%@ page import="java.util.*"%> |
| 18 |
|
| 19 |
<jsp:useBean id="weather" class="jp.sf.pal.weather.Weather" scope="request" /> |
| 20 |
<fmt:setBundle basename="jp.sf.pal.weather.resources.WeatherResources" /> |
| 21 |
<portlet:defineObjects/> |
| 22 |
|
| 23 |
<form action="<portlet:actionURL />" method="POST"> |
| 24 |
<table width="100%" border="1"> |
| 25 |
<tr> |
| 26 |
<td colspan="2" align="center"> |
| 27 |
<a href="<jsp:getProperty name="weather" property="link" />" style="font-size:x-small;"> |
| 28 |
<jsp:getProperty name="weather" property="title" /> |
| 29 |
</a> |
| 30 |
</td> |
| 31 |
</tr> |
| 32 |
<tr> |
| 33 |
<td colspan="2" align="center"> |
| 34 |
<span style="font-size:x-small">( |
| 35 |
<fmt:message key="weather.label.Publictime"/>: |
| 36 |
<jsp:getProperty name="weather" property="publictime" /> |
| 37 |
) |
| 38 |
</span> |
| 39 |
</td> |
| 40 |
</tr> |
| 41 |
<tr> |
| 42 |
<td align="center" colspan="2"> |
| 43 |
<a href="<jsp:getProperty name="weather" property="imgLink" />"> |
| 44 |
<img src="<jsp:getProperty name="weather" property="imgUrl" />" |
| 45 |
alt="<jsp:getProperty name="weather" property="imgTitle" />" |
| 46 |
width="<jsp:getProperty name="weather" property="imgWidth" />" |
| 47 |
height="<jsp:getProperty name="weather" property="imgHeight" />" |
| 48 |
border="0" /> |
| 49 |
</a> |
| 50 |
</td> |
| 51 |
</tr> |
| 52 |
<tr> |
| 53 |
<td align="center" colspan="2" style="font-size: x-small;"> |
| 54 |
<jsp:getProperty name="weather" property="telop" /></td> |
| 55 |
</tr> |
| 56 |
<tr> |
| 57 |
<td align="right" style="font-size: x-small;" width="10%"> |
| 58 |
<fmt:message key="weather.label.Overview"/>:</td> |
| 59 |
<td align="left" style="font-size: x-small"> |
| 60 |
<jsp:getProperty name="weather" property="description" /> |
| 61 |
</td> |
| 62 |
</tr> |
| 63 |
<tr> |
| 64 |
<td align="center" colspan="2"> |
| 65 |
<a href="<jsp:getProperty name="weather" property="copyrightLink" />" style="font-size:x-small"> |
| 66 |
<jsp:getProperty name="weather" property="copyrightTitle" /> |
| 67 |
</a> |
| 68 |
</td> |
| 69 |
</tr> |
| 70 |
<tr> |
| 71 |
<td align="right" width="10%" style="font-size: x-small;"> |
| 72 |
<fmt:message key="weather.label.Area"/>: |
| 73 |
</td> |
| 74 |
<td align="center"> |
| 75 |
<select name="city"> |
| 76 |
<option value="default"><fmt:message key="weather.label.SelectArea"/> </option> |
| 77 |
<% |
| 78 |
Map cityMap = (Map)renderRequest.getAttribute("city") ; |
| 79 |
String reqId = (String)renderRequest.getAttribute("id") ; |
| 80 |
Iterator it = cityMap.keySet().iterator() ; |
| 81 |
while (it.hasNext()) { |
| 82 |
Integer id = (Integer)it.next() ; |
| 83 |
String cityId = id.toString() ; |
| 84 |
String cityName = (String)cityMap.get(id) ; |
| 85 |
String selected = "" ; |
| 86 |
if (reqId.equals(cityId)) { |
| 87 |
selected = "selected" ; |
| 88 |
} |
| 89 |
%> |
| 90 |
<option value="<%= cityId %>" <%= selected %>><%= cityName %></option> |
| 91 |
<% |
| 92 |
} |
| 93 |
%> |
| 94 |
</select> |
| 95 |
</td> |
| 96 |
</tr> |
| 97 |
<tr> |
| 98 |
<td colspan="2" align="center"> |
| 99 |
<input type="submit" value="<fmt:message key="weather.label.Submit"/>"> |
| 100 |
</td> |
| 101 |
</tr> |
| 102 |
</table> |
| 103 |
</form> |