You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sebastian Kolbe <sk...@gmx.net> on 2007/08/10 00:23:53 UTC

Doubled requests in TabbedPane

Hello

Hope someone can help me with this:
I have a TabbedPane with some tabs in it, each calling an url for
their content.
Now I have several problems:
- I noticed that the selected tab calls the url two times before displaying.
- I "reload" a specific tab by publishing a dojo-topic. In this
situation the div calls the
 url two times.

Since especially some older browser need "a lot of time" to display the
tabs content
I need to correct this.
Is there a way to circumvent this behaviour? Maybe I did anything wrong?

Another question:
Is there an easy way to catch the event (something like 'onclick') when
a different tab is selected?

Here is my code for reference:
<s:tabbedPanel id="resultTabPanel" selectedTab="resultPanelTab_%{maxTabId}">
    <s:url id="infoActionUrl"
action="SearchAction_fetchResultTable"></s:url>

    <s:div id="resultPanelTab_1" cssClass="panelTab"      
         label="tab1" theme="ajax" labelposition="top"
href="%{infoActionUrl}"
         errorText="Loading error on tab1"
         refreshOnShow="false" listenTopics="searchTab_0_Topic"
loadingText="Loading..."
         showLoadingText="false" autoStart="false" executeScripts="true">
        <div id="indicator1" align="center" style="display:block;">
           <img  src="../pics/spinning_wheel_throbber.gif" width="64"
height="64" alt="Loading..."    border="0" title="Loading..."/>
          </div>
        </s:div>
</s:tabbelPanel>


Thanks,
Sebastian

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


Re: Doubled requests in TabbedPane

Posted by Sebastian Kolbe <sk...@gmx.net>.
Hi

Ah, thanks very much. Thats exactly what i need. :-)

-- 
Sebastian

Jeromy Evans schrieb:
> In response to your second question:
>
> Sebastian Kolbe wrote:
>> Another question:
>> Is there an easy way to catch the event (something like 'onclick') when
>> a different tab is selected?
>>
>>   
> Yes :
> a. at page init time, lookup the id of each tab widget
> b. connect a handler "before" the "show" event generated by the widget
>
> The following javascript will call the handle1 or handle2 function
> when tab1 or tab2 is selected respectively.
>  function handler1(evt) {
>    // do something
>  }
>  function handler2(evt) {
>    // do something
>  }
>
>  function init() {
>      var tab1Widget = dojo.widget.byId("tab1");
>      var tab2Widget = dojo.widget.byId("tab2");
>
>      dojo.event.connect("before", tab1Widget, "show", handler1);
>      dojo.event.connect("before", tab2Widget, "show", handler2);
>  }
>
>  dojo.addOnLoad(  init );
>
>
>
> ---------------------------------------------------------------------
> 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: Doubled requests in TabbedPane

Posted by Jeromy Evans <je...@blueskyminds.com.au>.
In response to your second question:

Sebastian Kolbe wrote:
> Another question:
> Is there an easy way to catch the event (something like 'onclick') when
> a different tab is selected?
>
>   
Yes :
 a. at page init time, lookup the id of each tab widget
 b. connect a handler "before" the "show" event generated by the widget

The following javascript will call the handle1 or handle2 function when 
tab1 or tab2 is selected respectively. 

  function handler1(evt) {
    // do something
  }
  function handler2(evt) {
    // do something
  }

  function init() {
      var tab1Widget = dojo.widget.byId("tab1");
      var tab2Widget = dojo.widget.byId("tab2");

      dojo.event.connect("before", tab1Widget, "show", handler1);
      dojo.event.connect("before", tab2Widget, "show", handler2);
  }

  dojo.addOnLoad(  init );



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


Re: Doubled requests in TabbedPane

