Simple Class - problem with content


I need to add some structural properties (version, module, platform) to an article. I followed “Create FAQ Application” and created three “dictionaries” objects for handling lists of versions, modules and platforms, and then created MyArticle class with DatabaseList poerties for them. Until now all works good.
But now i want to have article text, so I added TextArea property named Content.
so I have Content, bu this property “Content” is not searchable by Xwiki, and templates does not initialize this property.
I don know what to use to have content in this class which will cooperate with template and search engine.
I suspect that maybe I can use in class sheet property/method which wil render something like “standard docunent content” ?

Thanks in advance



Did you create the Aplication with “Application within Minutes”?
If yes, then the editor for the fields of the class should have a special “content” field - not a TextArea named “content”, but something that let you edit the “main content” of the wiki page associated with the object. You wight try to remove your TextArea field and replace by that special field.

I would expect that if you define a property named “content” it will be searchable anyway, but maybe it is “shadowed” by the actual content of the wiki page. What happens if you use a slightly different name for the property? (The property name is internal; you can always edit the “Pretty name” of the property to be “Content” even if the actual name is something different - so from a user perspective it is the “Content” field even if the name is “xyzzy”.)



No. I think by

this property “Content” is not searchable by Xwiki

he means search suggest, which gets the results from some configured sources that look only in some specific fields (e.g. page title and content), unlike the main search page that looks everywhere by default (you need to press Enter in the search suggest to get to the main search page).

Anyway, the best practice in this case is to use the page content for the article content. Either by using the Content field, if you create your application with App Within Minutes, or by modifying the article sheet to display / edit the page content (after the rest of the article meta data).