On 16 October 2015 at 15:51, Cesar Lugo <[email protected]> wrote:

> Hello.
>
>
>
> Is there a way to display a list or collection of images (with or without
> associated fields) on the Wicket Viewer?



the short answer is no, this isn't built in.  But the Wicket UI viewer is
flexible enough to allow this functionality, in the same way that the gmap3
and fullcalendar2 plugins work.

In fact, this feature did exist, in crude form, in an earlier version of
the Wicket UI, and I see that the code hasn't actually been removed
(there's a TODO from martin-g noting that the class is unused).

It ought to be possible to resurrect this, and bring in the wicket
component that we already have for displaying images.

If you want to have a go at implementing this, here's some pointers:

the theory:
*
http://isis.apache.org/guides/ug.html#_ug_extending_wicket-viewer_replacing-page-elements

how this is done by the gmap3 component:
*
https://github.com/isisaddons/isis-wicket-gmap3/blob/master/cpt/src/main/java/META-INF/services/org.apache.isis.viewer.wicket.ui.ComponentFactory
*
https://github.com/isisaddons/isis-wicket-gmap3/blob/master/cpt/src/main/java/org/isisaddons/wicket/gmap3/cpt/ui/CollectionOfEntitiesAsLocatablesFactory.java#L52
*
https://github.com/isisaddons/isis-wicket-gmap3/blob/master/cpt/src/main/java/org/isisaddons/wicket/gmap3/cpt/ui/CollectionOfEntitiesAsLocatablesFactory.java#L98

// the unused code
*
https://github.com/apache/isis/blob/master/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/icons/CollectionContentsAsIconsPanelFactory.java

// the Blob component that renders Blob as an image
*
https://github.com/apache/isis/blob/master/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/isisapplib/IsisBlobPanel.java





> And / or display an image in other
> places than the corresponding object form? .
>
>
No, but you could, if you want, define a custom component for entity page
for a particular type of object and render whatever you want in there.

The EntityCombinedPanelFactory is the factory that is used by default for
all entities, so register another implementation for the
ComponentType.ENTITY for your particular object.


HTH
Dan


https://github.com/apache/isis/blob/master/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/combined/EntityCombinedPanelFactory.java




>
>
> Cesar.
>
>
>
>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>

Reply via email to