source: extensions/net.sf.basedb.examples/trunk/resources/hello_world.xjsp @ 661

Last change on this file since 661 was 661, checked in by Nicklas Nordborg, 14 years ago

References #103: Create example extensions

Added X-JSP example

File size: 1.1 KB
Line 
1<%@ page session="false"
2  import="net.sf.basedb.core.User"
3  import="net.sf.basedb.clients.web.util.HTML"
4  import="net.sf.basedb.examples.extensions.HelloXJspWorld"
5%>
6<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
7<%
8
9final HelloXJspWorld hello = new HelloXJspWorld(pageContext);
10final String ID = hello.getSessionId();
11final User current = hello.getLoggedInUser();
12
13%>
14  <base:page type="popup" title="Hello X-JSP world">
15  <base:head />
16  <base:body>
17    <h3 class="docked">Hello <%=HTML.encodeTags(current.getName())%></h3>
18    <div class="boxedbottom">
19      Here are your settings:
20      <table class="form" border="0" cellspacing="1" cellpadding="2">
21      <tr>
22        <td class="prompt">Session ID</td>
23        <td><%=ID%></td>
24      </tr>
25      <tr>
26        <td class="prompt">Login</td>
27        <td><%=HTML.encodeTags(current.getLogin())%></td>
28      </tr>
29      <tr>
30        <td class="prompt">Email</td>
31        <td><%=HTML.niceFormat(current.getEmail())%></td>
32      </tr>
33      </table>
34    </div>
35    <br>
36    <table align="center">
37    <tr>
38      <td><base:button onclick="window.close()" title="Close" /></td>
39    </tr>
40    </table>
41    </form>
42  </base:body>
43  </base:page>
44
Note: See TracBrowser for help on using the repository browser.