Posted by Sebastian Kolbe <sk...@gmx.net>.
Hm, well...
JSP-Exception ?!  :-(

'preload' is not in DTD, right?
If this attribute is recognized I could add it to the DTD?

Sebastian

Musachy Barroso schrieb:
> try  preload="false" on the divs(tabs).
>
> musachy
>
> On 8/10/07, Sebastian Kolbe <sk...@gmx.net> wrote:
>   
>> Hi
>>
>> I'm using already 2.0.9.
>> Is there a config option for this or something similar?
>> For me it looks like the 'remote'-div is fetching it's content on
>> "before"  *and* "load" topic publishing.
>>
>> An other problem for me is that most browsers are rendering
>> very, very slow into such a 'div'. A page with tables that normally
>> (normal struts-action rendering into a browser window) takes less
>> than 1 second needs here almost 20 - 30 seconds.  It looks like the
>> javascript in browser is doing some sort of postprocessing on the
>> content?
>>
>> Thanks,
>> Sebastian
>>
>> Marco Carnevale schrieb:
>>     
>>> I had the same problem when I was using 2.0.6.  Upgrading to 2.0.8 \
>>> 2.0.9resolved the issue.
>>>
>>> On 8/9/07, Sebastian Kolbe <sk...@gmx.net> wrote:
>>>
>>>       
>>>> Hello
>>>>
>>>> Hope someone can help me with this:
>>>> I have a TabbedPane with some tabs in it, each calling an url for
>>>> their content.
>>>> Now I have several problems:
>>>> - I noticed that the selected tab calls the url two times before
>>>> displaying.
>>>> - I "reload" a specific tab by publishing a dojo-topic. In this
>>>> situation the div calls the
>>>> url two times.
>>>>
>>>> Since especially some older browser need "a lot of time" to display the
>>>> tabs content
>>>> I need to correct this.
>>>> Is there a way to circumvent this behaviour? Maybe I did anything wrong?
>>>>
>>>> Another question:
>>>> Is there an easy way to catch the event (something like 'onclick') when
>>>> a different tab is selected?
>>>>
>>>> Here is my code for reference:
>>>> <s:tabbedPanel id="resultTabPanel"
>>>> selectedTab="resultPanelTab_%{maxTabId}">
>>>>    <s:url id="infoActionUrl"
>>>> action="SearchAction_fetchResultTable"></s:url>
>>>>
>>>>    <s:div id="resultPanelTab_1" cssClass="panelTab"
>>>>         label="tab1" theme="ajax" labelposition="top"
>>>> href="%{infoActionUrl}"
>>>>         errorText="Loading error on tab1"
>>>>         refreshOnShow="false" listenTopics="searchTab_0_Topic"
>>>> loadingText="Loading..."
>>>>         showLoadingText="false" autoStart="false" executeScripts="true">
>>>>        <div id="indicator1" align="center" style="display:block;">
>>>>           <img  src="../pics/spinning_wheel_throbber.gif" width="64"
>>>> height="64" alt="Loading..."    border="0" title="Loading..."/>
>>>>          </div>
>>>>        </s:div>
>>>> </s:tabbelPanel>
>>>>
>>>>
>>>> Thanks,
>>>> Sebastian
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>
>>
>>     
>
>
>   


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


Re: Doubled requests in TabbedPane

Posted by Musachy Barroso <mu...@gmail.com>.
try  preload="false" on the divs(tabs).

musachy

On 8/10/07, Sebastian Kolbe <sk...@gmx.net> wrote:
> Hi
>
> I'm using already 2.0.9.
> Is there a config option for this or something similar?
> For me it looks like the 'remote'-div is fetching it's content on
> "before"  *and* "load" topic publishing.
>
> An other problem for me is that most browsers are rendering
> very, very slow into such a 'div'. A page with tables that normally
> (normal struts-action rendering into a browser window) takes less
> than 1 second needs here almost 20 - 30 seconds.  It looks like the
> javascript in browser is doing some sort of postprocessing on the
> content?
>
> Thanks,
> Sebastian
>
> Marco Carnevale schrieb:
> > I had the same problem when I was using 2.0.6.  Upgrading to 2.0.8 \
> > 2.0.9resolved the issue.
> >
> > On 8/9/07, Sebastian Kolbe <sk...@gmx.net> wrote:
> >
> >> Hello
> >>
> >> Hope someone can help me with this:
> >> I have a TabbedPane with some tabs in it, each calling an url for
> >> their content.
> >> Now I have several problems:
> >> - I noticed that the selected tab calls the url two times before
> >> displaying.
> >> - I "reload" a specific tab by publishing a dojo-topic. In this
> >> situation the div calls the
> >> url two times.
> >>
> >> Since especially some older browser need "a lot of time" to display the
> >> tabs content
> >> I need to correct this.
> >> Is there a way to circumvent this behaviour? Maybe I did anything wrong?
> >>
> >> Another question:
> >> Is there an easy way to catch the event (something like 'onclick') when
> >> a different tab is selected?
> >>
> >> Here is my code for reference:
> >> <s:tabbedPanel id="resultTabPanel"
> >> selectedTab="resultPanelTab_%{maxTabId}">
> >>    <s:url id="infoActionUrl"
> >> action="SearchAction_fetchResultTable"></s:url>
> >>
> >>    <s:div id="resultPanelTab_1" cssClass="panelTab"
> >>         label="tab1" theme="ajax" labelposition="top"
> >> href="%{infoActionUrl}"
> >>         errorText="Loading error on tab1"
> >>         refreshOnShow="false" listenTopics="searchTab_0_Topic"
> >> loadingText="Loading..."
> >>         showLoadingText="false" autoStart="false" executeScripts="true">
> >>        <div id="indicator1" align="center" style="display:block;">
> >>           <img  src="../pics/spinning_wheel_throbber.gif" width="64"
> >> height="64" alt="Loading..."    border="0" title="Loading..."/>
> >>          </div>
> >>        </s:div>
> >> </s:tabbelPanel>
> >>
> >>
> >> Thanks,
> >> Sebastian
> >>
> >> ---------------------------------------------------------------------
> >> 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
>
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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


Re: [OT] Gzip compression of script files

Posted by Vijay Venkataraman <vi...@ltp.soft.net>.
Hi Mike,
Thanks for letting me know about this. I will take care to test it on 
slow machines.

Vijay

Mike Baroukh wrote:
> I had problems on IE where compression of gzip didn't works.
> On the first page load, we had javascript error.
> On the second page load, it works because the ungzipped file was in 
> cache.
> If we clear browser cache, we have the error again ...
>
> It seems to happened It happend on slow machines.
>
> so, be careful with it. I personally never gzip .js.
>
> Mike
>
>
> Sebastian Kolbe a écrit :
>> Hello,
>>
>> First of all: You should open a new thread for new questions. 
>> Answering to
>> existing threads might conceal your message for most people.
>>
>> Anyway:
>> Compressing javascript, css and other files is possible if the browser
>> supports this.
>> The simplest solution for this is to install a webserver (i.e. apache)
>> additional
>> to your application server so that a request goes through the web
>> server. This webserver
>> can be configured to compress content, probably also HTML files or other
>> content;
>> look for 'mod_deflate'.
>> If everything is right you should then have a transparent compression
>> for selected
>> filetypes w/o needing to compress anything "manually".
>>
>> An other approach is to use a javascript "compressor" like
>> http://compressor.ebiene.de/  which converts/eliminates white spaces and
>> word wrapping.
>>
>


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


Re: [OT] Gzip compression of script files

Posted by Mike Baroukh <mb...@cardiweb.com>.
I had problems on IE where compression of gzip didn't works.
On the first page load, we had javascript error.
On the second page load, it works because the ungzipped file was in cache.
If we clear browser cache, we have the error again ...

It seems to happened It happend on slow machines.

so, be careful with it. I personally never gzip .js.

Mike


Sebastian Kolbe a écrit :
> Hello,
> 
> First of all: You should open a new thread for new questions. Answering to
> existing threads might conceal your message for most people.
> 
> Anyway:
> Compressing javascript, css and other files is possible if the browser
> supports this.
> The simplest solution for this is to install a webserver (i.e. apache)
> additional
> to your application server so that a request goes through the web
> server. This webserver
> can be configured to compress content, probably also HTML files or other
> content;
> look for 'mod_deflate'.
> If everything is right you should then have a transparent compression
> for selected
> filetypes w/o needing to compress anything "manually".
> 
> An other approach is to use a javascript "compressor" like
> http://compressor.ebiene.de/  which converts/eliminates white spaces and
> word wrapping.
> 

-- 

Mike Baroukh

---
Cardiweb  - 31 Rue de Mogador Paris IXeme
06 63 57 27 22 - 01 53 21 82 63 - Jabber: mbaroukh@jabber.org
http://www.cardiweb.com
---


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


Re: [OT] Gzip compression of script files

Posted by Vijay Venkataraman <vi...@ltp.soft.net>.
Sebastin,
Thanks for all the information and pointers. Hmm  i didn't realize that 
i meddled with another thread. Group i am very sorry for the mistake. I 
just accomplished what i wanted, it was more of a bug that is why i 
didn't get it to work.

I do understand that i can get it done this done at container / web 
server config level or at the code level. Nice link if others are think 
in these terms. http://www.seifi.org/?p=482

Thanks,
Vijay


Sebastian Kolbe wrote:
> Hello,
>
> First of all: You should open a new thread for new questions. Answering to
> existing threads might conceal your message for most people.
>
> Anyway:
> Compressing javascript, css and other files is possible if the browser
> supports this.
> The simplest solution for this is to install a webserver (i.e. apache)
> additional
> to your application server so that a request goes through the web
> server. This webserver
> can be configured to compress content, probably also HTML files or other
> content;
> look for 'mod_deflate'.
> If everything is right you should then have a transparent compression
> for selected
> filetypes w/o needing to compress anything "manually".
>
> An other approach is to use a javascript "compressor" like
> http://compressor.ebiene.de/  which converts/eliminates white spaces and
> word wrapping.
>
>   


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


Re: [OT] Gzip compression of script files

Posted by Sebastian Kolbe <sk...@gmx.net>.
Hello,

First of all: You should open a new thread for new questions. Answering to
existing threads might conceal your message for most people.

Anyway:
Compressing javascript, css and other files is possible if the browser
supports this.
The simplest solution for this is to install a webserver (i.e. apache)
additional
to your application server so that a request goes through the web
server. This webserver
can be configured to compress content, probably also HTML files or other
content;
look for 'mod_deflate'.
If everything is right you should then have a transparent compression
for selected
filetypes w/o needing to compress anything "manually".

An other approach is to use a javascript "compressor" like
http://compressor.ebiene.de/  which converts/eliminates white spaces and
word wrapping.

-- 
Sebastian

Vijay Venkataraman schrieb:
> Hi,
> I have javascript/css files and looking at GZipping them and sending
> it to the browser. I am aware that i can do a GZip compression during
> runtime using a filters, by writing the content to GZipOutputStream. I
> am just wondering if it is possible to GZip these files during build
> time and then simply serve them during a request(run time) from the
> filter. I haven't seen any such example. Possibly i am missing some
> thing.
>
> Can anyone let me know, if it is achievable? If not why? Any pointers
> would be great.
>
> Cheers,
> Vijay.
>
> ---------------------------------------------------------------------
> 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


[OT] Gzip compression of script files

Posted by Vijay Venkataraman <vi...@ltp.soft.net>.
Hi,
I have javascript/css files and looking at GZipping them and sending it 
to the browser. I am aware that i can do a GZip compression during 
runtime using a filters, by writing the content to GZipOutputStream. I 
am just wondering if it is possible to GZip these files during build 
time and then simply serve them during a request(run time) from the 
filter. I haven't seen any such example. Possibly i am missing some thing.

Can anyone let me know, if it is achievable? If not why? Any pointers 
would be great.

Cheers,
Vijay.

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


Re: Doubled requests in TabbedPane

Posted by Sebastian Kolbe <sk...@gmx.net>.
Hi

Thanks for your mail.

Musachy Barroso schrieb:
> I logged this ticket:
>
> https://issues.apache.org/struts/browse/WW-2106
>
> so we could have a "parseContent" attribute to control this behavior.
>   
This is a good idea in my opinion. Probably you could also
include 'extractContent'. :-)

