DS SDK: How to check if plugin is called in "design mode" or in browser?
Dear SDK experts,
I just created a simple world-/europe map plugin based on Datamaps (http://datamaps.github.io/) which works fine when the dashboard is executed in the browser but crashs, when I drag my plugin into the design area (maybe it's called different) of design studio. As I found no easy way to debug my created js code directly in design studio, is there is simple check so I can call the "real" plugin code only when my dashboard is executed in the browser and for example display only a static image when it's called inside design studio?
This check would also help a lot in my other plugins and I am sure, I already saw some coding somewhere -hopefully you remember where.
Thank you very much in advance for answering my very first question here on SCN.
Best regards,
Oliver
Hi Oliver,
The approach for determining design mode is documented in this thread: SDK - how to control other objects
Specifically, the code is:
if (window.sap && sap.zen && sap.zen.designmode) {
// Design time only code...
Hope that helps.
Regards,
Mustafa.
Similar Messages
-
or how to check for any plugin, there are system dependent other plugins?
in which file?
i added to FrmLblUIActionComponent in constructor
FrmLblUIActionComponent::FrmLblUIActionComponent(IPMUnknown* boss)
: CActionComponent(boss),fPrintFrmLbl(kFalse)
CAlert *alert = new CAlert();
if( Utils<IFrameLabelDataFacade>().Exists() )
alert->ErrorAlert("Plugin can run because dependency plugin found :)");
else
alert->ErrorAlert("Plugin can't run because dependency plugin not found!");
faults
Error
2
error C2065: 'IFrameLabelDataFacade' : undeclared identifier
c:\adobesdk\win\cs4\indesign\source\sdksamples\framelabelui\FrmLblUIActionComponent.cpp
125
Error
3
error C2955: 'Utils' : use of class template requires template argument list
c:\adobesdk\win\cs4\indesign\source\sdksamples\framelabelui\FrmLblUIActionComponent.cpp
125
Error
4
error C2228: left of '.Exists' must have class/struct/union
c:\adobesdk\win\cs4\indesign\source\sdksamples\framelabelui\FrmLblUIActionComponent.cpp
125 -
How to check whether JVM is running in interpreted mode
I have launched JVM with -Xint option , but thread dump file doesn't include Monitor cache dump. AppServer is starting with -Xint but it is not logging Monitor Cache Dump. How will I check whether JVM is running in interpreyed mode or any other way to get Monitor Cache dump in Thread dump?
Add -showversion to the command line and look for
java -Xint -showversion Hello
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Server VM (build 1.6.0-b105, interpreted mode)
If you're running with the JIT, you'll see something like
java -showversion Hello
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Server VM (build 1.6.0-b105, mixed mode) -
How to check whether weblogic server is in DEBUG mode or not
Hi
I want to check in my OSB proxy whether weblogic server is in Debug mode or not?
IF abv thing is not possible ,
I have check whether server is in development mode or production mode from my OSB proxy service?
I m not able to find any doc on this??Please let me know how it can be done?
ThanksThere isnt any other way except for doing a Java Callout. In the callout method you can access the Domain/Server MBean for the information that you seek. Based on the callout result you can go ahead with the logic in your PS..
Here is a sample Java Code to get the Server Log Level and ascertain whether the server is in Production Mode or not.
package com.dell.mbean;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.Hashtable;
import javax.management.MBeanServerConnection;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServerErrorException;
import javax.management.remote.JMXServiceURL;
import javax.naming.Context;
public class MyConnection {
private static MBeanServerConnection connection;
private static JMXConnector connector;
private static final ObjectName service;
static {
try {
service = new ObjectName("com.bea:Name=DomainRuntimeService,Type=weblogic.management.mbeanservers.domainruntime.DomainRuntimeServiceMBean");
catch (MalformedObjectNameException e) {
throw new AssertionError(e.getMessage());
* Initialize connection to the Domain Runtime MBean Server.
@SuppressWarnings("unchecked")
public static void initConnection(String hostname, String portString,
String username, String password) throws IOException,
MalformedURLException {
String protocol = "t3";
Integer portInteger = Integer.valueOf(portString);
int port = portInteger.intValue();
String jndiroot = "/jndi/";
String mserver = "weblogic.management.mbeanservers.domainruntime";
JMXServiceURL serviceURL = new JMXServiceURL(protocol, hostname, port,
jndiroot + mserver);
Hashtable h = new Hashtable();
h.put(Context.SECURITY_PRINCIPAL, username);
h.put(Context.SECURITY_CREDENTIALS, password);
h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES,"weblogic.management.remote");
h.put("jmx.remote.x.request.waiting.timeout", new Long(10000));
try {
connector = JMXConnectorFactory.connect(serviceURL, h);
connection = connector.getMBeanServerConnection();
} catch(JMXServerErrorException jmxSE)
jmxSE.printStackTrace();
catch(Exception ex)
ex.printStackTrace();
public static String getLogSeverity(String hostName, String portName, String userName, String password) throws Exception {
initConnection(hostName, portName, userName,password);
connector.close();
ObjectName domainConfig = (ObjectName) connection.getAttribute(service,
"DomainConfiguration");
ObjectName logMbean =(ObjectName) connection.getAttribute(domainConfig, "Log");
String logFileFilter = (String) connection.getAttribute(logMbean, "LogFileSeverity");
System.out.println("Log File Filter= "+ logFileFilter.toString());
return logFileFilter;
public static boolean isProductionModeEnabled(String hostName, String portName, String userName, String password) throws Exception {
initConnection(hostName, portName, userName,password);
connector.close();
ObjectName domainConfig = (ObjectName) connection.getAttribute(service,
"DomainConfiguration");
boolean prodEnabled= (Boolean) connection.getAttribute(domainConfig, "ProductionModeEnabled");
System.out.println("Is Production Mode Enabled=" +prodEnabled);
return prodEnabled;
Make sure you have wlclient.jar and wljmxclient.jar as your dependent libraries. -
How to check which substitution is called
Hi Experts,
I am abaper. I am processing PO through /sappo/ppo2. I want to know for particular PO which substitution is called.
Is there any way of knowing this?
Regards,
Jigar Thakkar.Hi,
If you're looking for exits in the GGB1, some moment this program will call the RGGBS000 but SAP recomends that you use a copy of this one.
Check in your source code if this program is called.
JPA -
How I can run Firefox with enabled Responsive design mode from command line?
I trying to find a way for running Firefox with already enabled Responsive mode with predefined resolution (for selenuim testing) for standartizing a viewport size in different OS`s.
Thanks!These are all the command line options [https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options Command Line Options]
-
How do i turn of voice call in lock mode
Can I completely disable voice command in Lock Mode? I am constantly making ghost calls.
http://support.apple.com/kb/ht3577
-
How to check whether user login in SNC mode or Non - SNC Mode
Hi
When SNC is enabled system will accept secure network connections. But,It is up to the user to login in SNC mode or NOT.
Can any one let me know How to check whether user login in a SNC mode / Non-SNC mode?. Is it only through SU01?.
Is there any other possibility?. where to check if user login through RFC connections?.
Please correct me if i am wrong.
Regards
Srinivas P.Hi,
Where to check if user login through RFC connections?
Check T-Code SM04 on every instance. In the column Type you can see what kind of login has been used (GUI, RFC, Plugin, System).
But,It is up to the user to login in SNC mode or NOT.
Depends. Check these [parameters|http://help.sap.com/saphelp_nw04/helpdata/EN/19/164442c1a1c353e10000000a1550b0/content.htm]:
snc/accept_insecure_cpic
snc/accept_insecure_gui
snc/accept_insecure_r3int_rfc
snc/accept_insecure_rfc
Regards,
Sven -
Strobe Media Playback, how to check if playing stream is live (from dynamic plugin)
Can someone guide me how to check if stream is live or not? I check Media Player class, but cannot find anything related.
Edit:
I now check it be flash variable streamType = "live", but id there is better way will be good,Hello,
I'm not sure there is a good solution to your problem on Windows Phone 8.1 (WP8.1). I think your problem is due to the background audio subsystem in WP8.1 doesn't use Zune for playback but instead has a new media manager service that controls what
background audio task is currently playing. If you are writing a Runtime app you can us the
BackgroundMediaPlayer to get this information but this object does not have the concept of a music queue.
Here is more information on background audio for Runtime apps:
http://blogs.msdn.com/b/mediasdkstuff/archive/2014/12/26/backgroundmediaplayer-architecture-on-windows-phone-8-1.aspx
Thanks,
James
Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/ -
How to check plugins in Safari
How do i check which plugins are installed, and change which opens what?
Hi Bavant and welcome to the forums!
If you click on Help in the Safari menu, then on Installed Plug-ins, you will get a list view of all those installed.
As for 'change which opens what' I am not clear on what you mean? -
How to use existing plugin transformation from a new plugin
Hi,
Begginer's question:
I use the SDK examples for a new plugin I want to write.
I want to invoke several commands of an existing plugins from my plugin.
For example I define a new Effect Control: My Opacity. For start I would like to invoke the functionality of Transform->Opacity.
Now, I saw in the example Projector that I can invoke
suites.EffectSuite2()->AEGP_ApplyEffect
Is this the way to do it?
How can I pass the parameter that the user gave me to the needed effect?
I guess rhere is a quicker way to find the effect by name instead of iteration on all available as done in the Projector example.
Thanx in advance,
MiroHello miro A, welcome to the forum!
i'm having some trouble understanding the process you're creating, so i have a couple of questions:
1. is your effect a layer effect? (like "gaussian blur")
or is it a general plug-in? (like layer->transform->fit vertical, or the "wiggler" panel)
the two (effects and AEGPs) differ in many ways and will determine the way you approach the problem.
2. when you say "the parameter that the user gave me", what do you mean?
is there a standard slider on your effect that the user can manipulate?
in the mean time i'll do my best to answer you questions:
yes, suites.EffectSuite2()->AEGP_ApplyEffect() is the way to add a new effect to a layer,
BUT if your effect is a layer effect (again, like "curves"), then you're in for some major problems.
layer effects can't add new effects to the same layer as themselves.
it causes errors and crashes, because by the time your effect returns from it's call AE discovers that the layer has changed in the mean time (you added an effect), and AE doesn't cope with that change well. at all.
no, there is no way of knowing what effect to access on a layer without iterating through them at some point in time.
to access an effect you must retrieve an effectRef.
to get an effectRef you must call it's index on a layer, along with the identifier of a specific layer. (layerH and effect index on that layer (say... 3rd effect))
to know the index, you must iterate though the effects on a layer and check each one for it's name or matchName.
you don't have to do it every time.
you can store the index for later use, but keep in mind that the user might move effects around,
so make smart decisions.
wait. it gets worse.
now you want to affect a parameter on a different effect.
that can be done using streamRefs. these refer to the different parameters on all effects.
once you obtain the streamRef of a wanted parameter, you can read it or write to it.
to get a param's stream ref on an effect for which you already have an effectRef, you must know it's index in the effect. (for example, the "blurriness" on "gaussian blur" is 1 (never 0. zero is the input buffer))
the index is not always what it seems. there may be hidden params (and other stuff in the way).
the param index might change if the vendor of the other effect decides to change it.
in short:
yes, it's as complex as you feared it would be, and as you saw in the "projector" sample. -
How to install a plugin on 64 bits windows 2008 server?
From the developer forum, I found a description which told me how to install a plugin on windows series system, but I only succeded intalling the plugin on 32 bits windows xp, couldn't install the plugin on 64 bits windows 2008 server. Any ideas or advices, men of genius? Thanks :-)
Please check if all your plugins are up-to-date. To do this, go to the [http://mozilla.com/plugincheck Mozilla Plugin Check site].
Once you're there, the site will check if all your plugins have the latest versions.
If you see plugins in the list that have a yellow ''Update'' button or a red ''Update now'' button, please update these immediately.
To do so, please click each red or yellow button. Then you should see a site that allows you to download the latest version. Double-click the downloaded file to start the installation and follow the steps mentioned in the installation procedure. -
How to use trigger/plugin in DSEE 6.3.1
Hi All,
I have DSEE 6.3.1 installed and would like to setup an trigger whenever an application user changes some attributes in LDAP, I googled and came across we can use triggers but not sure how to use those. Is triggers are same as plugins or one of the builtin plugin provide trigger functionality?
The requirement is- Whenever an application owner changes any attribute in LDAP I want to set an trigger and get that changed value in a plain text file for audit purpose. The trigger should work post commit and not pre commit just want to confirm the changes as been written in LDAP.
Found following plugins available in DSEE 6.3.1-
7-bit check
ACL Plugin
ACL preoperation
Binary Syntax
Boolean Syntax
CLEAR
CRYPT
Case Exact String Syntax
Case Ignore String Syntax
CaseExactMatch Plugin
Class of Service
Country String Syntax
DES
DSMLv2-SOAP-HTTP
Distinguished Name Syntax
Generalized Time Syntax
Integer Syntax
Internationalization Plugin
MemberOf Plugin
Monitoring Plugin
Multimaster Replication Plugin
NS-MTA-MD5
ObjectDeletionMatch
Octet String Syntax
Pass Through Authentication
Postal Address Syntax
RMCE
Replication Repair
Retro Changelog Plugin
Roles Plugin
SHA
SSHA
State Change Plugin
Strong Password Check
Telephone Syntax
URI Syntax
chaining database
gle
ldbm database
pswsync
referential integrity postoperation
subtree entry counter for departments in domains
subtree entry counter for domains within a domain
subtree entry counter for mail lists
subtree entry counter for nested departments
subtree entry counter for total domains
subtree entry counter for users
uid uniqueness
value counter for departments
value counter for mail lists
Request your help in this issue.I am trying to use the regular ldapsearch command from commandline and not any C/Java code, like-
ldapsearch -D "cn=directory manager" -p 1389 -h localhost -w abcd1234 -r -C PS:any:1:0 -b dc=abc,dc=com ou=emp
despite using -r and -C option it just comes out displaying below entries
ou=emp,dc=abc,dc=com
ou=emp
objectClass=top
objectClass=organizationalUnit
also tried with below command -
ldapsearch -D "cn=directory manager" -p 1389 -h localhost -w abcd1234 -r -C PS:any:1:0 -b dc=techm,dc=com objectclass=person
it displays long list and just comes out, not sure why its not doing the persistent search after using -r and -C options.
request you to give some good idea on this. -
How to include a Plugin (dll file) in a program
How would I go about utilizing a plugin in my program. By this I mean...lets say that there is an online program for which you have to install the plugin onto your computer in order to use the program. How could I include that plugin into a program that can be used offline, or placed into an online applet, so that other people dont have to download that plugin.
Basically...I want to know how to put a plugin into my program so that no one else has to download it. Instead they just use the program, which includes the plugin.
And just so you all know, the plugin is a *.dll file. Could I just put it in an online folder, and cal to it when it is needed??
Thanks in advance.I apologize, but I am confused because I am not that good at this. How would I refer to it? I do not know how to write a java function so that it will call a .dll file. Also, Im not quite sure what to do when I do call it. Here is specifically what I am trying to do. The plugin that I am trying to use is a download plugin. It is used because some people use a program to upload/protect their files, and the only way to download the files is to use the plugin or the program. The thing that I am confused about is how I use the plugin in my program so that the website I want to download from sees that I have the plugin and allows me to download the files I want by using the plugin which I have stored online. Im sure that the website that I am downloading from checks to see if I have the plugin installed, so how do I make it look at the one that I have online and not search for it on my computer??? PLEASE HELP ME!!! i know that people do things like this all the time, but I am new and need a lot of help.
-
ANSWER: HOW TO DETECT Java Plugin from JavaScript
I created a new topic because the questions about
how to detect Java Plugin in browsers are scattered
thoughout this forum.
Basically you need to employ two approaches for IE and NS.
In IE you need to try to instantiate a small applet
(not your production applet) in order to see if browser
can do it. if the browser can do it, you can make a
call applet from JavaScript in order to find version of
JRE (as well as a host of other things).
In NS you can write a simple JavaScript which will
interrogate the browser for all plugins installed. Then
ypu can make a desicion whether to pass execution to
the next(or generated) page which hosts your applet,
or ask the user to download/install a plugin.
I ecourage everybody to host a plugin on your site
rather leave default link to it which is generated by
html converter.
In order to run sample,
Prerequisites:
Java Plugin 1.3.
If you have a different version of plugin,
substitute hardcoded plugin version in JavaScript for
value that you have.
1. compile java file
2. put class file in the same directory with html file
3. load html file into the browser.
4. press "Check Java Plugin.." button
5. see it work
6. examine code
7. uninstall plugin
8. repeat steps 1 - 4
9. see it work
10. install plugin.
Sample code follows:
**********************HTML FILE BEGIN***********
<HTML>
<HEAD>
<!-- Generated by Kawa IDE -->
<TITLE>Detect Java Runtime</TITLE>
</HEAD>
<SCRIPT LANGUAGE="JavaScript">
var browsername;
function doNetscape()
for (i=0; i < navigator.plugins.length; i++)
for (j = 0; j < navigator.plugins.length; j++)
if(navigator.plugins[i][j].type == "application/x-java-applet;version=1.3")
alert("You are running Netscape with Java Plugin 1.3.0 - OK");
return;
alert("You are running Netscape\nPlease, install Java Runtime Environment 1.3.0");
function doMicrosoft()
var applet = document.myApplet;
if(applet == null)
alert("You are running Microsoft Browser.\nPlease, install Java Runtime Environment 1.3.0");
return;
var version = applet.getJavaVersion();
if(version == "1.3.0")
alert("You are running IE, Java Plugin 1.3.0 installed - OK");
else
alert("You are running IE, other plugin installed - mybe OK if later that 1.3.0\nYour version: " + version);
function getJava()
var applet = document.myApplet;
if(applet == null)
alert("Please, install Java Runtime Environment");
return;
alert("JRE Version: " + document.myApplet.getJavaVersion());
function checkJavaPlugin()
browsername = navigator.appName;
if(browsername.indexOf("Netscape")!= -1)
browsername="NS";
doNetscape();
else
if(browsername.indexOf("Microsoft")!=-1)
browsername="MSIE";
doMicrosoft();
else
browsername="N/A";
alert("Unknown browser: " + browsername);
</SCRIPT>
<body>
<Strong>Check Java Plugin</strong>
<OBJECT id="myApplet" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
WIDTH = 1
HEIGHT = 1 >
<PARAM NAME = CODE VALUE = "DetectPluginApplet.class" >
<PARAM NAME="scriptable" VALUE="true" >
<embed type="application/x-java-applet;version=1.3"
code = DetectPluginApplet width = 2 height = 2 MAYSCRIPT = "true" >
</embed>
</EMBED>
</object>
<FORM>
<INPUT TYPE="button" value="Get Plugin Version in IE" onClick="getJava()">
<INPUT TYPE="button" value="Check Java Plugin in NS and IE" onClick="javascript:checkJavaPlugin()">
</FORM>
</BODY>
</HTML>
**********************HTML FILE END***********
***************APPLET FILE BEGIN***********
import java.awt.*;
public class DetectPluginApplet extends java.applet.Applet
public void init()
add(new Label("DetectPluginApplet"));
public String getJavaVersion()
return System.getProperty("java.version");
**************APPLLET FILE END************Try following java script, it works on new browsers (NS 4+, IE5+). For IE you have to enable 'ActiveX objects creation' in security options.
var agt=navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
&& (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
&& (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
var is_nav4up = (is_nav && (is_major >= 4));
var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
var is_ie5_5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
var is_ie6 = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.0") !=-1));
var is_ie5up = (is_ie && (is_major == 4)
&& ( (agt.indexOf("msie 5.0")!=-1)
|| (agt.indexOf("msie 5.5")!=-1)
|| (agt.indexOf("msie 6.0")!=-1) ) );
var pluginDetected = false;
var activeXDisabled = false;
// we can check for plugin existence only when browser is 'is_ie5up' or 'is_nav4up'
if(is_nav4up) {
// Refresh 'navigator.plugins' to get newly installed plugins.
// Use 'navigator.plugins.refresh(false)' to refresh plugins
// without refreshing open documents (browser windows)
if(navigator.plugins) {
navigator.plugins.refresh(false);
// check for Java plugin in installed plugins
if(navigator.mimeTypes) {
for (i=0; i < navigator.mimeTypes.length; i++) {
if( (navigator.mimeTypes[ i].type != null)
&& (navigator.mimeTypes[ i].type.indexOf(
"application/x-java-applet;jpi-version=1.3") != -1) ) {
pluginDetected = true;
break;
} else if (is_ie5up) {
var javaVersion;
var shell;
try {
// Create WSH(WindowsScriptHost) shell, available on Windows only
shell = new ActiveXObject("WScript.Shell");
if (shell != null) {
// Read JRE version from Window Registry
try {
javaVersion = shell.regRead("HKEY_LOCAL_MACHINE\\Software\\JavaSoft\\Java Runtime Environment\\CurrentVersion");
} catch(e) {
// handle exceptions raised by 'shell.regRead(...)' here
// so that the outer try-catch block would receive only
// exceptions raised by 'shell = new ActiveXObject(...)'
} catch(e) {
// Creating ActiveX controls thru script is disabled
// in InternetExplorer security options
// To enable it:
// a. Go to the 'Tools --> Internet Options' menu
// b. Select the 'Security' tab
// c. Select zone (Internet/Intranet)
// d. Click the 'Custom Level..' button which will display the
// 'Security Settings' window.
// e. Enable the option 'Initialize and script ActiveX controls
// not marked as safe'
activeXDisabled = true;
// Check whether we got required (1.3+) Java Plugin
if ( (javaVersion != null) && (javaVersion.indexOf("1.3") != -1) ) {
pluginDetected = true;
if (pluginDetected) {
// show applet page
} else if (confirm("Java Plugin 1.3+ not found, Do you want to download it?")) {
// show install page
} else {
// show error page
}
Maybe you are looking for
-
Powershell and Outlook 2007, trying to delete messages in a folder older than date
I was hoping to get a powershell script that would do the following 1) Connect to outlook 2007 2) Go to Mailbox folder (not an inbox subfolder) called 'Processes' 3) Delete all email from that folder older than 3 days old I did some searching, I have
-
Converter pictures and videos files to jpg and mpeg
Do you know a safety software o freeware to convert pictures and videos files to jpg and mpeg? to use in my desktop with windows?
-
T440S to T440s - program and data transfer, OS licensing issue
Hi, Obviously not able to open these critters up. I have a new T440s that I would like to transfer my programs and data to. Is there a program out there that can do this without having to pull out the hard drive to image? My current one has Windows
-
License for sap netweaver 7.0 abap trial version not availble on given link
Hi ALL, I install sap netweaver 7.0 abap trial version almost three or four times and every time when i try to obtain a 90 days license for that by the link given in the installation guide, the sap system only shows only two options MBS for windows a
-
Fucntion module to reterieve ANFDT field from the structure RM06E
hi, I need Function module to reterieve ANFDT field from the structure RM06E or is there any other table for this field. Regards, anitha