JSP - ComboBox

0 respostas
TDS

Pessoal to com um problema com combos!!! Vejam se podem me ajudar!!!

Form

public class ClienteForm extends ValidatorForm {
private String gatID;

/**

* @return Returns the gatID.

<em>/

public String getGatID() {

return this.gatID;

}

/</em>*

* @param gatID The gatID to set.

*/

public void setGatID(String gatID) {

this.gatID = gatID;

}

}

Minha Action

public ActionForward execute(ActionMapping mapping, ActionForm form,
        HttpServletRequest request, HttpServletResponse response) {
    String target = "success";
    // Get the form bean
    ClienteForm f = (ClienteForm) form;
    GatTO gTO = new GatTO();
    GatFacade facade;
    try {
        facade = GatFacade.getInstance();
        Collection gats = facade.selectGATAll();
        request.setAttribute("gats", gats);
    } catch (FacadeException e) {
        log.error("Erro.:" + e.getMessage());
		request.setAttribute("msgInfo", e.getMessage());
		ActionErrors errors = new ActionErrors();			
		errors.add(ActionErrors.GLOBAL_ERROR,new ActionError("error no select",e.getMessage()));
		saveErrors(request,errors);
    }
    
    return (mapping.findForward(target));

}

Página jsp
<logic:notEmpty name=“clienteForm”>
<html:select name=“clienteForm” property=“gatID”>
<html:option value="">Select One</html:option>
<html:options collection=“gats” property=“gatID” labelProperty=“name”/>
</html:select>
</logic:notEmpty>

O erro que esta dando:

javax.servlet.ServletException: Cannot find bean under name gats

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)

org.apache.jsp.cadCliente_jsp._jspService(cadCliente_jsp.java:132)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Alguém já passou por isto. Sou iniciante e não consigo entender o erro(traduzir eu consigo, mas não entendo como posso corrigí-lo!!!).
O Struts-config esta funcionando perfeito, pois se eu tiro o combo e coloco outro campo na página funciona. Mas se tiver que mexer em alguma coisa nele me avisem!!!
Obrigado!!! Alguma ajuda dica…Sei lá ficarei muito grato!!!

Criado 21 de outubro de 2004
Respostas 0
Participantes 1