开发者

Set variable value in javascript from wicket

I am trying to开发者_运维百科 set a value to a variable defined in a javascript file from wicket.

Basically I want to pass the set the value of any variable to handlerAjax.getCallbackUrl() so that I could then use that variable in wicketAjaxGet


This will do it.

Wicket Page Component:

Label myScript = new Label("myScript", "url = '" + behave.getCallbackUrl() + "';");
myScript.setEscapeModelStrings(false);
add(myScript);

Add this in html header part

<script type="text/javascript" wicket:id="myScript"></script>

actual call:

var wcall = wicketAjaxGet(url + '', function() { }, function() { });
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