Hello,
I modified a small application in my Xwiki where i have a class and a picture field. For this picture field i used a custom display macro to show the picture in view mode and select a picture in edit mode. It uses the the attachmentselector macro to select the image. But this have the limitation that i just can upload a new picture and not select an existing one.
How can i use the newer attachmentPicker to update the class property?
Here is my velocity code if it helps you:
{{velocity}}
#if ($type == 'edit')
{{attachmentSelector className="Event.Code.EventClass" property="picture" filter="png,jpeg,jpg" displayImage="true"/}}
##{{attachmentGalleryPicker filter="image/*"/}}
#elseif (($type == 'view') && ($!value!=''))
[[image:attach:$value|| width="100%"]]
#else
$value
#end
{{/velocity}}
Thanks