Subversion Repositories bacoAlunos

Rev

Rev 2009 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2009 Rev 2018
Line 1... Line 1...
1
<%@ page import="pt.estgp.es.exemplos.hibernate.HibernateUtils" %>
1
<%@ page import="pt.estgp.es.exemplos.hibernate.HibernateUtils" %>
2
<%@ page import="pt.estgp.es.exemplos.hibernate.Pagina" %>
2
<%@ page import="pt.estgp.es.exemplos.hibernate.Pagina" %>
3
<%@ page import="pt.estgp.es.exemplos.hibernate.Seccao" %><%--
3
<%@ page import="pt.estgp.es.exemplos.hibernate.Seccao" %>
-
 
4
<%@ page import="pt.estgp.es.exemplos.hibernate.web.SecurityFilter" %><%--
4
  Created by IntelliJ IDEA.
5
  Created by IntelliJ IDEA.
5
  User: jmachado
6
  User: jmachado
6
  Date: 29/10/2018
7
  Date: 29/10/2018
7
  Time: 15:03
8
  Time: 15:03
8
  To change this template use File | Settings | File Templates.
9
  To change this template use File | Settings | File Templates.
9
--%>
10
--%>
10
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
11
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-
 
12
<jsp:useBean scope="request" id="UserSession" type="pt.estgp.es.exemplos.hibernate.UserSession"/>
-
 
13
 
11
<html>
14
<html>
12
<head>
15
<head>
13
    <title></title>
16
    <title></title>
14
</head>
17
</head>
15
<body>
18
<body>
16
 
19
 
-
 
20
Olá ${UserSession.user.nome} estamos a ver uma página.
-
 
21
 
17
    <%
22
<%
18
 
23
 
-
 
24
    pt.estgp.es.exemplos.hibernate.UserSession sess = SecurityFilter.loadSessionProxy(request);
19
        String id = request.getParameter("id");
25
    String id = request.getParameter("id");
20
        HibernateUtils.getCurrentSession().beginTransaction();
26
    HibernateUtils.getCurrentSession().beginTransaction();
21
 
27
 
22
        Long idLong = id != null ? new Long(id) : (Long) request.getAttribute("id");
28
    Long idLong = id != null ? new Long(id) : (Long) request.getAttribute("id");
23
 
29
 
Line 42... Line 48...
42
    </form>
48
</form>
43
 
49
 
44
    <%
50
<%
45
        for(Seccao s: p.getSeccoes())
51
    for(Seccao s: p.getSeccoes())
46
        {
52
    {
-
 
53
 
-
 
54
 
47
    %>
55
%>
48
        <h2><%=s.getTitulo()%>
56
<h2><%=s.getTitulo()%>
49
            <a href="<%=request.getContextPath()%>/paginasDelete?idSeccao=<%=s.getId()%>">
57
    <a href="<%=request.getContextPath()%>/paginasDelete?idSeccao=<%=s.getId()%>">
50
                APAGAR
58
        APAGAR
51
            </a>
59
    </a>