> regards
> musachy
>
> On 8/12/07, Musachy Barroso <mu...@gmail.com> wrote:
>   
>>> Although I think this 'remote div' feature is very interesting, I don't
>>> think it is usable for "real" or
>>> more complex applications in this state of developing...
>>>       
>> as a standalone tag or with the tabbedpanel?
>>
>>     
Hm...
I only used it with the tabbedpanel. Cannot say much about the
standalone usage.
But I don't think it will behave much different there, the performance
penalty is just
to much for most websites (if you want to display complex content).
I do not know much about the inner working of dojo, but I think the
answer is somewhere
there. Spending about half a minute to update some links (in my case) in
a website
of less than 20Kbyte size is not very efficient. Maybe I'm wrong and
this is the best
possible implementation...
Anyway, if we could use this 'parseContent' flag it should be better.


>>     
>>> At least the documentation should have a notice of this.
>>>
>>>       
>> it has "experimental" tags all over the place.
>>
>>     
hehe,
 so there should be 'experimental', 'a little bit experimental',
'more experimental' and 'do not use this feature - experimental'
...just kidding... ;-)
(the last one is copyright by Cisco)

-- 
Sebastian

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


Re: Doubled requests in TabbedPane

Posted by Musachy Barroso <mu...@gmail.com>.
I logged this ticket:

