开发者

Dojo Tooltip Spring and variable

I have a dojo tooltip in a jspx (roo project) page.

dojo.addOnLoad(function() {
            // create a new Tooltip and connect it to bar1 and bar4
            tooltip1=new dijit.Tooltip({
                connectId : [ "iconInfo"],
                label : "myDesc",
                position : [ "below" ]
            });

        })

I would like to replace the tooltip label : "myDesc" by my var ${p开发者_如何学编程hotodesc}.

How can I do that ?


Forgive me if I have completly misunderstood your question, but are you just looking for to do this:

dojo.addOnLoad(function() {
    // create a new Tooltip and connect it to bar1 and bar4
    tooltip1=new dijit.Tooltip({
        connectId : [ "iconInfo"],
        label : "${photodesc}",
        position : [ "below" ]
    });
});

This is assuming that the 'photodesc' is in the scope of the JS you have written.

In addition, you may want to output the 'photodesc' variable using the c:out tag as this escapes HTML characters to avoid cross-site scripting.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