Hi Jérôme, On Wed, Sep 30, 2009 at 9:46 AM, Jerome Velociter <[email protected]> wrote:
> Hi Guillaune > > Guillaume Lerouge wrote: > > Hi Devs, > > Silvia and I have been working on updating & improving the FAQ tutorial > > located at: > > http://platform.xwiki.org/xwiki/bin/view/DevGuide/FAQTutorial > > > > Apart from the conversion to 2.0, the most notable change I brought is to > > provide some code to be used on the homepage of the FAQ space. This code > > removes the need for the user to go to the FAQ.FAQClass page to create > new > > FAQs documents. > > I don't understand. I think we used to have a "click here to see the > code needed to create new items of this class" in the class editor, but > I can't find it anymore in XWiki 2.0. It sounds like a regression to me. > The class editor seems to have been rewritten since that time. I had to dig into the XWiki.XWikiClass code to extract only the relevant code to show in the tutorial. > In my opinion, the new entry code we propose on the FAQ tutorial should > be voted here before being changed, as we have to agree on what we > consider best practice. (For example, there is a major difference in the > former code and this new one on the document name-cleaning strategy). > I think the new code removes the need for JavasScript in the form validation button. Thus the JavaScript cleaning that took place during that operation is no longer there. In the tutorial I added an ad-hoc way of cleaning the name that addressed only the 2 issues I had while testing my code. It's definitely not optimal, which is why I asked feedback from the community. Sergiu might know more about this change since he also wrote the blog article creation page to use such a way of coding (call the same page and pass it parameters). Guillaume > Jerome. > > > It's more in line with our current best practices for > > application (very little applications create new items directly from the > > class page). > > > > However in doing so I'm not sure I used the most streamlined code. I'd be > > glad if some users could try following the tutorial to see whether it > meets > > their need and if a dev could give it a look in order to improve it > further. > > > > Thanks, > > Guillaume > > > > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs > -- Guillaume Lerouge Product Manager - XWiki Skype: wikibc Twitter: glerouge http://guillaumelerouge.com/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