https://issues.apache.org/struts/browse/WW-2106

so we could have a "parseContent" attribute to control this behavior.

regards
musachy

On 8/12/07, Musachy Barroso <mu...@gmail.com> wrote:
> > Although I think this 'remote div' feature is very interesting, I don't
> > think it is usable for "real" or
> > more complex applications in this state of developing...
>
> as a standalone tag or with the tabbedpanel?
>
>
> > At least the documentation should have a notice of this.
> >
>
>
> it has "experimental" tags all over the place.
>
> musachy
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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


Re: Doubled requests in TabbedPane

Posted by Musachy Barroso <mu...@gmail.com>.
> Although I think this 'remote div' feature is very interesting, I don't
> think it is usable for "real" or
> more complex applications in this state of developing...

as a standalone tag or with the tabbedpanel?


> At least the documentation should have a notice of this.
>


it has "experimental" tags all over the place.

musachy
-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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


Re: Doubled requests in TabbedPane

Posted by Sebastian Kolbe <sk...@gmx.net>.
Hi

Thanks for your answer.
I found some of these options yesterday and tried to set them with by a
javascript "onload" tag for the html page.
Especially setting "parseContent" to 'false' gives an significant
speedup, unfortunately this breaks
all links with 'theme="ajax"' (or converts them to "normal" links).
But... The rendering performance was still to bad and did not solve the
"double request on page load"
behaviour bug.
The solution I came to was to use the "handler" attribute and to load
the content by XMLHttp request. This
loads the page in less than a second (compared to ca. half a minute).
The links are of course still broken.

