James,

I got even closer some minutes ago.

My relationship to ERAttachment is named "erAttachment", so I used an 
ERD2WDisplayImage component with the propertyKey "erAttachment.webPath", like:

100 : pageConfiguration = 'ListImage' => displayPropertyKeys = 
("erAttachment.webPath") [com.webobjects.directtoweb.Assignment]

100 : ((pageConfiguration = 'InspectImage' or pageConfiguration = 'ListImage') 
and propertyKey = 'erAttachment.webPath') => componentName = 
"ERD2WDisplayImage" [com.webobjects.directtoweb.Assignment]

But webPath is not returning the full path, only the filename portion. This is 
what I get in the HTML:

<img src="/0-1.jpg" id="erAttachment.webPath">

I'll be looking at the screencasts suggested by Ramsey, since I want to create 
something like an "image grid" component... I'm gonna need a custom component 
anyways.


Cheers,
Flavio

On 18/11/2014, at 15:52, James Cicenia <[email protected]> wrote:

> Funny -
> 
> I was just looking at this issue. I was hoping to use the path as mine is not 
> stored in the database: imageAttachment.s3Path
> 
> I tried ERD2WDisplayImage but didn’t understand where to set the “src” 
> property since it wasn’t from the d2wcontext
> 
> then ERD2WDisplayImageWithUrl seemed perfect.
> 
> but ERD2WDisplayImageWithUrl gave me an error on my page:
> error on line 191 at column 22: StartTag: invalid element name
> 
> 
>> On Nov 18, 2014, at 11:31 AM, Ramsey Gurley <[email protected]> wrote:
>> 
>> You need to create a component. The getting started screencasts are good. 
>> Especially the ones David LeBer did (WebObjects, WOLips, and Wonder part 1 
>> and 2). He got me started.
>> 
>> http://wiki.wocommunity.org/display/WEB/Screencasts
>> 
>> Creating the component should be relatively straightforward. The tricky bit 
>> is you need to generate the thumbnail. ERAttachment has code to do 
>> thumbnailing, but it doesn’t do it by default unless something has changed 
>> lately. It even has multiple image processors to give you native speed on 
>> some platforms. I think you will probably need to set up a attachment 
>> delegate to create the thumbnails yourself.
>> 
>> This would make a really nice example project for ERAttachment, but as far 
>> as I know, nobody has ever put one together.
>> 
>> 
>> On Nov 18, 2014, at 8:48 AM, Flavio Donadio <[email protected]> wrote:
>> 
>>> Hello, all!
>>> 
>>> 
>>> I took a good look at the online documentation and searched the list, but 
>>> can't find an answer.
>>> 
>>> I have an entity called Image with a to-one relationship to ERAttachment. 
>>> It works perfectly: i can add, edit and delete images. I can even see the 
>>> image in the ERMD2WEditAttachment component.
>>> 
>>> Now I want to display a thumbnail of the ERAttachment in the "ListImage" 
>>> page. I tried some components, but I can't make it work. The best I can get 
>>> (using ERD2WDisplayAttachment) is an icon with the file name which, when 
>>> clicked, will open the image in the browser.
>>> 
>>> Is there a ready-made component that does that or will I have to create 
>>> one? If I'll need to create one, is there a foolproof guide to component 
>>> creation?
>>> 
>>> 
>>> Cheers,
>>> Flavio

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to