THANK YOU SERGIU.
About my question on passing values back from .vm file to the wiki page
where I call the .vm file:
The reason I am using a template is that there is a select box on that wiki
page and some information needs to be fetched based on the value user
selects.
To be able to use the value selected by the user, I need to do an HTML Post
first.
so, I submit the form and the values are processed by a template and now I
need to display the value calculated in the template, on my xwiki page.
I tried some stuff but did not work. So, now I am actually creating an
object on that page and set its properties with the value calculated in the
template.
any other better way of doing this?
Is it possible to access the selected value on the wiki page without doing
a post?
what does $!{value} provide...I do not understand the ! before the variable
name.
On another note:
In the object solution for this problem, I try to set the object property
(of type Number) with a velocity variable which also has a numeric value.
when I save the document after setting the object values, it gives me an
exception on the "save" method.
Error number 3201 in 3
Wrapped Exception: java.lang.Integer
I checked the type of Number for that property and changed it from long to
Integer in the class editor but, it still gives this error.
I am also setting a boolean value in the object. I noticed that the boolean
fields take values 0 or 1 but display them as No or Yes.
So, when we "get" we get Yes/No and when we "set" we have to set 0 or
1.
could that be causing the exception?
I ma not sure what is causing this exception. but when I hit the back
button, I see the values of the object properties set appropriately and
displayed. Only when I do the $response.sendRedirect with "save", it throws
the exception.
Do I need to use Util.parseInteger or Util.toNumber in any of these cases
(before setting the Object property value to a number)
Please advice.
Thanks a lot
Kamna