Hello all,
So, I have a space 'Research Projects', and this space has a class (template
and sheet) associated with it called ProjetClass. It has some properties
such as 'Code', 'Title', 'Researcher', etc....
There are a few things that seem strange and buggy to me, and I'm not sure
what is causing the behaviour.
First off, whenever I click on the button on the space home page to 'create
a new project', there is an error the pops up in the Tomcat window like the
following:
2008-10-27 12:07:17,154
[
http://my_ip_address:8080/xwiki/bin/inline/Research%20Projects/X1?parent=Re…]
[http-8080-2] ERROR web.XWikiAction
Where X1 is the name of the newly created research project object, and
'Research Projects' is the parent space.
I'm not sure what's going on here, as the error message does not supply any
information as to what the error is exactly.
For more information, the 'Research Projects' 'WebHome' page is almost
identical to the FAQ listing page, a simple html form with submit button to
create a new form, and then a list below that of already existing
'Projects'. The html form code I'm using is as follows:
<form action="" id="newproject">
<input type="hidden" name="parent" value="Research
Projects.WebHome" />
<input type="hidden" name="template" value="Research
Projects.ProjectClassTemplate" />
<input type="hidden" name="sheet" value="1" />
<input type="hidden" name="webname" value="Research
Projects"/>
<input type="hidden" name="name" value=""/>
<table>
<tr>
<td>
<input type="text" name="project" value="Project Code
(without
title)" size="40"/>
</td>
<td>
<input type="submit" value="Add this Project"
onclick='if
(updateName(this.form.project,this.form.name)) { action="../../inline/" +
this.form.webname.value + "/" + this.form.name.value; this.form.submit();
}'
/>
</td>
</tr>
</table>
</form>
The second strange behaviour that I have been noting, is regarding this list
of 'already existing projects'. For some reason, this list is not updating
itself whenever a new 'Project' is created and saved. For the list to
actually update, I have to go into edit mode of the page, and then save the
content again (changing NOTHING), then when it goes back to the view mode,
the new additions will be represented. I build this list with the following
velocity/hql:
#set ($results = $xwiki.search("select obj.name from BaseObject obj where
obj.className='Research Projects.ProjectClass' and obj.name<>'Research
Projects.ProjectClassTemplate'"))
#foreach ($item in $results)
#set ($project = $xwiki.getDocument(${item}))
#if ($velocityCount == 1)
<h3>Existing Projects:</h3>
#end
* [${project.display("code")} -
${project.display("title")}>${item}]
#end
Also, whenever I go into edit mode of this page, a warning message appears
on the Tomcat screen, as follows:
WARNING: Parameters: Invalid chunk ignored.
Oct 27, 2008 12:20:10 PM org.apache.tomcat.util.http.Parameters
processParameters
Does anyone have any ideas as to what I'm doing wrong here? The basic
functionality of everything is working, I can create new instances of the
class, and they exist in the parent space. They will also be listed in the
'Existing' section, but only after I re-save the pre-existing code. Seems
quite strange, but I'm not a seasoned XWiki veteran.
Any help or suggestions would be greatly beneficial, thanks for your help!
--
View this message in context:
http://n2.nabble.com/Strange-behaviour-when-page-tries-to-list-objects-of-c…
Sent from the XWiki- Users mailing list archive at
Nabble.com.