Hello Devs,
I am stuck again.
I am trying to pass a value from a velocity template to an html form field
on an XWiki page. How can I do this?
Basically, I have a form in xwiki that has 2 buttons. One is of type button
and a click on it displays the number of objects of a particular type in the
input field beside it.
The second is a "Submit" button becuase I need to POST the value of a
selected object from this form to the template. the template calculates some
value and this value need to be filled in the input (number) filed on the
form. How do I return the calculated value from the velocity template back
to the xwiki page.
I tried $response.sendRedirect("url of that page", "name of html field =
${value calculated in the template}")
but this does not work.
Has anybody tried this before. Any answers to this and the questions in the
forwarded mail will be highly appreciated.
Waiting in anticipation.
Thanks
---------- Forwarded message ----------
From: Kamna Jain <kammy.scorpi(a)gmail.com>
Date: Tue, May 20, 2008 at 12:06 PM
Subject: Miscellaneous Questions
To: XWiki Developers <devs(a)xwiki.org>
Hello Devs,
Sachin, thnaks for your response to that mail. I will try that idea.
I have questions regarding a few miscellaneous topics:
1) Watch List - Is there anything we need to add/modify in order for the
Watch list notifications to work?
-> I have the email ids in the user profile
-> have 2 pages being watched
-> the xwiki.cfg has the watchlistplugin and the mailsender plugin included
-> I came across a watch.vm and watchlistrss.vm in the templates folder..but
nothing for mail...
-> also, in the menuview.vm, just where the Watch menu begins, there is a
comment:
We're disabling the Watchlist menu for now since the Watchlist doesn't work
yet in multiwiki
## mode. Remove when
http://jira.xwiki.org/jira/browse/XPWATCHLIST-4 is
fixed.
What is this for?
Please advice on how to get it to work.
2) We have noticed that every time a person logout of Xwiki and logs back
in, Xwiki redirects the ser to the page where he hit the logout!
This becomes an issue when a different user logs in on the same PC and he
would expect to be redirected to the home page, but instead he is taken to
some othe rpage.
I am looking at the login.vm - the first few llines:
#if($context.user!="XWiki.XWikiGuest")
#if($request.xredirect)
$response.sendRedirect($request.xredirect)
#else
$response.sendRedirect($xwiki.getURL("Main.WebHome"))
#end
#elseif($doc.fullName != "XWiki.XWikiLogin")
#set($qs = "")
#set($qs = $request.queryString)
#if(!$request.getParameter("xredirect"))
#set($qs = "xredirect=$util.encodeURI($doc.getURL('view'))&${qs}")
#end
$response.sendRedirect($xwiki.getURL("XWiki.XWikiLogin", "login",
$qs))
#else
###
### Login page
###
###
-> Do I need to change anything here. What does $request.xredirect return?
Please indicate which lines need to be altered/commented, so that users are
always directed to home page when they log in.
Kindly help. Waiting for your responses.
Thanks