You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "STRUTS SL. Mailing List" <st...@trapsatur.com> on 2008/05/22 16:50:01 UTC

Page the waiting / Páginas de espera

Hello everyone.

I want to know if someone asked me how to do pages waiting, for example, 
the DDBB Enter data with a class java but I wish that you do not touch 
anything until this is not finished, so a page in waiting.

Any idea and thanks in advance.

A greeting.

********************************************************

Hola a todos y todas.

Queria saber si alguien me pede decir como hacer paginas de espera, por ejemplo, 
introdusco datos en la DDBB con una clase java pero quiero que el usuario no toque 
nada hasta que esto no termine, en fin una pagina de espera.

Alguna idea y gracias de antemano.

Un saludo.

Re: Page the waiting / Páginas de espera

Posted by Eduardo Solanas <ed...@gmail.com>.
Hi, it doesn't work, i think its a bug.

my action in struts.xml

<action name="reservasProvinciales" class="ejemplo.pruebaAction">
				 <interceptor-ref name="defaultStack"/>
				  <interceptor-ref name="execAndWait">
				     <param name="delay">1000</param>
				      <param name="delaySleepInterval">1000</param>
				 </interceptor-ref>
				<result>/pages/amarillas/provinciales/pos_loc.jsp</result>
				<result name="menuTerminos">/pages/pageprueba1.jsp</result>
				<result name="listadoTerminos">/pages/pageprueba2.jsp</result>
				
</action>

and in ejemplo.pruebaAction in execute method

