Page 1 of 1
"Static" Java Applet on page?
Posted: Fri Oct 12, 2012 4:01 pm
by Bryan641
I'm working on the design for a new application that will interact with a Java Applet on the web page. I imagine I can load the applet simply enough with an HTML container, but I don't want the applet to reload and re-initialize every time a button or other action returns control to my RPG program and it re-displays the screen. Is there a way to make part of my application "static" so I can write a format to the screen only once with the Java applet in it so that other screen interactions won't affect it?
Would simply placing the applet in its own record format, writing that format once, and using overlay on all the other screens accomplish this?
--Bryan
Re: "Static" Java Applet on page?
Posted: Fri Oct 12, 2012 6:18 pm
by Alex
Overlaying a format will not accomplish what you want. The original format is still resent with every interaction from the user.
However, you can modify the global HTML template used by Profound UI to accomplish this. The original template we ship is called start.html. You will want to make a copy of it before making your modifications.
You can find details here on how to accomplish this:
http://www.profoundlogic.com/docs/displ ... start.html
Re: "Static" Java Applet on page?
Posted: Mon Oct 15, 2012 1:42 pm
by Bryan641
I was afraid that using overlay wouldn't work, and have since verified it. I've created a custom start page for just this application, and that aspect is working fine. New roadblock in a separate thread, since it doesn't apply to the "static" applet question.
Thanks!
--Bryan
Re: "Static" Java Applet on page?
Posted: Fri Nov 02, 2012 12:15 pm
by Bryan641
Using a custom copy of start.html for this application was more trouble than it was worth. I opted to use javascript to append my applet to the document.body, which places it outside the pui div. I didn't like how I had to link to the application nor that it apparently had to be enabled for anonymous calls.
So my program does "exfmt WAIT." The WAIT format appends the applet, then waits for it's initialization to complete and does a "pui.click()" to progress to the next screen, which is where the "real" application logic resides.
--Bryan