List Info

Thread: Re: pls help with exception




Re: pls help with exception
country flaguser name
Spain
2007-09-24 08:17:58
I've been studing your code and all seems to be in order. Sorry about don't help you!

----- Mensaje original ----
De: Alonso Isidoro Roman <alonsoirgmail.com&gt;
Para: MyFaces Discussion <usersmyfaces.apache.org>;
Enviado: lunes, 24 de septiembre, 2007 13:54:48
Asunto: Re: pls help with exception

ok, no problem!

El día 24/09/07, Martin Marinschek < martin.marinschekgmail.com" target=_blank rel=nofollow>martin.marinschekgmail.com> escribió:
Hi guys,

don't want to sound pedantic, but please stay in English while
discussing here on the list - except you mark the conversation clearly
as off-topic and explain why you have to write in a language apart
from English.

regards,

Martin

On 9/24/07, Alonso Isidoro Roman < alonsoirgmail.com" target=_blank rel=nofollow>alonsoirgmail.com> wrote:
> Buenos dias Angel, ojala puedas ayudarme
&gt; /*
>&nbsp; * YellProxy.java
>&nbsp; *
 * Created on 13 de septiembre de 2007, 11:59
>  ;*
>&nbsp; * To change this template, choose Tools | Template Manager
; * and open the template in the editor.
&gt; &nbsp;*/
>
> package es.yell.frontlite.servlets;
>
> import java.util.Collection;
> import java.util.Locale;
>; import java.util.ResourceBundle ;
>
>; import javax.faces.context.FacesContext;
> import javax.faces.event.ActionEvent ;
> import javax.faces.event.ValueChangeEvent;
> import javax.faces.model.SelectItem;
&gt; import org.springframework.beans.factory.InitializingBean ;
> import es.yell.frontlite.service.impl.*;
> import org.springframework.util.Assert ;
> /**
>&nbsp; * Esta clase va a hacer las siguientes acciones:
> &nbsp;* Averiguar quien es el cliente, IE, firefox, PDA.
; * Averiguar si tiene el js activado.
> &nbsp;* en funcion si tiene el js activado o no, redirijo la peticion a un
> servicio u otro
>&nbsp; * la peticion que hace el cliente
&gt; &nbsp;* author operador
&gt; &nbsp;*/
> public class YellProxy{
>
>&nbsp;   ; //campo que sirve para almacenar el resultado de la operacion que se
> hace en el cliente para ver si js esta activado.
> &nbsp;   private String jsActivado;
; &nbsp;  //campo que representa la identidad del navegador, IE, firefox...
  ;  private String quienSoy;
> &nbsp;   //campos que van a almacenar los campos que y donde de la pagina ppal.
>  ; &nbsp; &nbsp;private String campoQue;
; &nbsp;  //a este campo habra que destokenizar para rellenar los siguientes
> campos, direccion, localidad y cp
>&nbsp; &nbsp;  private String campoDonde;
; &nbsp;  //atributo que pasamos al servicio con los parametros que nos da el
> formulario de la jsp
>&nbsp; &nbsp;  private BusquedaVO busquedaVO;
; &nbsp;  //el servicio que nos da acceso a la capa de datos.INYECTADO
>&nbsp;   ; private SrvBusquedaNoxtrumServiceImpl servicio;
> &nbsp;   //atributo q contiene toda la informacion cuando utilizamos AJAX
; &nbsp;  private String xml;
>&nbsp;   ; //atributo q contiene toda la informacion cuando no utilizamos AJAX
>&nbsp;   ; private Collection coleccion;
  ;  /** Creates a new instance of YellProxy */
>&nbsp; &nbsp;  public YellProxy() {
; &nbsp; &nbsp; }
> &nbsp;   /**
>&nbsp; &nbsp;   ;*Este metodo responde al evento del boton encuentra que esta en la
> pagina principal.
  ; &nbsp; *Basicamente va a destokenizar el campo campoDonde en los subcampos
> Direccion, localidad y CP.
>&nbsp; &nbsp;   ;*Tambien y dependiendo de si el cliente tiene activado o no el js,
> ejecutaremos un servicio u otro.
>  ; &nbsp; */
>&nbsp; &nbsp;  public String encuentra(){
>&nbsp; &nbsp; &nbsp; &nbsp;  //deja los atributos privados rellenos.
; &nbsp; &nbsp; &nbsp; &nbsp; String mensaje ;
>&nbsp; &nbsp; &nbsp; &nbsp;  crearYRellenarBusquedaVO();
>  ; &nbsp; &nbsp; &nbsp; &nbsp;//Javscript activado
&gt; &nbsp; &nbsp;   ;  if (getJsActivado()!=null &&
> getJsActivado().compareToIgnoreCase("S") == 0){
; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;//invocamos servicio adecuado
&gt;
> setXml(this.getServicio().obtenerResultadosJSactivado(this.getBusquedaVO
>; ()));
>  ; &nbsp; &nbsp; &nbsp; &nbsp;   mensaje="succesJS";
&gt; &nbsp; &nbsp;   ;  }else{
; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;//javascript no activado
&gt;
> this.setColeccion(this.getServicio().obtenerResultadosJSdesactivado(this.getBusquedaVO
> ()));
>  ; &nbsp; &nbsp; &nbsp; &nbsp;   mensaje="succesNoJS";
  ; &nbsp; &nbsp;  }
>
>  ; &nbsp; &nbsp; &nbsp; return mensaje;
&gt; &nbsp; &nbsp; }
>
>; &nbsp; &nbsp; private void crearYRellenarBusquedaVO() {
>
>; &nbsp; &nbsp; &nbsp; &nbsp; if (busquedaVO == null){
>; &nbsp; &nbsp; &nbsp; &nbsp;   ;  busquedaVO = new BusquedaVO();
>&nbsp; &nbsp; &nbsp;   ; }
; &nbsp; &nbsp; &nbsp;  busquedaVO.setCampoQue(this.getCampoQue());
  ; &nbsp; &nbsp;  busquedaVO.setCampoDonde(this.getCampoDonde());
>&nbsp; &nbsp;  }
>
>; &nbsp; &nbsp; public String getCampoQue() {
>&nbsp; &nbsp; &nbsp; &nbsp;  return campoQue;
; &nbsp;  }
>
>; &nbsp; &nbsp; public void setCampoQue(String campoQue) {
>&nbsp; &nbsp; &nbsp; &nbsp;  this.campoQue = campoQue;
> &nbsp;   }
>
>; &nbsp; &nbsp; public String getCampoDonde() {
>&nbsp; &nbsp; &nbsp; &nbsp;  return campoDonde;
; &nbsp;  }
>
>; &nbsp; &nbsp; public void setCampoDonde(String campoDonde) {
>&nbsp; &nbsp; &nbsp; &nbsp;  this.campoDonde = campoDonde;
; &nbsp;  }
>
>; &nbsp; &nbsp; public String getJsActivado() {
>&nbsp; &nbsp; &nbsp; &nbsp;  return jsActivado;
; &nbsp;  }
>
>; &nbsp; &nbsp; public void setJsActivado(String jsActivado) {
>&nbsp; &nbsp; &nbsp; &nbsp;  this.jsActivado = jsActivado;
; &nbsp;  }
>
>; &nbsp; &nbsp; public String getQuienSoy() {
>&nbsp; &nbsp; &nbsp; &nbsp;  return quienSoy;
; &nbsp;  }
>
>; &nbsp; &nbsp; public void setQuienSoy(String quienSoy) {
>&nbsp; &nbsp; &nbsp; &nbsp;  this.quienSoy = quienSoy;
> &nbsp;   }
>
>; &nbsp; &nbsp; public BusquedaVO getBusquedaVO() {
>&nbsp; &nbsp; &nbsp; &nbsp;  return busquedaVO;
; &nbsp;  }
>
>; &nbsp; &nbsp; public void setBusquedaVO(BusquedaVO busquedaVO) {
>&nbsp; &nbsp; &nbsp; &nbsp;  this.busquedaVO = busquedaVO;
; &nbsp;  }
>
>; &nbsp; &nbsp; public String getXml() {
>&nbsp; &nbsp; &nbsp; &nbsp;  return xml;
>&nbsp;   ; }
>
>; &nbsp; &nbsp; public void setXml(String xml) {
>&nbsp; &nbsp; &nbsp; &nbsp;  this.xml = xml;
>&nbsp;   ; }
>
>; &nbsp; &nbsp; public Collection getColeccion() {
>&nbsp; &nbsp; &nbsp; &nbsp;  return coleccion;
  ;  }
>
>; &nbsp; &nbsp; public void setColeccion(Collection coleccion) {
>&nbsp; &nbsp; &nbsp; &nbsp;  this.coleccion = coleccion;
  ;  }
>
>; &nbsp; &nbsp; public SrvBusquedaNoxtrumServiceImpl getServicio() {
>&nbsp; &nbsp; &nbsp; &nbsp;  return servicio;
; &nbsp;  }
>
>; &nbsp; &nbsp; public void setServicio(SrvBusquedaNoxtrumServiceImpl
&gt; servicio) {
>&nbsp; &nbsp; &nbsp; &nbsp;  this.servicio = servicio;
> &nbsp;   }
>
>; }
>
>;
>
> 2007/9/24, Angel Miralles Arevalo < anmirallesyahoo.es" target=_blank rel=nofollow>anmirallesyahoo.es&gt;:
> >
> >
> >
> >
> > Please, send your bean code #{yellProxy.encuentra}.
> >
> >
> > ----- Mensaje original ----
> > De: Alonso Isidoro Roman < alonsoirgmail.com" target=_blank rel=nofollow>alonsoirgmail.com>
> > Para: usersmyfaces.apache.org" target=_blank rel=nofollow>usersmyfaces.apache.org
&gt; > Enviado: lunes, 24 de septiembre, 2007 12:08:21
> > Asunto: pls help with exception
> >
> >
> > hi everybody, i`m newbee with jsf first at all!
> >
> >
> > it takes me this exception when i submit the form:
> > javax.servlet.ServletException
&gt; > : Error calling action method of component with id formulario:boton
> > javax.faces.webapp.FacesServlet.service
>; > (FacesServlet.java:152)
> >
> org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java
> > :368)
> >
> >
> >
> > causa raíz javax.faces.FacesException: Error calling action method of
> component with id formulario:boton
> >
> >
> org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
> >
> >
> de.mindmatters.faces.application.DelegatingActionListener.processAction (DelegatingActionListener.java:106)
> > javax.faces.component.UICommand.broadcast
&gt; > (UICommand.java:106)
> > org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents
> > (AjaxViewRoot.java :274)
> >
> org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:250)
> >
> org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication
> > (AjaxViewRoot.java:405)
> >
> de.mindmatters.faces.lifecycle.InvokeApplicationPhase.executePhase
> > (InvokeApplicationPhase.java:43)
> >
> de.mindmatters.faces.lifecycle.AbstractPhase.execute(AbstractPhase.java :37)
> > de.mindmatters.faces.lifecycle.LifecycleImpl.executePhase
> > (LifecycleImpl.java:166)
> > de.mindmatters.faces.lifecycle.LifecycleImpl.execute
&gt; > (LifecycleImpl.java:211)
> >
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
&gt; >
> org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter
&gt; > (MonitorFilter.java:368)
> >
> >
> >
> > my faces page is
> >
> > <% taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
> > <% taglib uri=" http://java.sun.com/jsf/core" prefix="f" %>
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> >
> > <html&gt;
> > <f:view>
> >   ;  <f:loadBundle basename="MessageResources" var="msg"/>
> > <head&gt;
> >   ; &nbsp; &nbsp;  <title&gt;
> >   ; &nbsp; &nbsp; &nbsp; &nbsp;  ${msg.titulo }
> >   ; &nbsp; &nbsp;  </title>
> > </head&gt;
> >
> > <body&gt;
> >   ;  <h:form id="formulario">
&gt; >   ; &nbsp; &nbsp;  <h:inputText id="campoQue" value="#{ yellProxy.campoQue}" />
>  ; &nbsp; &nbsp;  <h:inputText id="campoDonde" value="#{yellProxy.campoDonde }" />
>  ; &nbsp; &nbsp;  <h:commandButton id="boton" value="#{msg.boton }"
> action="#{yellProxy.encuentra }"/>
&gt; >   ;  </h:form>
> > </f:view>
> > </body&gt;
> > </html&gt;
> >
> > my faces-config is:
> >
> > <?xml version='1.0' encoding='UTF-8'?>
> >
> >
> > <!DOCTYPE faces-config PUBLIC
>; >   "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
&gt; >   " http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
> >
> > <!-- =========== FULL CONFIGURATION FILE
> ================================== -->
>; >
> > <faces-config>
> >   ;  <!-- El mantenimiento del bean proxy se delega al contenedor de
> spring--&gt;
> >
> >   ; &nbsp; <;application>
> >   ; &nbsp; &nbsp; &nbsp; &lt;variable-resolver&gt;
> >
> org.springframework.web.jsf.DelegatingVariableResolver
> >   ; &nbsp; &nbsp; &nbsp; &lt;/variable-resolver&gt;
> >   ; &nbsp; <;/application>
> >
> >   ; &nbsp; <;!-- el unico idioma permitido es el español.-->
> >   ; &nbsp; <;application>
> >   ; &nbsp; &nbsp;  <locale-config>
> >   ; &nbsp; &nbsp; &nbsp; &nbsp;  <default-locale>;es</default-locale>
> >   ; &nbsp; &nbsp;  </locale-config>;
> >   ; &nbsp; <;/application>
> >
> >   ; &nbsp; <;!--
> >   ; &nbsp;  - navigation rules
>  ; &nbsp;  -->
>; >   ;  <navigation-rule&gt;
> >   ; &nbsp; &nbsp;  <from-view-id>/index.jsp&lt;/from-view-id>
&gt; >   ; &nbsp; &nbsp;  <navigation-case&gt;
> >   ; &nbsp; &nbsp; &nbsp; &nbsp;  <from-outcome>succesJS</from-outcome>
>  ; &nbsp; &nbsp; &nbsp; &nbsp;  <to-view-id>/jsActivado.jsp</to-view-id>
> >   ; &nbsp; &nbsp;  </navigation-case&gt;
> >   ; &nbsp; &nbsp;  <navigation-case&gt;
> >   ; &nbsp; &nbsp; &nbsp; &nbsp;  <from-outcome>succesNoJS&lt;/from-outcome>
&gt; >   ; &nbsp; &nbsp; &nbsp; &nbsp;  <to-view-id>/jsDesactivado.jsp</to-view-id>;
> >   ; &nbsp; &nbsp;  </navigation-case&gt;
> >   ;  </navigation-rule&gt;
> > </faces-config>
> >
> > my applicationContext.xml is
> >
> > <?xml version=" 1.0" encoding="UTF-8"?>
> > <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN"
&gt; >   ; &nbsp; &nbsp; &nbsp;  "
> http://www.springframework.org/dtd/spring-beans-2.0.dtd ">
> > <beans&gt;
> >
>   ;  <bean id="ParserSAX"
> class="es.yell.frontlite.parser.ParserPrincipalHandler "
> scope="singleton"/>;
> >
> >   ;  <bean id="Controller" class="
&gt; es.yell.frontlite.servlets.Controller" scope="singleton"/>;
> >
> >   ;  <bean id="srvBusquedaNoxtrumService"
&gt; class="es.yell.frontlite.service.impl.SrvBusquedaNoxtrumServiceImpl
> " scope="singleton">
> >   ; &nbsp; &nbsp;  <property name="parserSAX">&lt;ref bean="ParserSAX"/></property>
> >   ; &nbsp; &nbsp;  <property name="controlador">;<ref bean="Controller"/>;</property>
>; >   ;  </bean&gt;
> >
> >   ;  <bean id="yellProxy"
> class="es.yell.frontlite.servlets.YellProxy"
> scope="singleton">
> >   ; &nbsp; &nbsp;  <property name="servicio">
&gt; >   ; &nbsp; &nbsp; &nbsp; &nbsp;  <ref bean="srvBusquedaNoxtrumService"/>
> >   ; &nbsp; &nbsp;  </property>
>; >   ;  </bean&gt;
> > </beans>
> >
> > another question:
> >
> > why do i have to put the url http: // localhost:8084/index.faces i browser
> instead of
> > Http: // localhost:8084/index.jsp
> > Or
> > Http: // localhost:8084/index.jsf?
> >
> > pls help
> > --
> > Alonso Isidoro Roman.
>; >
> >
> > ________________________________
>
> > Sé un Mejor Amante del Cine
> > ¿Quieres saber cómo? ¡Deja que otras personas te ayuden! .
> >
>
>
>
&gt; --
> Alonso Isidoro Roman.


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



--
Alonso Isidoro Roman.




Sé un Mejor Amante del Cine
¿Quieres saber cómo? ¡Deja que otras personas te ayuden! .
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )