<set-variable variableName="tempId" value="8000" doc:name="Variable" />
<expression-component doc:name="Expression">
<![CDATA[
temp1 = message.payload.getRootElement().selectNodes('//palns/*');
foreach (plan1 : temp1){
plan1.selectSingleNode('planid').text = #[flowVars.tempId];
} ]]></expression-component>
以上是我的代码。我无法在表达式组件中设置流变量值。
如果我硬编码我的价值如下plan1.selectSingleNode('planid').text = '4000';
这是工作。
但我想要我的流量变量值。有什么想法吗?
答案 0 :(得分:1)
只需删除表达式组件中不需要的表达式包装器#[]:
plan1.selectSingleNode('planid').text = flowVars.tempId;
答案 1 :(得分:-1)
var welcomeBoxes = $('.welcomeBoxes'); // use (.) for class like (#) for id
welcomeBoxes.each(function(i){ // i mean index of element and its start from 0
setTimeout(function(){
$(this).toggleClass('fadeInUp animated');
$(this).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(e){
$(e.target).removeClass('fadeInUp animated');
});
}, i * 2000); // 2000 is a setTimeout duration you can change it as you like and we use i * 2000 to make a delay we need
})
表达式组件不需要#[]