Strabon

changeset 546:b67d9d491156

Remember drop-down menu selections in endpoint.
Fixes Ticket #11: http://bug.strabon.di.uoa.gr/ticket/11
author Babis Nikolaou <charnik@di.uoa.gr>
date Fri Sep 14 20:55:57 2012 +0300 (2012-09-14)
parents 4ae6d7c860a5
children 8b1b2a49ebf6
files endpoint/WebContent/query.jsp endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/Common.java
line diff
     1.1 --- a/endpoint/WebContent/query.jsp	Fri Sep 14 13:39:05 2012 +0300
     1.2 +++ b/endpoint/WebContent/query.jsp	Fri Sep 14 20:55:57 2012 +0300
     1.3 @@ -142,10 +142,10 @@
     1.4  <tr>
     1.5  	<td id="output"><center>View Result:<br/>
     1.6  	<SELECT name="handle" title="select how you would like to view the result">
     1.7 -		<OPTION value="plain">Plain result</OPTION>
     1.8 -		<OPTION value="download">Download</OPTION>
     1.9 -		<OPTION value="map">On a map</OPTION>
    1.10 -		<OPTION value="map_local">On a map (localhost)</OPTION>
    1.11 +		<OPTION value="plain"<%= ("plain".equals(request.getAttribute("handle"))) ? "selected":""%>>Plain</OPTION>
    1.12 +		<OPTION value="download"<%= ("download".equals(request.getAttribute("handle"))) ? "selected":""%>>Download</OPTION>
    1.13 +		<OPTION value="map"<%= ("map".equals(request.getAttribute("handle"))) ? "selected":""%>>On a map</OPTION>
    1.14 +		<OPTION value="map_local"<%= ("map_local".equals(request.getAttribute("handle"))) ? "selected":""%>>On a map (localhost)</OPTION>
    1.15  	</SELECT></center>
    1.16  	</td>
    1.17  	<td colspan=2>&nbsp;</td>
     2.1 --- a/endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/Common.java	Fri Sep 14 13:39:05 2012 +0300
     2.2 +++ b/endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/Common.java	Fri Sep 14 20:55:57 2012 +0300
     2.3 @@ -70,6 +70,12 @@
     2.4  		}
     2.5  	}
     2.6  	
     2.7 +	/**
     2.8 +	 * Method for getting the name of the HTML stSPARQLQueryResultFormat
     2.9 +	 * in .jsp pages.
    2.10 +	 * 
    2.11 +	 * @return
    2.12 +	 */
    2.13  	public static final String getHTMLFormat() {
    2.14  		return stSPARQLQueryResultFormat.HTML.getName();
    2.15  	}