Hi
Op 17 jun. 2014, om 07:59 heeft Marius Dumitru Florea
<mariusdumitru.florea(a)xwiki.com> het volgende geschreven:
On Mon, Jun 16, 2014 at 4:53 PM, Gerritjan
Koekkoek
<gerritjankoekkoek(a)gmail.com> wrote:
Hi,
Yes, this surely helps but i fail to get it work as I hope it can.
I have generated a app with App Within Minutes.
In the sheet there is a construct like this:
{{velocity}}
{{html wiki="true"}}
#set ($discard = $doc.use('TestStarRating.TestStarRatingClass'))
#set ($discard = $services.localization.use('document',
'TestStarRating.TestStarRatingTranslations'))
(% class="xform" %)
(((
; <label
for="TestStarRating.TestStarRatingClass_0_Rating">$escapetool.xml($doc.displayPrettyName('Rating',
false, false))</label>
: $doc.display('Rating')
)))
{{/html}}
{{/velocity}}
:$doc.display(‘Rating’) is ‘smart’ as it knows when in ‘View’ and ‘Edit’ mode.
If I would go to the class and modify Custom Display
How can I keep the ‘smartness’ of $doc.display?
Have you really looked at the code of the existing custom displayers
found on
extensions.xwiki.org ? i.e. did you download the source XAR
and imported it in your wiki to check the code? It doesn't seem so,
because you would have seen something like:
#if ($type == 'edit’)
Yes, have looked at it and this is what puzzles me…
In the generated sheet code from app-within minutes there is no notion of this…
I think basically my question is: