Add outargument from activity to a Dictionary via Expression Editor - workflow

I want to add the outcome of my activity (using the expression editor) to an existing dictionary which is a workflow variable so something like..
dictionary.Add("key", this)
Or am I missing something here? Cheers

If I understood correctly I think I can help you.
Add it like that:
New Dictionary(Of String, String) From {{"MyParam", "ItsValue"}}
I've found it here:
http://social.msdn.microsoft.com/Forums/en/wfprerelease/thread/02eb6512-e6db-44ec-a8ca-8126dea3a8a4

Related

How to make copy of array's elements in the dart

Getting wired issue like main array has been changed if changed value of another array. I think issue is about copying same address, not sure but just thinking of it. I have tried from last 3 hours but unable to get rid from it.
Look at below illustration to get better idea.
List<page> _pageList;
List<page> _orderList = [];
_pageList = _apiResponse.result as List<page>;
_orderList.add(_pageList[0].element);
_orderList[0].title = "XYZ"
//--> Here if I change the `_orderList[0].title` then it also change the `title` inside "_pageList"
How can we prevent the changes in main array?
I got same issue in my one of the project. What I have done is, use json to encode and decode object that help you to make copy of the object so that will not be affected to the main List.
After 3rd line of your code, make changes like below
Elements copyObject = Elements.fromJson(_pageList[0].element.toJson());
// First of all you have to convert your object to the Map and and map to original object like above
_orderList.add(copyObject);
Hope that will help you.
You can use a getter function to create a copy of your list and use that instead of
altering your actual list.
example:
List<Page> get orderList{
return [..._orderList];
}
Lists in Dart store references for complex types, so this is intended behaviour.
From your code:
_orderList.add(_pageList[0].element);
_orderList[0] and _pageList[0].element point to the same reference (if they are non-primitive).
There is no general copy() or clone() method in dart, as far as i know. So you need to copy the object yourself, if you want a separate instance. (see this question)

How to load data into Ext.tree.TreePanel (not through ajax)

in example here
http://docs.sencha.com/ext-js/3-4/#!/api/Ext.tree.TreePanel
i can see property dataUrl: 'get-nodes.php',
but how i can change data from inside my code? there is no store property or setSource method
EDIT:
as i found, one of the possibilities is to create my own Ext.tree.TreeLoader that would have setSource method and use it instead of default
maybe there is more variants?
EDIT:
seems there is already a solution for this
http://www.sencha.com/forum/showthread.php?4595-Creating-Ext.tree.TreePanel-from-static-JSON-data-in-one-shot
seems there is already a solution for this
http://www.sencha.com/forum/showthread.php?4595-Creating-Ext.tree.TreePanel-from-static-JSON-data-in-one-shot

Using Eclipse's JDT, how does one get an IType from a class name?

Is there a simple, straightforward way to get an IType from a class name? I think there must be some static method somewhere. Basically, I'd like to do something like:
IType objectType = Somewhere.getType("java.lang.Object")
Does anybody know of something like this? I have been searching in vain.
Given an IProject, one can use the IJavaProject#findType methods, e.g.
IType objectType = project.findType("java.lang.Object");
Look at org.eclipse.jdt.core.search.SearchEngine. I haven't tried it myself, I'm usually using the ASTParser with the Resolve option on (that's when you parse a source), but it should do the trick.

Do Not Escape setAttrib() Method (Zend_Form)

I would like to add an attribute to some form elements in the action controller, I can do it like this:
$form->element_name->setAttrib('description', 'Anchor');
However in the above example the second argument gets escaped. I would like to have it unescaped. How can I do that?
You can use $decorator->setEscape(false); on Description decorator. Retieve it like $descriptionDEcorator = $element->getDecorator('Description');
You may have to experiment a bit but typically
$element->setAttrib("escape", false);
should work. I'm using it to not escape the content in a Zend_Form_Element_MultiCheckbox subclass right now. There's a setEscape method in the Decorator abstract that I believe this flags but the documentation isn't clear (as made obvious by the "enhancement" request).

Wicket: how to use the BodyTagAttributeModifier class?

i'm trying to dynamically add the class attribute to the body tag, and i came across this class. but i can't seem to understand how to use this class. i have something like this in my page class (or panel class, as i tried with that too):
add(new BodyTagAttributeModifier("class", "homepage", this));
this doesn't even compile, saying there's something wrong with the 2nd parameter. but i think String is automatically considered a Model in wicket, like the Label class. am i missing something here?
What if you just add an wicket:id to the body attribute and use the AttributeAppender class? Or, if the body attribute already has an id, can't you just use this class?
http://wicket.sourceforge.net/apidocs/wicket/behavior/AttributeAppender.html
Some Wicket Components have this String-to-model-shortcut (like Label), but it's not a general feature. You have to convert your String into a Model manually:
add(new BodyTagAttributeModifier("class", Model.of("homepage"), this));