Rev 1345 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1345 | Rev 1348 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | package pt.estgp.estgweb.web.controllers; |
1 | package pt.estgp.estgweb.web.controllers; |
2 | 2 | ||
3 | import org.apache.struts.action.ActionForm; |
3 | import org.apache.struts.action.ActionForm; |
4 | import org.apache.struts.action.ActionForward; |
4 | import org.apache.struts.action.ActionForward; |
5 | import org.apache.struts.action.ActionMapping; |
5 | import org.apache.struts.action.ActionMapping; |
- | 6 | import pt.estgp.estgweb.domain.views.UserView; |
|
6 | import pt.estgp.estgweb.web.form.CertificadoForm; |
7 | import pt.estgp.estgweb.web.form.CertificadoForm; |
7 | import pt.estgp.estgweb.web.utils.RequestUtils; |
8 | import pt.estgp.estgweb.web.utils.RequestUtils; |
8 | import pt.utl.ist.berserk.logic.serviceManager.IServiceManager; |
9 | import pt.utl.ist.berserk.logic.serviceManager.IServiceManager; |
9 | import pt.utl.ist.berserk.logic.serviceManager.ServiceManager; |
10 | import pt.utl.ist.berserk.logic.serviceManager.ServiceManager; |
10 | 11 | ||
11 | import javax.servlet.http.HttpServletRequest; |
12 | import javax.servlet.http.HttpServletRequest; |
12 | import javax.servlet.http.HttpServletResponse; |
13 | import javax.servlet.http.HttpServletResponse; |
- | 14 | import java.util.List; |
|
13 | 15 | ||
14 | /** |
16 | /** |
15 | * Created by jorgemachado on 05/04/16. |
17 | * Created by jorgemachado on 05/04/16. |
16 | */ |
18 | */ |
17 | public class CertificadoController extends ApplicationDispatchController |
19 | public class CertificadoController extends ApplicationDispatchController |
Line 35... | Line 37... | ||
35 | 1.5.0/docs/api/java/lang/System.html">System.out.println("Cetificado Criado=" + certificado); |
37 | 1.5.0/docs/api/java/lang/System.html">System.out.println("Cetificado Criado=" + certificado); |
36 | 38 | ||
37 | return mapping.findForward("criado"); |
39 | return mapping.findForward("criado"); |
38 | 40 | ||
39 | } |
41 | } |
- | 42 | ||
- | 43 | public ActionForward searchUsers(ActionMapping mapping, |
|
- | 44 | ActionForm form, |
|
- | 45 | HttpServletRequest request, |
|
- | 46 | HttpServletResponse response) |
|
- | 47 | throws 1.5.0/docs/api/java/lang/Throwable.html">Throwable { |
|
- | 48 | ||
- | 49 | CertificadoForm frm = (CertificadoForm) form; |
|
- | 50 | ||
- | 51 | 1.5.0/docs/api/java/lang/System.html">System.out.println("USER PEDIDO=" + frm.getUserId()); |
|
- | 52 | ||
- | 53 | IServiceManager sm = ServiceManager.getInstance(); |
|
- | 54 | 5+0%2Fdocs%2Fapi+Object">Object[] args = new 5+0%2Fdocs%2Fapi+Object">Object[]{frm.getTextoPesquisar(),null}; |
|
- | 55 | List<UserView> users = (List<UserView>) sm.execute( |
|
- | 56 | RequestUtils.getRequester(request, response), "SearchUser", args); |
|
- | 57 | ||
- | 58 | frm.setUsers(users); |
|
- | 59 | 1.5.0/docs/api/java/lang/System.html">System.out.println("Encontrados " + users.size()); |
|
- | 60 | ||
- | 61 | return mapping.getInputForward(); |
|
- | 62 | ||
- | 63 | } |
|
40 | } |
64 | } |