Although I think this 'remote div' feature is very interesting, I don't
think it is usable for "real" or
more complex applications in this state of developing...
At least the documentation should have a notice of this.

Sebastian

Josef Adamčík schrieb:
> On 8/10/07, Sebastian Kolbe <sk...@gmx.net> wrote:
>   
>> An other problem for me is that most browsers are rendering
>> very, very slow into such a 'div'. A page with tables that normally
>> (normal struts-action rendering into a browser window) takes less
>> than 1 second needs here almost 20 - 30 seconds.  It looks like the
>> javascript in browser is doing some sort of postprocessing on the
>> content?
>>     
>
> I have noticed similiar behaviour. Struts uses component derived from
> dojo's content pane. Look at
> http://dojotoolkit.org/book/dojo-book-0-4/part-4-more-widgets/advanced-contentpane-usage
> - interesting is FAQ at the bottom of the page and question: "Why is
> ContentPane so slow? ".
>
> Cite from answer:
> "You probaly send it a big chunk of html with deeply nested tags.
> - Send it a html fragment, not a complete page with doctype and everything
> - Try to make the HTML simpler and use css for styling
> - Turn off the options you dont need: adjustPaths, extractContent,
> executeScripts, parseContent" ...
>
> (the answer continues on the page, but i'll foucs last quoted point)
> Struts div has parseContent option turned on in default (it allows
> dojo to create other dojo components in parsed html). When i tried to
> turn it of, speed of page rendering raised rapidly.
>
> But there's a problem: struts div tag doesn't support this option.
> One solution is direct construction of dojo sceleton for conent pane.
> E.g:
> <div dojoType="struts:BindDiv" .... parseContent="false">
> But remeber, you'll lose ability to include all struts tags which are
> based on dojo in the loaded output.
>
> p.
>
> ---------------------------------------------------------------------
> 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: Doubled requests in TabbedPane

Posted by Josef Adamčík <di...@gmail.com>.
On 8/10/07, Sebastian Kolbe <sk...@gmx.net> wrote:
> An other problem for me is that most browsers are rendering
> very, very slow into such a 'div'. A page with tables that normally
> (normal struts-action rendering into a browser window) takes less
> than 1 second needs here almost 20 - 30 seconds.  It looks like the
> javascript in browser is doing some sort of postprocessing on the
> content?

I have noticed similiar behaviour. Struts uses component derived from
dojo's content pane. Look at
http://dojotoolkit.org/book/dojo-book-0-4/part-4-more-widgets/advanced-contentpane-usage
- interesting is FAQ at the bottom of the page and question: "Why is
ContentPane so slow? ".

Cite from answer:
"You probaly send it a big chunk of html with deeply nested tags.
- Send it a html fragment, not a complete page with doctype and everything
- Try to make the HTML simpler and use css for styling
- Turn off the options you dont need: adjustPaths, extractContent,
executeScripts, parseContent" ...

(the answer continues on the page, but i'll foucs last quoted point)
Struts div has parseContent option turned on in default (it allows
dojo to create other dojo components in parsed html). When i tried to
turn it of, speed of page rendering raised rapidly.

But there's a problem: struts div tag doesn't support this option.
One solution is direct construction of dojo sceleton for conent pane.
E.g:
<div dojoType="struts:BindDiv" .... parseContent="false">
But remeber, you'll lose ability to include all struts tags which are
based on dojo in the loaded output.

p.

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


Re: Doubled requests in TabbedPane

Posted by Sebastian Kolbe <sk...@gmx.net>.
Hi

I'm using already 2.0.9. 
Is there a config option for this or something similar?
For me it looks like the 'remote'-div is fetching it's content on
"before"  *and* "load" topic publishing.

An other problem for me is that most browsers are rendering
very, very slow into such a 'div'. A page with tables that normally
(normal struts-action rendering into a browser window) takes less
than 1 second needs here almost 20 - 30 seconds.  It looks like the
javascript in browser is doing some sort of postprocessing on the
content?

Thanks,
Sebastian

Marco Carnevale schrieb:
> I had the same problem when I was using 2.0.6.  Upgrading to 2.0.8 \
> 2.0.9resolved the issue.
>
> On 8/9/07, Sebastian Kolbe <sk...@gmx.net> wrote:
>   
>> Hello
>>
>> Hope someone can help me with this:
>> I have a TabbedPane with some tabs in it, each calling an url for
>> their content.
>> Now I have several problems:
>> - I noticed that the selected tab calls the url two times before
>> displaying.
>> - I "reload" a specific tab by publishing a dojo-topic. In this
>> situation the div calls the
>> url two times.
>>
>> Since especially some older browser need "a lot of time" to display the
>> tabs content
>> I need to correct this.
>> Is there a way to circumvent this behaviour? Maybe I did anything wrong?
>>
>> Another question:
>> Is there an easy way to catch the event (something like 'onclick') when
>> a different tab is selected?
>>
>> Here is my code for reference:
>> <s:tabbedPanel id="resultTabPanel"
>> selectedTab="resultPanelTab_%{maxTabId}">
>>    <s:url id="infoActionUrl"
>> action="SearchAction_fetchResultTable"></s:url>
>>
>>    <s:div id="resultPanelTab_1" cssClass="panelTab"
>>         label="tab1" theme="ajax" labelposition="top"
>> href="%{infoActionUrl}"
>>         errorText="Loading error on tab1"
>>         refreshOnShow="false" listenTopics="searchTab_0_Topic"
>> loadingText="Loading..."
>>         showLoadingText="false" autoStart="false" executeScripts="true">
>>        <div id="indicator1" align="center" style="display:block;">
>>           <img  src="../pics/spinning_wheel_throbber.gif" width="64"
>> height="64" alt="Loading..."    border="0" title="Loading..."/>
>>          </div>
>>        </s:div>
>> </s:tabbelPanel>
>>
>>
>> Thanks,
>> Sebastian
>>
>> ---------------------------------------------------------------------
>> 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: Doubled requests in TabbedPane

Posted by Marco Carnevale <ma...@gmail.com>.
I had the same problem when I was using 2.0.6.  Upgrading to 2.0.8 \
2.0.9resolved the issue.

On 8/9/07, Sebastian Kolbe <sk...@gmx.net> wrote:
>
> Hello
>
> Hope someone can help me with this:
> I have a TabbedPane with some tabs in it, each calling an url for
> their content.
> Now I have several problems:
> - I noticed that the selected tab calls the url two times before
> displaying.
> - I "reload" a specific tab by publishing a dojo-topic. In this
> situation the div calls the
> url two times.
>
> Since especially some older browser need "a lot of time" to display the
> tabs content
> I need to correct this.
> Is there a way to circumvent this behaviour? Maybe I did anything wrong?
>
> Another question:
> Is there an easy way to catch the event (something like 'onclick') when
> a different tab is selected?
>
> Here is my code for reference:
> <s:tabbedPanel id="resultTabPanel"
> selectedTab="resultPanelTab_%{maxTabId}">
>    <s:url id="infoActionUrl"
> action="SearchAction_fetchResultTable"></s:url>
>
>    <s:div id="resultPanelTab_1" cssClass="panelTab"
>         label="tab1" theme="ajax" labelposition="top"
> href="%{infoActionUrl}"
>         errorText="Loading error on tab1"
>         refreshOnShow="false" listenTopics="searchTab_0_Topic"
> loadingText="Loading..."
>         showLoadingText="false" autoStart="false" executeScripts="true">
>        <div id="indicator1" align="center" style="display:block;">
>           <img  src="../pics/spinning_wheel_throbber.gif" width="64"
> height="64" alt="Loading..."    border="0" title="Loading..."/>
>          </div>
>        </s:div>
> </s:tabbelPanel>
>
>
> Thanks,
> Sebastian
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>