Hello devs,
Now that we entered the release candidate phase for XWiki Workspaces 1.0,
I would like to create a branch for it. Along with delivering a stable 1.0
version, we do also need to start working on the 1.1 version.
I will send an email in the coming days with roadmap and planning for XWS 1.1
For now, here is my +1 to create the branch xwiki-workspaces-1.0.
Regards,
Jerome.
Hi again,
We are trying to figure out how to validate the form field values in XWiki.
For example, if we have a form like this:
<html>
<form name="feedback" action="" method="post" onSubmit="return checkform()">
<input type="text" name="name">
<input type="text" name="email" value="xyz">
<textarea name="feed"></textarea>
<input type="submit" value="Submit" />
</form>
how do we check that none of the fields are left blank, valid characters
etc...
1) Can we use Javascript? If yes, is there a special macro to embed
javascript in xwiki editor?
2)I guess this question goes back to the $msg construct. Is there a msg that
I can display if any fields have wrong values?
Also, when I tried:
<html>
<form name="feedback" action="" method="post" onSubmit="return checkform()">
<input type="text" name="name">
<input type="text" name="email" value="xyz">
<textarea name="feed"></textarea>
<input type="submit" value="Submit" />
# set($name = $request.getParameter("name"))
# set($email= $request.getParameter("email"))
# set($feed= $request.getParameter("feed"))
</form>
The name is $name
the velocity statements just printed as is on the page..the # being
interpreted as 1, 2, 3.
Why did this happen?
Thanks
Hello folks,
finally I found some time to deploy a demo environment and write some
explanations about my work...
go on http://myxwikidemo.dyndns.org:8080/xwiki and click on "improve class
properties management" to access the text presentation and the demo guide...
Sorry for the long text but it also helped me structure my thinking...
it demonstrates how I implemented class versioning in order to better manage
class properties deletion and consequences on existing objects.
This is a private server so it might be slower sometimes ;)
It's a draft based on the trunk so you might discover bugs I don't even know
about.
This is a proof of concept so be indulgent and follow the demo guide to see
it work with your own eyes :)
If you are interested in this idea, tell me...
I'm naturally opened to discussion because I may think in the wrong way or
you may have other ideas...
Anyway, I had fun digging in XWiki code ;)
Don't hesitate to tell me if you discover big problems!
Have fun
regards
Pascal
Thanks a lot Devs. You have been very helpful
As an administrator, I see that rights can be assigned on a user basis and
on a group basis.
What are the rules for assigning these rights if an ordinary member (showing
up in the users list) also belongs to a group.
I am guessing that anyrights applied to the group automatically apply to all
users in the group BUT they do not show up the indivdual users list !
Also, can a user be a member of more than one group ?
I realized that just assignig the global rigths /user rights are not
sufficient!
Space rights also matter!
Is there a way to assign edit/view rights for a group in any space. For
example, if we take the Todo application.
There the creator has an option fo choosing the space in which he wants to
create a new Todo object.
If the user chooses a space where he does not ahve edit/view rights, it's
not going to work right!
It throws error 9001.
so, how can we ensure that groups get rights on the newly created spaces?
On another note: I used the following in the HTML code for creating a form
for creating a new object:
Here I assign the parent of the newly created page as "Main"
But, the page actually gets created in the XWiki space. Is this because the
class I am using belongs to the XWiki space ?
I understand that an Xwiki Page is actually an Object. But then how does
XWiki allow one page to contain multiple objects at once (like commments and
Tags etc...)
Or did I understand it wrong?
'<input type="hidden" name="parent" value="Main"/>
<input type="hidden" name="template" value="HybridPublishClassTemplate"/>
<input type="hidden" name="sheet" value="1"/>
Thanks again Devs.
Hello Devs,
In the past few days, I have been looking a lot at the Velocity templates
and the Xwiki core code.
There are a few things I am not able to understand.
1) Where is $msg variable defined in the core code? I see it a lot in the
scripts. Is it a hashtable for messages. Where is it defined?
2) what is referred to by "xpage","xredirect"
For eg. in the following mehtod from Utils.java
public static String getPage(XWikiRequest request, String defaultpage)
{
String page;
page = request.getParameter("xpage");
if ((page == null) || (page.equals(""))) {
page = defaultpage;
}
return page;
}
does this mean, that if a page with that name exists in the template
directory(xpage), it will be returned. But, what is defaultpage?
Currently the login page does not show any error if the provided credentials
are wrong. (authentication with LDAP)
A look at the LoginErrorAction.java in the Web package revealed that it
returns the same string as the LoginAction - "login"
so, if I created anither loginerror.vm in teh templates folder and returned
"loginerror" in the render function of this LoginErrorAction.java class, it
would run the new script.
But, at this stage I do not know what would be the content of the
loginerror.vm....
#xwikimessageboxstart($msg.get("error") $msg.get("notallowed")) - would
this work?
I picked this up from accessdenied.vm ...
Thanks for all help
Thanks
>
>
> Message: 8
> Date: Wed, 16 Apr 2008 23:27:57 +0200
> From: "Guillaume Lerouge" <guillaume(a)xwiki.com>
> Subject: Re: [xwiki-devs] What is $msg ?
> To: "XWiki Developers" <devs(a)xwiki.org>
> Message-ID:
> <1c35d2320804161427n3f69229bs6d2bb425d00e13c1(a)mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi Kamna,
>
> In the past few days, I have been looking a lot at the Velocity templates
> > and the Xwiki core code.
> > There are a few things I am not able to understand.
> >
> > 1) Where is $msg variable defined in the core code? I see it a lot in
> the
> > scripts. Is it a hashtable for messages. Where is it defined?
>
>
> $msg is the code used to get translation messages. Basically when you
> write
> $msg.translation or $msg.get("translation"), upon parsing of the page by
> the
> Velovity parser the engine looks into the translations file. if it finds
> something such as translation=NiceTranslation, it turns $msg.translation
> into NiceTranslation when rendering the page.
>
> 2) what is referred to by "xpage","xredirect"
> >
> > For eg. in the following mehtod from Utils.java
> >
> > public static String getPage(XWikiRequest request, String defaultpage)
> > {
> > String page;
> > page = request.getParameter("xpage");
> > if ((page == null) || (page.equals(""))) {
> > page = defaultpage;
> > }
> > return page;
> > }
> >
> > does this mean, that if a page with that name exists in the template
> > directory(xpage), it will be returned. But, what is defaultpage?
> >
>
> They are used to return specific actions when ?xpage= is appended to a
> page
> URL . For instance, /xwiki/bin/view/Main/WebHome?xpage=plain will render
> the
> content witout any style, /xwiki/bin/view/Main/WebHome?xpage=print will
> render the page in print mode...
>
> Similarly, ?xredirect takes another url as a parameter and sends the
> viewer
> to the given page. When you try to access a page you cannot see, it's the
> action used to send you back to the page from the login page.
>
if xpage = "mypage" then it would pass the control (request) to a vm
template file mypage.vm and the rendering or response of the request would
be as defined in mypage.vm
>
> > Currently the login page does not show any error if the provided
> > credentials
> > are wrong. (authentication with LDAP)
> > A look at the LoginErrorAction.java in the Web package revealed that it
> > returns the same string as the LoginAction - "login"
> > so, if I created anither loginerror.vm in teh templates folder and
> > returned
> > "loginerror" in the render function of this LoginErrorAction.java class,
> > it
> > would run the new script.
> >
> > But, at this stage I do not know what would be the content of the
> > loginerror.vm....
> > #xwikimessageboxstart($msg.get("error") $msg.get("notallowed")) - would
> > this work?
>
>
> Not quite sure... Though trial & error sounds like a nice tactic ;-)
>
> Guillaume
>
>
Greetings Devs,
Please forward the job description below to anyone you know who is qualified
and would be interested in such a position.
Thank you
-Joshua
----------------------------------------------------------------------------
----------------------------
Curriki.org is a non-profit "Education 2.0" organization seeking to create a
community and tools for developing, distributing and evaluating open source
curricula and content
Since being launched by founders of Sun Microsystems in 2006, we have grown
quickly to over 35,000 registered users and have been featured in TIME
Magazine, The SF Chronicle, Popular Sciences, The International Herald
Tribune, Education week, and scores of blogs and articles elsewhere. We are
pioneers in collaborative content creation tools and "OER"- Open Educational
Resources.
We're currently looking for an experienced senior Java application developer
to help refine, improve and extended our open source hosted web application.
We are looking for a contractor to work with us to implement new features
and also improve and in some cases re-factor elements of the existing code.
Experience with and an interest in open source projects, Java and the
ability to learn new systems and languages quickly are all necessary
attributes of the successful candidate. We are looking for a detail oriented
individual who is not happy until things are just right. As a completely
virtual organization, you will be expected to work remotely, independently
and must provide your own development environment (Hardware and software),
and broadband internet access. You will also be expected to attend virtual
meetings and be generally available via IM during core working hours.
RESPONSIBILITIES:
. Implement features and bug fixes as assigned by the site producers and the
CTO.
. Evaluate and improve code in areas where problems are identified.
. Review and work with the development team to more fully document the code
and system and create additional unit test scripts where needed.
. Take responsibility for maintenance releases for fast turn around of
production issues and bugs.
. Provide back-up support for build and release engineering and Unix System
administration.
. Work with the design team to evaluate and improve the site style sheets
(CSS) and presentation layer (Velocity scripts).
. Help bring the platform to a point where partners can compile and deploy
the code, and provide support for partners who are working to run a Curriki
server.
QUALIFICATIONS:
. Five or more years experience with J2EE Web application development.
(Extra credit for experience working with the XWiki application -
www.xwiki.org <http://www.xwiki.org/> or its key parts including Velocity,
Groovy and GWT.)
. Experience with as many of the following technologies and open source
projects as possible: My SQL, XWiki, Sun Java App Server, Solaris 10/zones,
Hibernate, Lucene, Groovy, Velocity, Google Web Toolkit, JSR-168/286,
JCE/JSR-170
. Strong background and interest in Open Source software development and
E-Learning technology desired but not required.
. Ability to work within a distributed remote team and demonstrate strong
work ethic.
. Highly articulate with clear speaking and writing skills.
. Extreme attention to detail and ability to QA your own work quickly.
Please respond with resume and number of hours of availability per month to
mailto:jobs@curriki.org. Hourly contracting rate negotiable based on
experience.
Joshua Marks
CTO
Curriki: The Global Education and Learning Community
jmarks(a)curriki.org
www.curriki.org
US 831-685-3511
Hello,
Can anybody tell me how to add an object of an already created class to a
new page using Velocity...not the interface provided by Xwiki.
Which method do I need to call to achieve this!!!
Thanks
Hi,
In the new xwiki architecture we need to take a call for passing the
request, response and session around (what is currently called the
XWikiContext). We have 2 solutions:
1) we pass it around for all method calls as it's currently done
2) we use ThreadLocal(s). If you don't know what it is see for ex: http://crazybob.org/2006/07/hard-core-java-threadlocal.html
.
The advantage of solution 2) is that any component in the new
architecture can decide to have the Container component injected (see http://svn.xwiki.org/svnroot/xwiki/xwiki-platform/core/trunk/xwiki-containe…)
and thus be allowed to access the request, response and session
objects without having all its method add a Container object passed to
it.
The downside of solution 2) is simply that we associate Unit Of Work
with Threads. But since we use a Servlet model and since I don't see
any foreseeable future where we would want to use several threads for
the same unit of work, I don't think this is limitating for us. See http://blog.objectmentor.com/articles/2007/09/04/thread-local-a-convenient-…
for some explanation on this.
So right now and even though ThreadLocal sound a little bit "hackish",
I think this is still my preference as it'll save us from having to
pass Container objects everywhere.
Since this is an important architecture decision I wanted to have a
vote for it.
Thanks
-Vincent
Hello all,
I went through the TodoClass tutorial and found it useful.
I have a question regarding this functionality.
Are these classes or the values of the properties for its instances saved in
any table in the Xwiki database?
Say, we use Classes and Objects to create a form that the user needs to
create a document. Will the form values be saved in a database?
How can we access the values of any instance of the created class?
Also, how do we Delete a property from a Class definition? (If added by
mistake while creating the class)
Thanks for all help