You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Stephane Cosmeur <co...@gmail.com> on 2010/03/31 10:18:02 UTC

Why do I need a refresh to print a display:table ?

Hello,

My second message on this webmail and still very new on Struts 2.
My problem is, I guess, quite common. I have a simple action which return a
jsp containing a display:table. This table calls his data from the list
inside the actionclass.
The table display perfectly well, but only at the second click on the link
or after refreshing the page. At the first click, the table only display
this error : Nothing found to display.
I dedudeced from my traces that even at the first click, the list was not
empty. Then I think it is the display:table which does not execute his
request to access the list. What do you think ?

Thank you.

-- 
Stéphane Cosmeur
06 33 54 36 04

Standalone Dojo library with Struts 2.1.8 (conflict with the Dojo plugin)

Posted by Celinio Fernandes <ce...@yahoo.com>.
Hi,
I am trying to use the Dojo library as a standalone resource with Struts 2.1.8.
The problem is that i have already included the Dojo plugin for Struts 2.1.8 (the jar is inside WEB-INF/lib).
There seems to be a conflict now. Because the autocompleter <sx:aucomplter> I used before no longer works if i include
the Dojo Dojo library as a standalone resource (/resources/js/dojo-release-1.4.2/dojo/dojo.js) in my JSP.
How do you use both ? The standalone version and the plugin version ?
Thanks.


      

Re: Why do I need a refresh to print a display:table ?

Posted by Stephane Cosmeur <co...@gmail.com>.
I don't know how to check if the PrepareInterceptir is in my interceptor
stack or not, but the method prepare() is called.
And don't be sorry for trying to help, i'm new on struts 2 and this strange
behaviour must come from a mistake, but I really can't see where it could
be, given the table is populated.

Then I would have another question, when a jsp containaing struts balise and
java code as well (to access to session object for example) is
interpretated. Is the compiler wait to finish executing java code before to
keep interpretating the jsp ?

Thx for your help

On Wed, Apr 7, 2010 at 4:32 PM, Alex Rodriguez Lopez <alopez@flordeutopia.pt
> wrote:

> Is the PrepareInterceptor in your interceptor stack? The prepare() method
> is called by this interceptor.
>
> Sorry if you checked already this things, it is the only that comes to
> mind, otherwise it really seems like a strange behaviour.
>
> Em 07-04-2010 09:27, Stephane Cosmeur escreveu:
>
>  Yes I tried quite early after i discovered my problem and unfortunately
>> useless. The behaviour stays strictly the same.
>>
>> On Wed, Apr 7, 2010 at 4:08 PM, Alex Rodriguez Lopez<
>> alopez@flordeutopia.pt
>>
>>> wrote:
>>>
>>
>>  Hi Stéphane,
>>>
>>> did you try implementing the Preparable interface in your action and
>>> populating your List in the prepare() method?
>>>
>>>
>>>
>>> http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/Preparable.html
>>>
>>> Em 07-04-2010 05:16, Stephane Cosmeur escreveu:
>>>
>>>  One week later, i'm still bocking on this problem !
>>>
>>>> The display:table has a really strange behaviour. I still have to click
>>>> two
>>>> times on the action to get my table diplaying.
>>>> What's is very weird is that after the first click the s:debug balise
>>>> confirms me my list of clients is not empty.
>>>> Is it possible that the display:table get displayed before that the list
>>>> get
>>>> populated ?
>>>>
>>>> There is the code of my display:table
>>>> <s:if test="clients.size>   0">
>>>>  <display:table name="clients" id="row" requestURI="/client.action">
>>>> <display:column property="id"/>
>>>>  <display:column property="name" sortable="true"
>>>> href="../firsttry/ListOrdersClient.action" paramProperty="id"
>>>> paramId="id"/>
>>>>  <display:column property="address"/>
>>>> <display:column property="company"/>
>>>>  <display:column property="phone"/>
>>>> </display:table>
>>>>  </s:if>
>>>>
>>>> help plz !
>>>>
>>>> Regards,
>>>>
>>>> On Wed, Mar 31, 2010 at 4:18 PM, Stephane Cosmeur<co...@gmail.com>
>>>>  wrote:
>>>>
>>>>  Hello,
>>>>
>>>>>
>>>>> My second message on this webmail and still very new on Struts 2.
>>>>> My problem is, I guess, quite common. I have a simple action which
>>>>> return
>>>>> a
>>>>> jsp containing a display:table. This table calls his data from the list
>>>>> inside the actionclass.
>>>>> The table display perfectly well, but only at the second click on the
>>>>> link
>>>>> or after refreshing the page. At the first click, the table only
>>>>> display
>>>>> this error : Nothing found to display.
>>>>> I dedudeced from my traces that even at the first click, the list was
>>>>> not
>>>>> empty. Then I think it is the display:table which does not execute his
>>>>> request to access the list. What do you think ?
>>>>>
>>>>> Thank you.
>>>>>
>>>>> --
>>>>> Stéphane Cosmeur
>>>>> 06 33 54 36 04
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> 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
>
>


