Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Source tag in image component not working in iOS devices

Siddharth ChopraAug 28 2014 — edited Aug 28 2014

Hello,

I want to set image url in source tag of image component. Currently i am using JDeveloper 12c(12.1.3.0).

Its working fine in Android Devices but not working in iOS Devices.

Below is my amx page code:

                       <amx:listView var="row" value="#{bindings.youtubeFeeds.collectionModel}"

                                  fetchSize="#{bindings.youtubeFeeds.rangeSize}"

                                  selectedRowKeys="#{bindings.youtubeFeeds.collectionModel.selectedRow}"

                                  selectionListener="#{bindings.youtubeFeeds.collectionModel.makeCurrent}"

                                  showMoreStrategy="autoScroll" bufferStrategy="viewport" id="lv2"

                                  inlineStyle="background-color:rgba(0,0,0,0.3); margin-bottom:10%;">

                        <amx:listItem id="li2">

                            <amx:panelGroupLayout id="pgl5"

                                                  inlineStyle="margin:0;  padding:4%; padding-top:2%; padding-bottom:2%;">

                                <amx:tableLayout id="tl3" width="100%" inlineStyle="width:100%;">

                                    <amx:rowLayout id="rl3">

                                        <amx:cellFormat halign="center" id="cf3" valign="middle"

                                                        inlineStyle="width:45%;">

                                            <amx:image source="#{row.thumbURL}" id="i5" inlineStyle="width:100%;"/>

                                        </amx:cellFormat>

                                    </amx:rowLayout>

                                </amx:tableLayout>  

                            </amx:panelGroupLayout>

                        </amx:listItem>

                    </amx:listView>

I have also tried with setting static url from java code

           youtubeFeeds.setThumbURL("http://iconbug.com/data/9f/507/7539a8d9ee940f052a34a4eaae4775a1.png");

and through binding, i have shown that in listView component. But same issue not working in iOS Devices.


Yes, its working fine. This image is there in a image folder in a project itself.

          <amx:image id="i121" source="/images/bg.jpg" inlineStyle="width:100%; height:100%;"/>


Same thing i want to do this image url.

Any help will be appreciated.


Regards,

Siddharth


This post has been answered by Deepak-Jain on Aug 28 2014
Jump to Answer

Comments

Deepak-Jain
Answer

a. Can you see that image in preview mode if you hardcode that url in amx?

b. Can you try adding *.iconbug.* in whitelist and try. (You can do it maf-application.xml -> Security -> Remote URL Whitelist)

Regards,

Deepak

Marked as Answer by Siddharth Chopra · Sep 27 2020
User_HWHT9

Actually I believe there is a bug here, I think the image should not display on iOS *and* Android unless you specify the URL in the maf-application.xml whitelist.  So the image not displaying on iOS is the expected behaviour, and Android is incorrect in this case as it should also not show the image until you add that whitelist entry.

For your immediate problem, include "iconbug.com" in the whitelist.

Can you tell me, regardless of the whitelist entry for iOS, on Android does the image appear on the Android Emulator for you?  I don't have an Android device handy, and regardless of the whitelist entry the image doesn't display at all on the Android Emulator.

Mind you, it's a bit unusual displaying remote images in your AMX page, this would imply your application must always be online.  Is this your intention?

CM.

Deepak-Jain

Hi CM,

I have tried this in Android Emulator and Android Device and I can see the image getting displayed without even adding it to whitelist.

Hi Siddharth,

Also, using remote urls for displaying image will have a performance impact but could be useful if you want to keep changing it.

Regards,

Deepak

Frank Nimphius-Oracle

Hi,

can you add an output text component next to the image to see that the image URL is coming okay?

<amx:image source="#{row.thumbURL}" id="i5" inlineStyle="width:100%;"/>

<amx:outputText value="#{row.thumbURL}" ot="i5"/>


Have you tried one of the image URLs on the iOS browser to ensure your iOS device has access? I think that we first need to ensure that the files are accessible.


Frank

1 - 4

Post Details

Added on Aug 28 2014
4 comments
1,334 views