2

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

1 Answer 1

7

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() { });
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.