-- 
Stéphane Cosmeur
06 33 54 36 04

Re: Why do I need a refresh to print a display:table ?

Posted by Alex Rodriguez Lopez <al...@flordeutopia.pt>.
Is the PrepareInterceptor in your interceptor stack? The prepare() 
method is called by this interceptor.

Sorry if you checked already this things, it is the only that comes to 
mind, otherwise it really seems like a strange behaviour.

Em 07-04-2010 09:27, Stephane Cosmeur escreveu:
> Yes I tried quite early after i discovered my problem and unfortunately
> useless. The behaviour stays strictly the same.
>
> On Wed, Apr 7, 2010 at 4:08 PM, Alex Rodriguez Lopez<alopez@flordeutopia.pt
>> wrote:
>
>> Hi Stéphane,
>>
>> did you try implementing the Preparable interface in your action and
>> populating your List in the prepare() method?
>>
>>
>> http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/Preparable.html
>>
>> Em 07-04-2010 05:16, Stephane Cosmeur escreveu:
>>
>>   One week later, i'm still bocking on this problem !
>>> The display:table has a really strange behaviour. I still have to click
>>> two
>>> times on the action to get my table diplaying.
>>> What's is very weird is that after the first click the s:debug balise
>>> confirms me my list of clients is not empty.
>>> Is it possible that the display:table get displayed before that the list
>>> get
>>> populated ?
>>>
>>> There is the code of my display:table
>>> <s:if test="clients.size>   0">
>>>   <display:table name="clients" id="row" requestURI="/client.action">
>>> <display:column property="id"/>
>>>   <display:column property="name" sortable="true"
>>> href="../firsttry/ListOrdersClient.action" paramProperty="id"
>>> paramId="id"/>
>>>   <display:column property="address"/>
>>> <display:column property="company"/>
>>>   <display:column property="phone"/>
>>> </display:table>
>>>   </s:if>
>>>
>>> help plz !
>>>
>>> Regards,
>>>
>>> On Wed, Mar 31, 2010 at 4:18 PM, Stephane Cosmeur<co...@gmail.com>
>>>   wrote:
>>>
>>>   Hello,
>>>>
>>>> My second message on this webmail and still very new on Struts 2.
>>>> My problem is, I guess, quite common. I have a simple action which return
>>>> a
>>>> jsp containing a display:table. This table calls his data from the list
>>>> inside the actionclass.
>>>> The table display perfectly well, but only at the second click on the
>>>> link
>>>> or after refreshing the page. At the first click, the table only display
>>>> this error : Nothing found to display.
>>>> I dedudeced from my traces that even at the first click, the list was not
>>>> empty. Then I think it is the display:table which does not execute his
>>>> request to access the list. What do you think ?
>>>>
>>>> Thank you.
>>>>
>>>> --
>>>> Stéphane Cosmeur
>>>> 06 33 54 36 04
>>>>
>>>>
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> 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: Why do I need a refresh to print a display:table ?

Posted by Stephane Cosmeur <co...@gmail.com>.
Yes I tried quite early after i discovered my problem and unfortunately
useless. The behaviour stays strictly the same.

On Wed, Apr 7, 2010 at 4:08 PM, Alex Rodriguez Lopez <alopez@flordeutopia.pt
> wrote:

