You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by shymon <sh...@poczta.onet.pl> on 2009/09/30 18:24:40 UTC
Strange java applet behavior with T5
Hi,
I have simple page. Just <body> and few <div>'s
After adding java applet to it I noticed that single request in browser
causes tapestry to render this page 2 times. (at least beginRender method
ist executed 2 times - and only one time when there is no applet on page).
Moreover, during the second pass my activation context variable has
unexpected value. eg.:
pass 1:
-------
ACTIVATE: 36971
PAGE BEGINRENDER
PASSIVATE: 36971
PASSIVATE: 36971 (good value)
pass 2:
-------
ACTIVATE: META-INF
PAGE BEGINRENDER
PASSIVATE: META-INF
PASSIVATE: META-INF
I don't know where META-INF comes from.
What could be the problem?
How should I embed java applets in tapestry page?
thx for any help,
Shymon
--
View this message in context: http://www.nabble.com/Strange-java-applet-behavior-with-T5-tp25684505p25684505.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Strange java applet behavior with T5
Posted by Martin Strand <do...@gmail.com>.
On Wed, 30 Sep 2009 22:32:50 +0200, shymon <sh...@poczta.onet.pl> wrote:
> My template is as follows:
>
> <html t:type="layout" title="SomeTitle"
> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
> xmlns:p="tapestry:parameter">
> <div class="panel">
> <div class="rel-panel">
> <applet code="nrs/MainApplet.class"
> archive="${asset:context:applet/SomeApplet.jar}" width="100%" height="600"
> id="rel-graph"/>
> </div>
> </div>
> <br/>
> </html>
>
> and activation context methods:
>
> void onActivate(String eid) {
> setEid(eid);
> }
>
> List onPassivate() {
> List params = new Vector();
> params.add(getEid());
> return params;
> }
There's nothing wrong with your tapestry code, your applet is simply trying to fetch something from <codebase>/META-INF/* - causing an extra page render request. See this:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6215746
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Strange java applet behavior with T5
Posted by shymon <sh...@poczta.onet.pl>.
Thiago H. de Paula Figueiredo wrote:
>
> Em Wed, 30 Sep 2009 13:24:40 -0300, shymon <sh...@poczta.onet.pl>
> escreveu:
>
>> Hi,
>
> Hi!
>
>> Moreover, during the second pass my activation context variable has
>> unexpected value. eg.:
>
> Make sure you use ${asset:...} or absolute paths to reference any files
> inside your templates.
>
>
My template is as follows:
<html t:type="layout" title="SomeTitle"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
xmlns:p="tapestry:parameter">
<div class="panel">
<div class="rel-panel">
<applet code="nrs/MainApplet.class"
archive="${asset:context:applet/SomeApplet.jar}" width="100%" height="600"
id="rel-graph"/>
</div>
</div>
<br/>
</html>
and activation context methods:
void onActivate(String eid) {
setEid(eid);
}
List onPassivate() {
List params = new Vector();
params.add(getEid());
return params;
}
--
View this message in context: http://www.nabble.com/Strange-java-applet-behavior-with-T5-tp25684505p25688483.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Strange java applet behavior with T5
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Wed, 30 Sep 2009 13:24:40 -0300, shymon <sh...@poczta.onet.pl>
escreveu:
> Hi,
Hi!
> Moreover, during the second pass my activation context variable has
> unexpected value. eg.:
Make sure you use ${asset:...} or absolute paths to reference any files
inside your templates.
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org