Hi,
I want to be able to have two instances of a class object display in a
single page. I imagine I have to make some changes to the classsheet to get
this to display? Can someone give me some pointers?
thanks
--
View this message in context: http://n2.nabble.com/Display-two-instances-of-class-object-in-a-single-page…
Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hi Guys (and Fabio in particular),
I've struggled a bit to have a REST client written with Httpclient and
Jaxb. The micro sample on the wiki
(http://platform.xwiki.org/xwiki/bin/view/Features/XWikiRESTfulAPI) was
not correct (the parameter to JAXBContext.newInstance was wrong) and
there was no example for some other calls than GET a wiki page.
Finally when you write a sample using maven and jaxb you need the JAXB
model and this makes your maven dependency need the whole xwiki core as
you need xwiki-rest.
We should separate xwiki-rest-jaxb model in a separate JAR that does not
have other depencies than JAXB and provide a maven sample which is easy
to customize.
WDYT ?
Ludovic
--
Ludovic Dubost
Blog: http://blog.ludovic.org/
XWiki: http://www.xwiki.com
Skype: ldubost GTalk: ldubost
Hello folks,
I have a proposed method for migrating the captcha plugin to a component.
I have posted a patch here: http://jira.xwiki.org/jira/browse/XWIKI-4741
which contains the core modifications which I am proposing. Though I have
a patch, this is still in the design phase and I welcome anyone to suggest
changes.
ComponentRole: Captcha
/**
* Check if the solution to the captcha is correct.
*
* @param answer The provided solution.
* @return true if the solution is correct.
*/
boolean isAnswerCorrect(String answer);
Implementing components:
DefaultImageCaptchaAction
DefaultSoundCaptchaAction
The new DefaultImageCaptcha component can be used to solve captchas which
were downloaded through the old struts based jcaptcha plugin. Both components
also implement org.xwiki.action.Action and when execute() is called, they
send a captcha to the response.
The components depend on the request and response in the container being
servlet request/response because com.octo.captcha.module.web.image.ImageToJpegHelper
and com.octo.captcha.module.web.sound.SoundToWavHelper require HttpServletRequest and
HttpServletResponse. Also to get the ID of the session in a way that is compatible
with the old struts based method of getting captchas, an HttpServletRequest is needed.
I am not happy with this design as it demands the use of the if instanceof then cast
hack. I would like to hear any ideas about how to clean this up.
There is also a velocity initializer which provides a captcha service with:
/**
* Check if the solution to the captcha is correct.
*
* @param captchaName The name of the Captcha you are checking the answer against
* @param answer The provided solution
* @return true if the solution is correct
* @throws UnsupportedOperationException If there is no captcha by the name captchaName
*/
public boolean isAnswerCorrect(String captchaName, String answer) throws UnsupportedOperationException
and
/** @return a List of the names of all registered classes implementing {@link org.xwiki.captcha.Captcha}. */
public List<String> listCaptchaNames()
In my opinion the html should all be in the application side and the core code
should not even know it's URL. I am working on an application and would be
interested to hear what requirements you think it should meet.
Sorry for the long mail, I am anxious to hear your ideas about this.
Caleb James DeLisle
The XWiki development team is pleased to announce the release of XWiki
Enterprise 2.2 Milestone 1.
Go grab it at http://www.xwiki.org/xwiki/bin/view/Main/Download
This is first milestone of the XWiki Enterprise 2.2 version. This
release mainly introduces new Model, the possibility to register wiki
macros for any user or wiki and many improvements of xar import.
Main changes from 2.1.1:
* Contextual wikimacros
* New Model module with Reference implementation
* XAR Import improvements
* Allow set to null in velocity
* Upgraded to Groovy 1.7
* Lots of accessibility fixes
* Lots of bugs fixes
For more information see the Release notes at:
http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesXWikiEnterprise22M1
Thanks
-The XWiki dev team
Hi,
Just got an idea: Create an AbstractComponentTestCase implementation that does this in its setup/init() method:
- automatically ask the Component Manager for the list of dependencies for the component under test (can be done with a generic for example to know which component class is under test) and for each of them register a mock implementation automatically.
The advantages:
- remove lots of boilerplate testing code to register mocks of dependent components (all the component descriptor creation)
- ensures that top level dependencies are mocked and not deps of deps (best practice)
- ensures each component is tested in isolation thus focusing on testing what it does
- remove the need for the execution context or configuration source specific inits we have in current AbstractComponentTestCaset implementation
- allow to call the annotation loader to register *only* the component under test (and its graph of components) rather than initializing *all* components for each unit test! This will multiply by x100 the speed of our unit tests I believe.
WDYT?
Thanks
-Vincent
Is this wrong?
The test case is:
create a document, put this in it:
{{html}}
<i>italics</i>
{{/html}}
create another document, put in it:
{{velocity}}
#includeInContext("Test.FirstDocument")
{{/velocity}}
view and observe result:
<p><em>italics</em></p>
html is escaped.
I think the problem (if this is considered a problem) is that #includeInContext
(or #includeForm) returns a String so the content is parsed twice.
Caleb James DeLisle
Hi some notes (for myself to remember and for visibility) about what's left to do with Entity References before 2.2 final:
1) Continue migrating code to use reference objects instead of Strings. XWikiDocument class mostly done (but some work remain). Next to do: hibernate store, XWiki class. Then API package classes.
2) Decide how we handle velocity scripts. Either we handle reference objects in velocity or we continue to use strings. Note that some vm files currently do stuff like: $somespace + "." + $doc.name
3) Decide if we want to check for null names in EntityReference. If we do then we cannot use the normalizing feature for nulls anymore, which is useful. In this case we'd need to find another solution.
4) Implement extensible EntityType (ie not enum)
5) full retest of XE/XEM
6) Move to aspects deprecated methods as much as possible (except those that are required by Hibernate of course, such as get/SetWeb(), get/setSpace, get/setDatabase, etc). This means having moved all existing code to not use the deprecated methods anymore.
7) Agree on the need and format for object/property/class references (Anca's mail)
Note that 1), 6) and 7) don't have to be absolutely finished for 2.2 final but the others do.
Thanks
-Vincent
Hello,
I'm still digging into the XWiki grammar file and noticed another odd
thing. Wiki parameters at the beginning of a line terminates a block.
Compare these two examples:
| table cell
(% style="color: blue;" %)
new paragraph
| table cell
(% style="color: blue;" %)
continuing table cell
Is this intentional?
Best regards,
Andreas Jonsson