• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ERAttachment... to-many and thumbs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ERAttachment... to-many and thumbs


  • Subject: Re: ERAttachment... to-many and thumbs
  • From: Denis Frolov <email@hidden>
  • Date: Tue, 23 Nov 2010 08:41:06 +0300

On Mon, Nov 22, 2010 at 11:27 PM, Francesco Romano
<email@hidden> wrote:
> Ok.. I'll try this for the thumbnail..
>
> About D2W...
> I have something like
>
> Product <-->> ERAttachment for a photos property.
> But.. i watched the tutorial of David and he created a many-to-many, so
> Product <-->> ProductPhotos <<--> ERAttachment
> Product has a "photos" property (so a NSArray of ERAttachment).
> But.. I don't know how to manage this with the rules, both on Inspect and on Edit/Create configuration.
> BTW: how can I select the first object of an array with a rule?

You could try "photos.@objectAtIndex.0" but I think a better way would
be to add a cover method "thumbnail" to your Product.java returning
the attachment you need and use it in rule.

> What I want to do is:
> In ListProduct configuration I want to display the thumbnail

Cover method above would help you with this.

> In Edit/Create Product configuration I want to display all the photos in "maximum" size (i don't know yet the size.. I'll decide later)

We use our own custom component for this, but I think you could use
ERDList or ERMDEditRelationship to display/edit the list of photos,
e.g.:

entity.name = 'Product' and task = 'edit' and propertyKey = 'photos'
=> componentName = 'ERDList'

Denis

>
> Thanks again for your answers
>
> Francesco
>
> On 22/nov/2010, at 21.05, Denis Frolov wrote:
>
>> Hi,
>>
>> In fact, the support for thumbnails is already there in the model of
>> ERAttachment. Note the "parentAttachment"/"childrenAttachments"
>> relationships and "thumbnail" attribute. Just create a new
>> ERAttachment for thumbnail and add it to "childrenAttachments" of
>> original attachment. You can use "thumbnail" attribute to specify the
>> size of the thumbnail in case you need multiple thumbnails of
>> different sizes. We use strings like "200x150" for "thumbnail"
>> attribute.
>>
>> As for the D2W, could you be more specific on what the problem is?
>>
>> Denis
>>
>> On Mon, Nov 22, 2010 at 7:49 PM, Francesco Romano
>> <email@hidden> wrote:
>>> Hi.
>>> I have two questions about ERAttachment.
>>> 1) Thumbnails are not available, yet, but.. what do I have to do to add support to them? I don't understand how to implement them "inside" erattachment
>>> 2) I'd like to have a many-to-many relationship between my entity and erattachment. I don't have problems in modeling, but.. how can I manage them using D2W and rules? (I'm creating two apps: an admin app using D2W Modern look, and a "front-end" app without D2W. I have problem in the D2W side...)
>>>
>>> Thank for any help
>>> Francesco Romano
>>>
>>>  _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list      (email@hidden)
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> This email sent to email@hidden
>>>
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: ERAttachment... to-many and thumbs
      • From: Francesco Romano <email@hidden>
References: 
 >ERAttachment... to-many and thumbs (From: Francesco Romano <email@hidden>)
 >Re: ERAttachment... to-many and thumbs (From: Denis Frolov <email@hidden>)
 >Re: ERAttachment... to-many and thumbs (From: Francesco Romano <email@hidden>)

  • Prev by Date: Re: Wonder's Monitor
  • Next by Date: Re: ERAttachment... to-many and thumbs
  • Previous by thread: Re: ERAttachment... to-many and thumbs
  • Next by thread: Re: ERAttachment... to-many and thumbs
  • Index(es):
    • Date
    • Thread