You can't directly bind a widget to a db-field. You can bind it to an object property or xml node. So what you have to do is:
1) Get the image data from the db 2) Put it in an Object and pass it from your flow function to your JXTemplate 3) In your JXTemplate access the object to create an image tag You really don't need a widget for that. Regards, Andreas >Hi >What I want to do is to display an image whose name is depending on a database record field value. So I was looking for something like an >image-widget: >... ><ft:widget id="img"/> <!-- this should diplay my image --> >... >The name (or the uri) of the imagefile should be bound to my database field: >.. ><fb:value id="img" path="imagefile"/> <!-- bind to the DB field --> >.. >I haven't found anything, so I'm wondering how this could be done? >Thank you >Pius >-----Ursprüngliche Nachricht----- >Von: Joerg Heinicke [mailto:[EMAIL PROTECTED] >Gesendet: Mittwoch, 18. April 2007 20:35 >An: [email protected] >Betreff: Re: Embedding JPEGs in CForms > >On 18.04.2007 15:49, Pius Graber wrote: > >> Ihave an application using CForms. The user can upload a JPEG via the >> Upload Widget. >> Is there a way how I could display the uploaded JPEG later (like >> imagemap widget but depending on a bound value for the filename)? > >I don't know exactly what you want to do (and don't know the imagemap >widget), but I can't see anything special about your requirements. When >you upload the image, put it into some 'resource' dir (name is >completely up to you), put its name into your page where you want to >display it and add an appropriate matcher/ pipeline to your sitemap. > >Where do you see a problem with this approach? > >Joerg --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