> Hi Stéphane,
>
> did you try implementing the Preparable interface in your action and
> populating your List in the prepare() method?
>
>
> http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/Preparable.html
>
> Em 07-04-2010 05:16, Stephane Cosmeur escreveu:
>
>  One week later, i'm still bocking on this problem !
>> The display:table has a really strange behaviour. I still have to click
>> two
>> times on the action to get my table diplaying.
>> What's is very weird is that after the first click the s:debug balise
>> confirms me my list of clients is not empty.
>> Is it possible that the display:table get displayed before that the list
>> get
>> populated ?
>>
>> There is the code of my display:table
>> <s:if test="clients.size>  0">
>>  <display:table name="clients" id="row" requestURI="/client.action">
>> <display:column property="id"/>
>>  <display:column property="name" sortable="true"
>> href="../firsttry/ListOrdersClient.action" paramProperty="id"
>> paramId="id"/>
>>  <display:column property="address"/>
>> <display:column property="company"/>
>>  <display:column property="phone"/>
>> </display:table>
>>  </s:if>
>>
>> help plz !
>>
>> Regards,
>>
>> On Wed, Mar 31, 2010 at 4:18 PM, Stephane Cosmeur<co...@gmail.com>
>>  wrote:
>>
>>  Hello,
>>>
>>> My second message on this webmail and still very new on Struts 2.
>>> My problem is, I guess, quite common. I have a simple action which return
>>> a
>>> jsp containing a display:table. This table calls his data from the list
>>> inside the actionclass.
>>> The table display perfectly well, but only at the second click on the
>>> link
>>> or after refreshing the page. At the first click, the table only display
>>> this error : Nothing found to display.
>>> I dedudeced from my traces that even at the first click, the list was not
>>> empty. Then I think it is the display:table which does not execute his
>>> request to access the list. What do you think ?
>>>
>>> Thank you.
>>>
>>> --
>>> Stéphane Cosmeur
>>> 06 33 54 36 04
>>>
>>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Stéphane Cosmeur
06 33 54 36 04

Re: Why do I need a refresh to print a display:table ?

Posted by Alex Rodriguez Lopez <al...@flordeutopia.pt>.
Hi Stéphane,

did you try implementing the Preparable interface in your action and 
populating your List in the prepare() method?

http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/Preparable.html

Em 07-04-2010 05:16, Stephane Cosmeur escreveu:
> One week later, i'm still bocking on this problem !
> The display:table has a really strange behaviour. I still have to click two
> times on the action to get my table diplaying.
> What's is very weird is that after the first click the s:debug balise
> confirms me my list of clients is not empty.
> Is it possible that the display:table get displayed before that the list get
> populated ?
>
> There is the code of my display:table
> <s:if test="clients.size>  0">
>   <display:table name="clients" id="row" requestURI="/client.action">
> <display:column property="id"/>
>   <display:column property="name" sortable="true"
> href="../firsttry/ListOrdersClient.action" paramProperty="id" paramId="id"/>
>   <display:column property="address"/>
> <display:column property="company"/>
>   <display:column property="phone"/>
> </display:table>
>   </s:if>
>
> help plz !
>
> Regards,
>
> On Wed, Mar 31, 2010 at 4:18 PM, Stephane Cosmeur<co...@gmail.com>  wrote:
>
>> Hello,
>>
>> My second message on this webmail and still very new on Struts 2.
>> My problem is, I guess, quite common. I have a simple action which return a
>> jsp containing a display:table. This table calls his data from the list
>> inside the actionclass.
>> The table display perfectly well, but only at the second click on the link
>> or after refreshing the page. At the first click, the table only display
>> this error : Nothing found to display.
>> I dedudeced from my traces that even at the first click, the list was not
>> empty. Then I think it is the display:table which does not execute his
>> request to access the list. What do you think ?
>>
>> Thank you.
>>
>> --
>> Stéphane Cosmeur
>> 06 33 54 36 04
>>
>
>
>


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


Re: Why do I need a refresh to print a display:table ?

Posted by Stephane Cosmeur <co...@gmail.com>.
One week later, i'm still bocking on this problem !
The display:table has a really strange behaviour. I still have to click two
times on the action to get my table diplaying.
What's is very weird is that after the first click the s:debug balise
confirms me my list of clients is not empty.
Is it possible that the display:table get displayed before that the list get
populated ?

There is the code of my display:table
<s:if test="clients.size > 0">
 <display:table name="clients" id="row" requestURI="/client.action">
<display:column property="id"/>
 <display:column property="name" sortable="true"
href="../firsttry/ListOrdersClient.action" paramProperty="id" paramId="id"/>
 <display:column property="address"/>
<display:column property="company"/>
 <display:column property="phone"/>
</display:table>
 </s:if>

help plz !

Regards,

On Wed, Mar 31, 2010 at 4:18 PM, Stephane Cosmeur <co...@gmail.com> wrote:

> Hello,
>
> My second message on this webmail and still very new on Struts 2.
> My problem is, I guess, quite common. I have a simple action which return a
> jsp containing a display:table. This table calls his data from the list
> inside the actionclass.
> The table display perfectly well, but only at the second click on the link
> or after refreshing the page. At the first click, the table only display
> this error : Nothing found to display.
> I dedudeced from my traces that even at the first click, the list was not
> empty. Then I think it is the display:table which does not execute his
> request to access the list. What do you think ?
>
> Thank you.
>
> --
> Stéphane Cosmeur
> 06 33 54 36 04
>



-- 
Stéphane Cosmeur
06 33 54 36 04