Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Re: Action and ActionForm in popup window

Joe Germuska

2007-02-08

Replies:

Yariel:

Your struts config looks good. I can't guess why you'd have different
results in a popup vs. a regular page unless you are perhaps using different
modules or somehow have the webapp deployed under two contexts with slightly
different configurations. Have you done a full clean reinstall, restart app
server, etc? I suggest that not because it's likely to actually fix
anything, but sometimes going through the complete process helps you
methodically make sure your application is in a consistent state.

not sure what else to suggest...

Joe




On 2/8/07, Yariel Ramos Moreno <yramosm@(protected):
>
> Thanks for your help Joe, but I allready did everything you said. The
> action I'm using works perfectly in a normal window... the problem occurs
> when I use it in the popup window. I'm using struts 1.1. This is the
> struts-config code snippet:
>
> Form:
> <form-bean name="criteriosOfertaForm" type="
> com.coremain.sidt.ont.ofertas.form.CriteriosOfertaForm" />
>
> Action:
> <action
>    attribute="criteriosOfertaForm"
>    name="criteriosOfertaForm"
>    path="/criteriosOferta"
>    scope="request"
>    type="com.coremain.sidt.ont.ofertas.action.CriteriosOfertaAction"
>    validate="false">
>    <forward name="ofertas" path="pagina.gestionOfertas" />
> </action>
>
>
>
>  ----- Original Message -----
>  From: Joe Germuska
>  To: Struts Users Mailing List
>  Sent: Thursday, February 08, 2007 11:00 AM
>  Subject: Re: Action and ActionForm in popup window
>
>
>  There needs to be an element in your struts-config.xml <action
>  path="/criteriosOferta" name="yourFormBeanName" type=...> etc.
>
>  Whenever you use an <html:form> tag, Struts must be able to find (in
>  struts-config.xml) the action you specify in the action attribute, and
> that
>  action must have a "name" attribute which points to an ActionForm
>  configuration. The form tag looks up an ActionForm instance in request
> or
>  session scope, or creates one if necessary, and uses that bean to "back"
> the
>  form fields inside <html:form> which may have values which need to be
>  "filled", as in the case of
> returning-to-a-form-after-validation-failures.
>
>  I hope this helps.
>
>  Joe
>
>
>  On 2/8/07, Yariel Ramos Moreno <yramosm@(protected):
>  >
>  > Hi all:
>  >
>  > From a page in my struts application, I need to open a popup window
> with
>  > some fields to pick up some values. I created an ActionForm with the
> filed's
>  > properties and an Action asociated to it. The problem is that when I
> try to
>  > open the popup the following exception is raised:
>  > Cannot retrieve mapping for action /criteriosOferta ......
>  >
>  > In this line:
>  >
>  > <html:form action="/criteriosOferta">
>  >
>  > It is possible to do that? Any idea of how fix it?
>  >
>  > Thanks in advance...
>  >
>  >
>  >
>
>
>  --
>  Joe Germuska
>  Joe@(protected)
>
>  "The truth is that we learned from João forever to be out of tune."
>  -- Caetano Veloso
>



--
Joe Germuska
Joe@(protected)

"The truth is that we learned from João forever to be out of tune."
-- Caetano Veloso
©2008 junlu.com - Jax Systems, LLC, U.S.A.