I'm not sure if this will suit your application, but when I have to send a value back to Confluence, I use a small JS wich post the information back to Confluence when I have a servlet waiting for the reply (my class extends ConfluenceActionSupport and implements ServletRequestAware). Here you have some code snippets:
AJS.$(function() { ... AJS.$.post($var.attr("action"), { var1: "value1", var2: "value2" }, function(xmlresponse) { ... } }
public class MyClassAction extends ConfluenceActionSupport implements ServletRequestAware, PageAware { private String var1; private String var2; public String execute() throws Exception { ... } public void setVar1(String value) { this.var1 = value; } public void setVar2(String value) { this.var2 = value; } }
Frake,
I think you need to clarify this: velocity templates are used to generate the HTML. Once it is generated, it is sent back to the client. End of story. To go back on the server side, you will need to make a HTTP request again (either by AJAX - like above - or by normal means, i.e. <form action="/secure/Blabla.jspa" method="post"> .... </form>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.