[xwiki-devs] Miscellaneous Questions
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
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@gmail.com> Date: Tue, May 20, 2008 at 12:06 PM Subject: Miscellaneous Questions To: XWiki Developers <devs@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
Kamna Jain wrote:
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.
I don't fully understand what you want to do. Why redirect? Can't you just use <input value="$!{value}"... ? Isn't the HTML form in the same place where the script is?
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?
That comment is only for virtual (multiwiki) mode. If you are not in virtual mode, then watchlists should be working. If it isn't then make sure you have a sendmail server running (XWiki isn't a mailserver, so it must use something existing).
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.
In login.vm, replace: <div class="hidden"><input type="hidden" name="xredirect" value="$!request.xredirect" /></div> with: <div class="hidden"><input type="hidden" name="xredirect" value="$xwiki.getURL('Main.WebHome')" /></div>
-> 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.
-- Sergiu Dumitriu http://purl.org/net/sergiu/
On Tue, May 20, 2008 at 7:06 PM, Kamna Jain <kammy.scorpi@gmail.com> wrote:
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..
You need to set the admin email and a valid smtp server in Administration > Preferences > Registration
-> 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.
The watchlist feature is not fully working with a multiwiki installation (virtual wikis, XEM, whatever you call it) for the moment. That's why it is disable in this case (which is not you case since you've been able to mark 2 pages as watched). -- Jean-Vincent Drean
participants (3)
-
Jean-Vincent Drean -
Kamna Jain -
Sergiu Dumitriu