3,6 → 3,7 |
import org.apache.struts.action.ActionForm; |
import org.apache.struts.action.ActionForward; |
import org.apache.struts.action.ActionMapping; |
import pt.estgp.estgweb.domain.views.UserView; |
import pt.estgp.estgweb.web.form.CertificadoForm; |
import pt.estgp.estgweb.web.utils.RequestUtils; |
import pt.utl.ist.berserk.logic.serviceManager.IServiceManager; |
10,6 → 11,7 |
|
import javax.servlet.http.HttpServletRequest; |
import javax.servlet.http.HttpServletResponse; |
import java.util.List; |
|
/** |
* Created by jorgemachado on 05/04/16. |
37,4 → 39,26 |
return mapping.findForward("criado"); |
|
} |
|
public ActionForward searchUsers(ActionMapping mapping, |
ActionForm form, |
HttpServletRequest request, |
HttpServletResponse response) |
throws Throwable { |
|
CertificadoForm frm = (CertificadoForm) form; |
|
System.out.println("USER PEDIDO=" + frm.getUserId()); |
|
IServiceManager sm = ServiceManager.getInstance(); |
Object[] args = new Object[]{frm.getTextoPesquisar(),null}; |
List<UserView> users = (List<UserView>) sm.execute( |
RequestUtils.getRequester(request, response), "SearchUser", args); |
|
frm.setUsers(users); |
System.out.println("Encontrados " + users.size()); |
|
return mapping.getInputForward(); |
|
} |
} |