I can't seem to figure out how to set a particular value for the Silverlight Plug-in. Specifically, the splashScreenSource value. I'm able to get this working using the param (name/value) method, however, I'm injecting the Silverlight plug-in using JavaScript and therefore not sure how I can get the plug-in to recognize that I do in fact want to use a splashscreen.
It doesn't appear that I can set the value using the args list provided via the default Silverlight.js file.
Silverlight.createObject( source , parentElement , id , properties , events , initParams , userContext );
Any idea's will be greatly appreciated,
thanks much,
The properties parameter is expected to be a JavaScript object whose properties match the set of param names with a few additions such as width and height. So you can pass the following object to properties parameter.
var properties = {splashscreensource: "splash.xaml"};
Related
I'm trying to console.log a variable's value but on the browser console instead of printing the variable (an object in my case), I am getting a Proxy container with format like
Proxy {}[[Handler]]: En[[Target]]: Array(0)[[IsRevoked]]: false
On opening the [[Handler]], I get some inner properties which contains an originalTarget property.
On expanding the originalTarget , my data is shown.
How do I get this data to show properly in console and also access it in my LWC ?
this.variableName returns value in a Proxy
If you want to view proxy data so use this :
JSON.stringify(this.caseList)
And further if you want to use it in your lwc use this:
let cases = JSON.parse(JSON.stringify(this.caseList))
console.log(cases);
I hope you find the above solution helpful. If it does, please mark it as Best Answer to help others too.
Reason : whenever we mark any Javascript object as #track, Salesforce wraps the object inside creating proxy objects.
Solution: #Rajat Jaiswal answer.
I have this scenario where i need to assign a java-script object to div attribute.
var temp["name"]="first";
i assigned it to a div tag attribute using Jquery.
div.attr('data-polygon',temp);
Object [ <div#image01> ]
when i try to retrieve it , it does not come back same.. it is converted as String.
div.attr('data-polygon');
"[object Object]"
Any proper option / alternate to retain the object in attribute? please let me know
Attributes are always strings.
Here are two options for doing this; since you're already using jQuery, the first is probably best:
jQuery's data
jQuery provides the data method for doing this:
// Setting -- notice no "data-" prefix
div.data("polygon", temp);
// Retrieving
varName = div.data("polygon");
Under the covers, traditionally data assigns the element a unique ID and manages a data cache for the element, separate from it. I think in the v3 branch they've updated it to actually store the data on the element (there were memory issues with doing that in Internet Explorer 8 and earlier, which is why jQuery didn't do it before).
Assign it as your own "expando" property
If you don't need to support Internet Explorer 8, you can just create a property on the actual DOM element.
// Setting
rawDiv.myUniquePrefixToAvoidConflicts_polygon = temp;
// Getting
varName = rawDiv.myUniquePrefixToAvoidConflicts_polygon;
Note that to avoid conflicts with the many predefined properties elements have, and future ones they don't have yet, you'll want to use a likely-unique prefix.
I have a php webpage that includes some graphical dials created with css and javascript (and an ajax call). Each dial is added to the webpage using:
$_SESSION['info'] = dial1 Specific info.
include 'dial.php';
$_SESSION['info'] = dial2 Specific info.
include 'dial.php';
Inside dial.php, there is a section that analyzes the SESSION variable to adjust an arm on the dial, and creates the dials circular shape with css. The problem I'm trying to solve is the second dial is a copy of the first dial, and not distinct.
How can I make the above code force each "include 'dial.php'" to operate independently from each other and not interact with each other (since the variables, function names, and css names are the same for each dial).
Best Regards
you can not add two different object into one variable !
make your session variable as an array like below :
$_SESSION['info'][1] = dial1 Specific info.
include 'dial.php';
$_SESSION['info'][2] = dial2 Specific info.
include 'dial.php';
for a better answer , put your dial.php code , I'll update my answer
The session variable can hold many types of data but you need to structure the session variable in a different manner to your initial code. If you were to assign an object as the value ( as below ) you can access the right piece of information easily using the object notation shown below.
$_SESSION['info']=(object)array(
'dial_1' => 'dial1 Specific info',
'dial_2' => 'dial2 Specific info'
);
then access the individual info by
$info=$_SESSION['info']->dial_1;
So I ended up using dynamic html tag ids, function names, and variables. It seems to be working out fine.
I have a form in share with multiple fields using category.ftl. I want to set default values in those fields dynamically. I can set default value by passing static path of category in share-config-custom.xml. But now my requirement is to read values stored in one file and than set those values as default in category.ftl.
For ex, On above screenshot I have set default language as English by passing English reference statically in share-config. So every time when a form renders it sets English as default language. I want this to be changed to set default language to value which is stored in file. So how to pass dynamic reference of category in share-config-custom.xml file?
Any help would be greatly appreciated!!!
You cant configure dynamic things in share-config-custom.xml.For that you need to workj on below things.
For each and every picker in alfresco ,alfresco share is using below javascript file.(This are YUI scripts)
1.generic-object-finder.js
2.object-finder.js
object-finder.js = >
This file is generally used when type of content is authority(users of alfresco).So i think this will be not used in your case.
generic-object-finder.js = >
This file is used for generic picker and using this you can set default values.
======================================================================
Below are steps to set value in picker.
1.Alfresco.util.ComponentManager.list("Alfresco.GenericObjectFinder")
Above method will return all object of picker , We need to pick one by one and set default value one by one in alfresco advanced search.It will return object in array form
2. X.options.defaultValue need to be set.
Where X will first element of Alfresco.util.ComponentManager.list("Alfresco.GenericObjectFinder") array
3.x.selectItems("workspace://SpacesStore/f73a4de7-7a45-412d-ac7d-56061fcf9d76")
Above will set default value.You must need to pass relevant value here.
I’m using the new query params feature http://emberjs.com/guides/routing/query-params/ and trying to figure out an issue when using .property().
In the client side sorting example when I change the name of the methods sortProperties, or paged (I’ve added console output to each) they no longer execute when their observed property changes. The name of the method shouldn’t matter right?
http://jsbin.com/ucanam/5069/edit
You can't rename sortProperties, it's property of Ember.SortableMixin
In your example computed property sets sortProperties: [resultOfComutedProperty] and if you'll rename sortProperties will no reasons to fire it.
paged is just computed property, don't forget to rename it in handlebars template and all will work