• 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: binding trouble
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: binding trouble


  • Subject: Re: binding trouble
  • From: Mark Morris <email@hidden>
  • Date: Fri, 24 Jun 2005 11:18:48 -0500

Hi Amedeo,

Would you mind restating the question, because the way I'm reading it it still seems that David's solution will work. As he states, though, you might need a separate method for each occurrence of an image in your .html, which would take the place of a static parameter. (Of course, if it's not a static parameter but rather a variable, it can be accessed directly from the method.)

That was the long way of saying variable and methods in conjunction with WORepetitions and such cause lots of confusion when you're first exposed to it, but it's because it's so simple and useful, you have trouble believing it! ;-)

Regards,
Mark

On Jun 24, 2005, at 10:47 AM, David LeBer wrote:

On 24-Jun-05, at 11:24 AM, Amedeo Mantica wrote:


thanks David, but this works fine If i have only an image in my item object, but i have more images, so i need to pass to the function the image name...

for example, following your example:

public String imgSrc(String aFileName) {
        return "myPath" + aFileName;
}

and bind the WOImage to imgSrc(listItem.theFileName())


The bottom line is that there is no way to pass the parameter to the method via a binding (without using WOOgnl from ProjectWONDER that is).


You have a couple of options:

One would be to add a fileNameToPath cover method for each image.

However, I would probably fix this by creating a reusable component that wraps WOImage (MYImage), has a filePath and fileName binding that accepts the fileName appends the filePath and hands it off to the WOImage src. This would eliminate any additional logic on your main component, you could just bind it up.

;david

--
David LeBer
Codebase Software Systems
site:   http://www.codebase.ca
blog: http://david.codebase.ca


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40onpointsoftware.com


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
References: 
 >binding trouble (From: Amedeo Mantica <email@hidden>)
 >Re: binding trouble (From: David LeBer <email@hidden>)
 >Re: binding trouble (From: Amedeo Mantica <email@hidden>)
 >Re: binding trouble (From: David LeBer <email@hidden>)

  • Prev by Date: Re: Multiple submit in one Form
  • Next by Date: Re: Using Old EOModeler with WO 5.3/xCode 2.1?
  • Previous by thread: Re: binding trouble
  • Next by thread: Re: binding trouble
  • Index(es):
    • Date
    • Thread