public String execute() throws Exception {
		
		String coSite=getText(TPIConstants.coSitePAM);
		String tipoPam=getText(TPIConstants.tipoPAMProv);

when it calls getText it breaks, if i remove the interceptors tag in
the struts.xml it get the text and works fine

I tried too with this other interceptor in struts-default.xml and fails too :(

     <interceptor-stack name="executeAndWaitStack">
                <interceptor-ref name="execAndWait">
                    <param name="excludeMethods">input,back,cancel</param>
                </interceptor-ref>
                <interceptor-ref name="defaultStack"/>
                <interceptor-ref name="execAndWait">
                    <param name="excludeMethods">input,back,cancel</param>
                </interceptor-ref>
            </interceptor-stack>

any ideas? maybe a bug? thanks


2008/5/22 Giovanni Azua <gi...@imc.nl>:
> hi Eduardo,
>
> It would be useful that you posted the struts configuration and all relevant
> snippets. We won't otherwise understand the case you're describing.
>
> Just a wild shot at what you explain sounds like you don't get your
> properties properly assigned to the Action  ... is that it? If it is the
> case then please make sure to have the action mapping including not only the
> execAndWait interceptor but also the default stack right before it e.g.
>
> <action name="SimulationRun"
> class="com.sag.optimizer.ui.web.action.simulation.SimulationRunAction">
>   <interceptor-ref name="defaultStack"/>
>   <interceptor-ref name="execAndWait">
>      <param name="delay">1000</param>
>       <param name="delaySleepInterval">1000</param>
>  </interceptor-ref>
>  <result name="wait" type="tiles">webui.simulationWait</result>
>  <result name="success" type="tiles">webui.simulationReport</result>
>  <result name="input" type="tiles">${ type.equals('COVARIANT') ?
> 'webui.formCovSimulation' : 'webui.formInvSimulation' }</result>
>  <result name="error" type="tiles">webui.requestFailed</result>
> </action>
>
> HTH
> regards,
> Giovanni
>
> Eduardo Solanas wrote:
>>
>> Hi Giovanni i have proved the executeAndWaitStack interceptor, and it
>> works well(aiting page works ok) but in my method (in an Action) in
>> wich i have to access with getText to a key in a properties file, and
>> it doesn't work!!!! if i quit the interfeptor it works again, maybe a
>> bug?
>>
>> thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Page the waiting / Páginas de espera

Posted by Giovanni Azua <gi...@imc.nl>.
hi Eduardo,

It would be useful that you posted the struts configuration and all 
relevant snippets. We won't otherwise understand the case you're describing.

Just a wild shot at what you explain sounds like you don't get your 
properties properly assigned to the Action  ... is that it? If it is the 
case then please make sure to have the action mapping including not only 
the execAndWait interceptor but also the default stack right before it e.g.

<action name="SimulationRun" 
class="com.sag.optimizer.ui.web.action.simulation.SimulationRunAction">
    <interceptor-ref name="defaultStack"/>
    <interceptor-ref name="execAndWait">
       <param name="delay">1000</param>
        <param name="delaySleepInterval">1000</param>
   </interceptor-ref>
   <result name="wait" type="tiles">webui.simulationWait</result>
   <result name="success" type="tiles">webui.simulationReport</result>
   <result name="input" type="tiles">${ type.equals('COVARIANT') ? 
'webui.formCovSimulation' : 'webui.formInvSimulation' }</result>
   <result name="error" type="tiles">webui.requestFailed</result>
</action>

HTH
regards,
Giovanni

Eduardo Solanas wrote:
> Hi Giovanni i have proved the executeAndWaitStack interceptor, and it
> works well(aiting page works ok) but in my method (in an Action) in
> wich i have to access with getText to a key in a properties file, and
> it doesn't work!!!! if i quit the interfeptor it works again, maybe a
> bug?
>
> thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Page the waiting / Páginas de espera

Posted by Eduardo Solanas <ed...@gmail.com>.
Hi Giovanni i have proved the executeAndWaitStack interceptor, and it
works well(aiting page works ok) but in my method (in an Action) in
wich i have to access with getText to a key in a properties file, and
it doesn't work!!!! if i quit the interfeptor it works again, maybe a
bug?

thanks

El día 22 de mayo de 2008 16:59, Giovanni Azua <gi...@imc.nl> escribió:
> hi,
>
> Do you mean running a lengthy process? then the way to go would be using
> execAndWait interceptor, have a look in:
> http://struts.apache.org/2.x/docs/execute-and-wait-interceptor.html
>
> ******************************************
>
> Si a lo que te refieres es a ejecutar un proceso y que el usuario no pueda
> cambiar nada ni tampoco que se quede con una pagina bloqueada entonces debes
> usar el "execAndWait interceptor", este cubre exactamente ese use-case.
> execAndWait te permite presentar al usuario una pagina estilo de "por favor
> espere, proceso en progreso" o algo asi hasta que tu proceso termine, revisa
> en la documentacion:
> http://struts.apache.org/2.x/docs/execute-and-wait-interceptor.html
>
> Aunque he usado este mecanismo antes, no me parece justificable en una
> application web, si acaso seria mejor usar un patron de procesamiento
> asincrono.
>
> Saludos,
> Giovanni
>
> STRUTS SL. Mailing List wrote:
>>
>> Hello everyone.
>>
>> I want to know if someone asked me how to do pages waiting, for example,
>> the DDBB Enter data with a class java but I wish that you do not touch
>> anything until this is not finished, so a page in waiting.
>>
>> Any idea and thanks in advance.
>>
>> A greeting.
>>
>> ********************************************************
>>
>> Hola a todos y todas.
>>
>> Queria saber si alguien me pede decir como hacer paginas de espera, por
>> ejemplo,
>> introdusco datos en la DDBB con una clase java pero quiero que el usuario
>> no toque
>> nada hasta que esto no termine, en fin una pagina de espera.
>>
>> Alguna idea y gracias de antemano.
>>
>> Un saludo.
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Page the waiting / Páginas de espera

Posted by "STRUTS SL. Mailing List" <st...@trapsatur.com>.
Gracias por tu comentario, me servirá de mucha ayuda.

Y si tienes toda la razón, nuestro problema es que tenemos que hacer un parser de varios xml y pues esto llevara un poco de proceso según nuestra estimación así que estamos buscando soluciones a este problema.

un saludo y gracias.

-----Mensaje original-----
De: Giovanni Azua [mailto:giaz@imc.nl]
Enviado el: jue 22/05/2008 16:59
Para: Struts Users Mailing List
Asunto: Re: Page the waiting / Páginas de espera
 
hi,

Do you mean running a lengthy process? then the way to go would be using 
execAndWait interceptor, have a look in:
http://struts.apache.org/2.x/docs/execute-and-wait-interceptor.html

******************************************

Si a lo que te refieres es a ejecutar un proceso y que el usuario no 
pueda cambiar nada ni tampoco que se quede con una pagina bloqueada 
entonces debes usar el "execAndWait interceptor", este cubre exactamente 
ese use-case. execAndWait te permite presentar al usuario una pagina 
estilo de "por favor espere, proceso en progreso" o algo asi hasta que 
tu proceso termine, revisa en la documentacion:
http://struts.apache.org/2.x/docs/execute-and-wait-interceptor.html

Aunque he usado este mecanismo antes, no me parece justificable en una 
application web, si acaso seria mejor usar un patron de procesamiento 
asincrono.

Saludos,
Giovanni

STRUTS SL. Mailing List wrote:
> Hello everyone.
>
> I want to know if someone asked me how to do pages waiting, for example,
> the DDBB Enter data with a class java but I wish that you do not touch
> anything until this is not finished, so a page in waiting.
>
> Any idea and thanks in advance.
>
> A greeting.
>
> ********************************************************
>
> Hola a todos y todas.
>
> Queria saber si alguien me pede decir como hacer paginas de espera, por ejemplo,
> introdusco datos en la DDBB con una clase java pero quiero que el usuario no toque
> nada hasta que esto no termine, en fin una pagina de espera.
>
> Alguna idea y gracias de antemano.
>
> Un saludo.
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org




Re: Page the waiting / Páginas de espera

Posted by Giovanni Azua <gi...@imc.nl>.
hi,

Do you mean running a lengthy process? then the way to go would be using 
execAndWait interceptor, have a look in:
http://struts.apache.org/2.x/docs/execute-and-wait-interceptor.html

******************************************

Si a lo que te refieres es a ejecutar un proceso y que el usuario no 
pueda cambiar nada ni tampoco que se quede con una pagina bloqueada 
entonces debes usar el "execAndWait interceptor", este cubre exactamente 
ese use-case. execAndWait te permite presentar al usuario una pagina 
estilo de "por favor espere, proceso en progreso" o algo asi hasta que 
tu proceso termine, revisa en la documentacion:
http://struts.apache.org/2.x/docs/execute-and-wait-interceptor.html

Aunque he usado este mecanismo antes, no me parece justificable en una 
application web, si acaso seria mejor usar un patron de procesamiento 
asincrono.

Saludos,
Giovanni

STRUTS SL. Mailing List wrote:
> Hello everyone.
>
> I want to know if someone asked me how to do pages waiting, for example,
> the DDBB Enter data with a class java but I wish that you do not touch
> anything until this is not finished, so a page in waiting.
>
> Any idea and thanks in advance.
>
> A greeting.
>
> ********************************************************
>
> Hola a todos y todas.
>
> Queria saber si alguien me pede decir como hacer paginas de espera, por ejemplo,
> introdusco datos en la DDBB con una clase java pero quiero que el usuario no toque
> nada hasta que esto no termine, en fin una pagina de espera.
>
> Alguna idea y gracias de antemano.
>
> Un saludo.
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org