I am trying to create a portal with menu navigation for ignition displays. Now since ignition launches in applets, what i want is to make a URL which opens a perticular window directly when pasted in Internet Explorer, not the project main screen.
I am using Ignition Version 7.5.6
Just to clarify, we don’t launch only in applet mode. Typically people launch the clients in windowed or full-screen mode which does not need the web browser.
In windowed or full-screen mode you can pass parameters into the project using a URL. That way you can open a different window based on the parameter. There is a direct link to launch a client and it looks something like this:
http://localhost:8088/main/system/launch/client/Test.jnlpOf course you will have to replace the hostname and the name of the project (where it says Test). At the end of the URL you can add paramters:
http://localhost:8088/main/system/launch/client/Test.jnlp?paramName=SomeValueAll you need to do in the project is add a client tag called paramName that is the right datatype. If the client tag exists we will put the value in there. You can then create a startup script that will open a different window based on the client tag:
paramName = system.tag.read("[Client]paramName").value
if paramName == "SomeValue":
system.nav.swapTo("Path/To/Default/Window")Just make sure you have no windows set to open on startup.
Yes following the steps I outlined above. You can do the same with applet mode as well but in either case you have to launch the client to see the windows. Which window is opened is up to you. Typically people will do navigation in the client rather than in their own webpage.
Yes, you can automatically login to the project. In the designer select Project > Properties from the file menu. On the left select Client > Login. Check the auto login box and specify a username and password.
This works brilliantly, but I was wondering if it is possible to pass pararmeters in as well so that the Username and Password are passed in so that when the client Login page launches the username and password are passed in directly and it automatically logs in?
It is possible to pass parameters into the project through the launch URL like this:
http://192.168.1.5:8088/main/system/launch/client/ProjectName.jnlp?paramName=paramValueThe parameter gets passed into a client tag with the same name (paramName). You can use the client tag anywhere in the project.
The only problem is you still have to auto-login as a specific user. On a startup script you can check to see if the value is passed in and call:
system.security.switchUser(username, password)So the startup script would look something like this:[code]username = system.tag.read("[Client]Username")
password = system.tag.read("[Client]Password")
if username != “” and password != “”:
system.security.switchUser(username, password)[/code]Just keep in mind that the password will be plain text. You may want to think of encrypting it.
Hello @Travis.Cox ,
I found this thread useful to my need but I couldn’t figure it out why it’s not working with applet URL.
When I tried with the client mode, it’s working as expected. However when I launched URL in IE, it doesn’t write to the client tag.
I also tried with below code just to get the parameter passed from URL, I get None from value variable.
from javax.swing import JApplet
from javax.swing import SwingUtilities
applet = SwingUtilities.getAncestorOfClass(JApplet, event.source)
We are on 7.7.4 (b2015033012)
Do you know what I could have missed?
The parameters get passed in as client tags. You need to create client tags with the same name as the parameter name.
Hi Travis, thank you for replying. This is a very important piece to integrate Ignition to our existing web application for our manufacturing line. I really appreciate your help.
Yes, I do have client tag but it doesn’t write to it (see attached images for reference).
Any other things I could have missed?
This is applet printed out from console
I think I see the problem. You are passing the parameter in our URL which is not passing the parameter into the applet itself. You need to create your own HTML source with the applet tag and the parameter inside of that.
I created HTML page with below code (copy/paste from view source) with added the parameter name “resourceid” that I have as a client tag.
<APPLET archive=launchclient.jar codeBase="http://sjlnxign02.sanjose.hgst.com:8088/main/system/launchbin/" code=com.inductiveautomation.ignition.client.launch.BootstrapApplet width=923 height=687>
<PARAM name=classloader_cache value=false>
<PARAM name=javaws.sr.gateway.addr.0 value=sjlnxign02.sanjose.hgst.com:8088:8043/main>
<PARAM name=javaws.sr.scope value=C>
<PARAM name=javaws.sr.project value=egreencard>
<PARAM name=javaws.sr.launchts value=1551381856637>
<PARAM name=javaws.sr.main value=com.inductiveautomation.factorypmi.application.runtime.ClientLaunchHook>
<PARAM name=codebase_lookup value=false>
<PARAM name=resourceid value=ADD002>
And when I open this html file in IE, it gets Application Blocked by Java even though I already have the gateway host in exception site list. I do not get the Java Blocked when I enter URL directly to the address bar.
Do you see anything wrong in the HTML code?
Ignition 7.7.4’s certificate is long expired. You have to allow the expired cert.
Can you please give some guideline how I can do that? Any keyword to google?
I would dig around in the Java Control Panel.
Besides adding the gateway host name to the exception list, I really have not idea what else I have to do.
I can launch this app from native client launcher or put the URL applet to IE address and launch as the applet inside IE. However, according to @Travis in his previous comment, he suggests to pass parameter inside the HTML which when I tried, I get the application blocked by Java.
I’m wondering if my HTML code has a flaw that trigger higher Java security level and not allow to access.
I don’t really know much about applet mode. I haven’t bothered, as it’s no longer supported in the latest versions of java. You might want to start figuring out how to not need it…
Thank you for suggestion.
We need to integrate this application to a bigger and more complex web application to our manufacturing line. If I couldn’t figure this out, it’s likely that we need to get rid of this Ignition platform which is easier and take less effort to achieve our goal.
If your project timeline permits, Ignition v8’s Perspective module may suit your needs, as an IFrame instead of an applet. Consider studying the v8 Beta category and/or trying the beta.