Weston,
just following up on this, I've gone ahead and made this change for Blob
rendering in the Wicket viewer [1].

In order to try this out, you'll need to build Isis from source [2] and
optionally [3] if you want to build in Eclipse.

You'll then need to change the root pom.xml to use the SNAPSHOT versions,
eg line 33~36 in [4]

In your code, change the property to be of type applib.value.Blob instead
of applib.value.Image, and hopefully it'll work as you wished.

Let me know how you get on or if you get stuck.

Dan

[1] https://issues.apache.org/jira/browse/ISIS-498
[2] http://isis.apache.org/contributors/building-isis.html
[3]
http://isis.apache.org/components/objectstores/jdo/datanucleus-and-eclipse.html
[4]
https://github.com/apache/isis/blob/869668e2cb75447f4c1f783d0164f5a1797a5832/example/application/quickstart_wicket_restful_jdo/pom.xml#L33



On 18 August 2013 08:35, Dan Haywood <d...@haywood-associates.co.uk> wrote:

> Hi Weston,
>
> Yeah, that's a completely reasonable expectation of yours.  Unfortunately,
> it's not implemented.
>
> The background on this is that the oai.applib.value.Image class is pretty
> old code that was originally supported by some of the older Isis viewers.
>  For myself, I'm not completely convinced that Isis should be defining it's
> own Image class, though; at any rate when I wrote the Wicket viewer I
> didn't prioritize writing a UI component to render them.
>
> As things stand, I think I'd rather enhance the rendering of
> oai.applib.value.Blob (introduced comparatively recently).  That class
> contains a MimeType, so we could use that value as a hint to render the
> Blob as an image (eg if set to "image/png" or "image/jpg").
>
> If we went that route, we would eventually kill off Image (probably in
> Isis 2.0.0).
>
> What do you/others think?
>
> Dan
>
>
>
>
>
>
> On 16 August 2013 18:57, Weston Myers <weston.my...@infusionsoft.com>wrote:
>
>> We are trying to add an image into our domain entity and it just shows a
>> tiny text-like field in the wicket viewer.
>>
>> We are using the wicket JDO archetype and the
>> org.apache.isis.applib.value.Image class.
>>
>> We expected the image to have an upload like the attachment does.
>>
>> Please inform us on how we can have images uploaded from the website and
>> stored in the database.
>>
>> Below is the code we are using.
>>
>>
>>
>> private Image image;
>>
>>         @Persistent
>>         @Hidden(where = Where.ALL_TABLES)
>>         @MemberOrder(sequence = "8")
>>         public Image getImage() {
>>                 return image;
>>         }
>>
>>         public void setImage(Image image) {
>>                 this.image = image;
>>         }
>>
>>
>>
>>
>> Thank you,
>>
>> WESTON MYERS
>>
>>
>

Reply via email to