Re: binding trouble
Re: binding trouble
- Subject: Re: binding trouble
- From: David LeBer <email@hidden>
- Date: Fri, 24 Jun 2005 11:47:52 -0400
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
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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