Hi devs,
It seems that currently there is no good way to manipulate XWiki objects
and properties in documents without depending on old core.
DocumentAccessBridge defines some methods for changing properties, but
they are very limited, in particular, there is no way to:
* add a new property (except the first one)
* set a property of n-th object (getting it is possible)
* remove an object
* get the number of objects
Therefore I propose to add the following methods to DocumentAccessBridge:
// returns index of the new object
int addObject(ObjectReference obj) throws Exception;
// returns false if there was no object, throws on access error
boolean removeObject(ObjectReference obj, int index) throws Exception;
// number of objects of the given class
int getObjectCount(ObjectReference obj);
// returns index of the object that was modified, adds a new object if
// index is out of range
int setProperty(ObjectReference obj, int idx, String prop, Object val)
throws Exception;
// just to have all needed methods taking object reference
Object getProperty(ObjectReference obj, int index, String propertyName);
I've chosen ObjectReference because it contains (almost) all needed
information, including class name and document reference. It would be
better to have the object index stored in the reference too, like in
org.xwiki.annotation.reference.IndexedObjectReference, but this class is
annotation-specific.
I need those methods to store certificates in user profile, see
https://svn.xwiki.org/svnroot/xwiki/contrib/sandbox/xwiki-signedscripts
WDYT?
Thanks,
Alex
Hello friends,
I would like to propose introducing the use of code names for each release cycle of XWiki (2.x, 3.x, etc.), using a agreed-on scheme (a la Ubuntu [1]). The main reason behind this proposal is that :
A. it's groovy :)
B. there is no B.
As for the code name scheme, with regard to recent events involving a fair portion of the XWiki Development team [2], I would like to propose the use of cocktail names as code names. Some examples - for the sake of illustration : XWiki "Cuba Libre" 2.5, XWiki "White Russian" 2.6, XWiki "Bloody Mary" 3.0, etc. you name it! [3]. Virgin cocktails tolerated :)
The release manager for each cycle would have the honor to pick up the release code name. Isn't that an awesome incentive ?
+1 for all that
Jerome.
[1] https://wiki.ubuntu.com/DevelopmentCodeNames
[2] http://www.xwiki.com/xwiki/bin/view/Blog/XWiki+Seminar'10
[3] http://en.wikipedia.org/wiki/List_of_cocktails
Hi,
"Simple/Advanced" mode definition
http://platform.xwiki.org/xwiki/bin/view/Features/PageEditing#HSimpleandAdv…
After discussing Action Menu Improvements part 2 (
http://incubator.myxwiki.org/xwiki/bin/view/Improvements/ActionMenuProposal2)
we changed the position of "Access rights" from "Edit" submenu to
"Page"
submenu. Until now, changes done by "Advanced" mode were located only in
"Edit" submenu.
A. The question is: what other items do you think should go under
"Simple"/"Advanced" mode? Do we keep the same items? Do we add more? Do we
simplify?
B. Another idea is to change "Simple"/"Advanced" mode into
"User"/"Developer"/"Admin" in the structure we also have the documentation
written.
Obs1. The problem with menus is that they don't rely only on these modes,
but also on the rights the users has to do some actions (like edit, delete,
admin).
Obs2. The ideal way for this topic would be to let administrators decide
what goes into what mode, but even like that, we should still have some
standards values for the modes.
Thanks,
Caty
Hi devs,
The new escaping tests I recently proposed generate a quite large number
of tests and take noticeable amount of time to run.
There are currently 782 escaping tests, they need 8 minutes on my core
duo (for comparision, there are about 1800 tests in enterprise/ in
total, they need 1 hour).
Caleb had an idea about adding a separate Hudson project for them, this
would make it possible to see the cause of failures or, in ideal case,
run functional tests in parallel with escaping tests (if the hardware is
good enough).
WDYT?
Alex
Hello All,
Through Velocity, is it possible to find whether we are in the "Edit" mode
of the document or "View" mode ?
Actually, I wanted to make few changes in the content of the document when
its in View mode. So if I could know the mode of the document, I could just
use some if/else statement.
Thanks in advance for the help.
Manish
--
View this message in context: http://xwiki.475771.n2.nabble.com/Find-current-mode-of-the-document-through…
Sent from the XWiki- Dev mailing list archive at Nabble.com.
The proposal is straightforward, add a method which allows for getting multiple entities at once.
List<T> getEntities(T entityType, List<EntityReference> references)
The reason for wanting to have a bulk getter is because optimizations can be made at the database
level and there are a number of places where multiple documents are loaded at once eg: panels.
For the moment I intend to use an if statement to determine what it's getting and load each of the
entities using the current loader. As usage increases I will begin looking at ways to bulk load.
WDYT?
Caleb
Be advised that deploying on JBoss 5 has an issue in using jython scripts.
I created a patch to fix the problem and submitted it to jython
development to be implemented. That issue can be viewed at
http://bugs.jython.org/issue1639.
In short, the problem is that JBoss 5 introduced the vfszip protocol for
jar files which prefixes "SomeJarFileClass.class.getName()" with
"vfszip:" versus "jar:file:" (which happens in containers like Tomcat) and
jython uses the latter string to obtain the jar filename in order to
produce a classpath for jython. That classpath would point to the jar file
for python modules, like re.py. When using a macro, like the code macro,
you get the error, "ImportError: No module named re".
I made a personal fix by applying the patch to jython 2.5.1 source (the
patch provided to jython maintainers is for version 2.5.2b1, but might
work) and performed a build up to the point where the class
PySystemState.class was created. I then did jar -uvf jython...
org/python/core/PySystemState.class to update that one class. As a side
effect of that command (I guess) I then also had to include jna-posix.jar
from the extlibs directory of the jython distro. in xwiki's lib directory.
Let me know if you have questions by e-mailing directly (if that's an
option). I may not be monitoring this list much longer. I just wanted to
let people know about this.
Hello,
How does XWiki capture mouse events? For example in annotations, you can
select text and a pop-up menu appears. What code captures the text
highlighting and causes a popup to appear? Is it done in javascript or in
the java plugin?
-Melanie
Hello,
Can someone please give me commit rights for the calendar application?
See http://jira.xwiki.org/jira/browse/XACALENDAR-14 (I attached a
patch there, but I would like to be able to commit).
Thank you,
Raluca.