| [comment encoding = UTF-8 /] |
| [comment |
| <%-- |
| Copyright (c) 2011, 2012 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 |
| and Eclipse Distribution License v. 1.0 which accompanies this distribution. |
| |
| The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html |
| and the Eclipse Distribution License is available at |
| http://www.eclipse.org/org/documents/edl-v10.php. |
| |
| Contributors: |
| |
| Sam Padgett - initial API and implementation |
| Michael Fiedler - adapted for OSLC4J |
| Jad El-khoury - initial implementation of code generator (https://bugs.eclipse.org/bugs/show_bug.cgi?id=422448) |
| --%> |
| /] |
| |
| [module generateResourceSelectorJsp('http://org.eclipse.lyo/oslc4j/adaptorInterface')] |
| |
| [import org::eclipse::lyo::oslc4j::codegenerator::services::services/] |
| [import org::eclipse::lyo::oslc4j::codegenerator::services::resourceServices/] |
| [import org::eclipse::lyo::oslc4j::codegenerator::services::resourcePropertyServices/] |
| [import org::eclipse::lyo::oslc4j::codegenerator::services::jspServices/] |
| [import org::eclipse::lyo::oslc4j::codegenerator::services::adaptorInterfaceServices/] |
| |
| [template public generateResourceSelectorJsp(aSelectionDialog: Dialog)] |
| [file (resourceSelectorJspFullFileName(aSelectionDialog), false, 'UTF-8')] |
| [let anAdaptorInterface: AdaptorInterface = containingAdaptorInterface(aSelectionDialog)] |
| <!DOCTYPE html> |
| <%-- |
| Copyright (c) 2011, 2012 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 |
| and Eclipse Distribution License v. 1.0 which accompanies this distribution. |
| |
| The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html |
| and the Eclipse Distribution License is available at |
| http://www.eclipse.org/org/documents/edl-v10.php. |
| |
| Contributors: |
| |
| Sam Padgett - initial API and implementation |
| Michael Fiedler - adapted for OSLC4J |
| Jad El-khoury - initial implementation of code generator (https://bugs.eclipse.org/bugs/show_bug.cgi?id=422448) |
| |
| This file is generated by org.eclipse.lyo.oslc4j.codegenerator |
| --%> |
| <%--[protected ('"body"')] |
| TODO: Replace/adjust this default content as necessary. |
| All manual changes in this "protected" user code area will NOT be overwritten upon subsequent code generations. |
| To revert to the default generated content, delete all content in this file, and then re-generate. |
| --%> |
| |
| <%@page import="org.eclipse.lyo.oslc4j.core.model.ServiceProvider"%> |
| [for (aResource: Resource | aSelectionDialog.resourceTypes)] |
| <%@page import="[javaClassFullName(aResource, anAdaptorInterface, null) /]"%> |
| [/for] |
| <%@page import="org.eclipse.lyo.oslc4j.core.OSLC4JUtils"%> |
| <%@page import="javax.ws.rs.core.UriBuilder"%> |
| |
| <%@ page contentType="text/html" language="java" pageEncoding="UTF-8" %> |
| |
| <% |
| String selectionUri = (String) request.getAttribute("selectionUri"); |
| |
| %> |
| |
| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> |
| <title>[aSelectionDialog.title/]</title> |
| <script type="text/javascript" src="<%=UriBuilder.fromUri(OSLC4JUtils.getPublicURI()).path("[delegatedUIJavaScriptsRelativeFileName(anAdaptorInterface)/]").build().toString()%>"></script> |
| </head> |
| [comment TODO: make a more powerfull/flexible search form, by allowing user to entry values on each resource property, and not just "summary" as is expected here./] |
| <body style="padding: 10px;"> |
| <div id="selector-body"> |
| <p id="searchMessage">Find a specific resource through a free-text search.</p> |
| |
| <p id="loadingMessage" style="display: none;">Pondering your search. Please stand by ...</p> |
| |
| <div> |
| <input type="search" style="width: 335px" id="searchTerms" placeholder="Enter search terms" autofocus> |
| <button type="button" onclick="search( '<%= selectionUri %>' )">Search</button> |
| </div> |
| |
| <div style="margin-top: 5px;"> |
| <select id="results" size="10" style="width: 400px" multiple="multiple"></select> |
| </div> |
| |
| <div style="width: 400px; margin-top: 5px;"> |
| <button style="float: right;" type="button" |
| onclick="javascript: cancel()">Cancel</button> |
| <button style="float: right;" type="button" |
| onclick="javascript: select();">OK</button> |
| </div> |
| <div style="clear: both;"></div> |
| </div> |
| |
| </body> |
| </html> |
| <%--[/protected]--%> |
| [/let] |
| [/file] |
| [/template] |