Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

How to dynamically display in Image Field with external pic source

Avatar

Level 2

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 field in the "Data View" view at the left side of the designer?  For example, If i want to access the following part in the "Data View"view, what syntax should I be entering in the script editor:

I would like to access this value as I would like to append it to the end of this statement so that I can get the value dynamically:

this.value.#image.href

=  ???????

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

You cannot change the url of the image on the fly for security reasons.

In your case you have to use the dynamic image fields in the xdp form, encode the external  images with base64 encoding to be a string, populate with those strings the xml and render  your template with this xml.

Here: http://eslifeline.wordpress.com/2008/09/05/inserting-image-in-a-xdp/#comments you have a good example by Girish Bedekar for such a process.

Yan.

View solution in original post

2 Replies

Avatar

Correct answer by
Former Community Member

You cannot change the url of the image on the fly for security reasons.

In your case you have to use the dynamic image fields in the xdp form, encode the external  images with base64 encoding to be a string, populate with those strings the xml and render  your template with this xml.

Here: http://eslifeline.wordpress.com/2008/09/05/inserting-image-in-a-xdp/#comments you have a good example by Girish Bedekar for such a process.

Yan.

Avatar

Level 2

Thank you very much for your reply,

I suspected this but you have just confirmed it for me.

kind Regards,

Chrstiaan

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----