cancel
Showing results for 
Search instead for 
Did you mean: 

How to dynamically display in Image Field with external pic source

Former Member
0 Kudos

Hi Guys,

I have the following scenario:

I need to have a form that needs to display an x amount of images on the same page area. I have not found any documention with regards to creating an undisclosed number of Image Field elements, so I am experimenting with using a Table to display entries of type Image Field.

I do not know at design time which pictures will be shown in this table. This needs to be calculated dynamically when an Incident Number is supplied to the Java WebDynpro application that uses Adobe LiveCycle Designer (Dont worry about this).

Now, first of all: Is it possible to use the URL of images that are OUTSIDE the form structure? In other words, usually one would imbed the image in the forms structure, but because I do not know this image's URL at design time I need to pass it dynamically? Please comment!

Also, what is the FormCalc syntax for accessing a context field in the "Data View" view at the left side of the designer?

Edited by: Christiaan Pistorius on May 11, 2009 3:22 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi ,

Create an image field and assign the URL dynamically using form calc . The event will depend uopn your requirement . It would be like

$.value.#image.href = "http://www.google.co.in/images/nav_logo6.png"

or if the URL is dynamic then

$.value.#image.href = location.rawvalue

It works for me ..

Former Member
0 Kudos

we userd base64 encoding

Former Member
0 Kudos

Hi Christiaan

I have not had any experience with placing multiple images on the same page (dynamically, anyway) but I have had to dynamically specify the location (on a file server, dependent on Company Code) of an image before, and to do that I followed the following steps:

1. Create a field in the Interface of your Form that contains the URL/location of your logo/graphic. (You will probably use a table of these?) I initialized this in the Code Initialization section of the interface - obviously it can aklternatively be passed in from your program.

2. Create a Graphic on the Context tab of your Form. Name it as you wish.

3. If you click on this graphic that you created in the context, there will be a URL button (at the bottom, next to the 'Properties' button - click on this, and specify the field mentioned in point 1 (above) to be the URL. If you specify multiple lines here, SFP will concatenate the lines to form one URL that points to the file.

4. Now go to the layout, and drag the Graphic (from the Data View) onto your form. Size it to your needs.

That should do the trick for a single image... how to do it for multiple images, I leave up to you

Cheers,

Casper