Thanks for your response & this is not typo. I am developing a mobile application using mobile controls. This is how the code looks like. When I view the existing document I can see the image attached to the document however when I switch from read mode to edit mode and image goes of. When i check the imange URL it looks like localhost/customer.nsf/null/$File/image1.jpeg
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core"
xmlns:xe="http://www.ibm.com/xsp/coreex"><br/>
<xe:singlePageApp id="singlePageApp1" selectedPageName="homePage"> <br/>
<xe:appPage id="appPage1" pageName="homePage"<br/>
resetContent="false"><br/>
<xe:djxmHeading id="homePageHeading" label="Home"></xe:djxmHeading><br/>
<xe:djxmLineItem id="djxmLineItem1" label="All Documents"<br/>
moveTo="#allDocumentsPage"><br/>
</xe:djxmLineItem><br/>
<xe:djxmLineItem id="djxmLineItem2" label="New Customer"<br/>
moveTo="#newCustomerPage"><br/>
</xe:djxmLineItem><br/>
<xe:djxmLineItem id="djxmLineItem3"<br/>
moveTo="#searchCustomerPage" label="Search Customer"><br/>
</xe:djxmLineItem><br/>
</xe:appPage><br/>
<xe:appPage id="appPage2" pageName="allDocumentsPage"<br/>
resetContent="true" preload="true"><br/>
<xe:djxmHeading id="djxmHeading1" label="All Documents"<br/>
back="Back" moveTo="#homePage"><br/>
</xe:djxmHeading><br/>
<xe:dataView id="dataView1" rows="7"<br/>
openDocAsReadonly="true" pageName="#documentPage"><br/>
<xp:this.facets><br/>
<xp:pager partialRefresh="true" id="pager2"<br/>
for="dataView1" xp:key="pagerBottom"><br/>
<xp:pagerControl id="pagerControl1"<br/>
type="Next"><br/>
</xp:pagerControl><br/>
<xp:pagerControl id="pagerControl2"<br/>
type="Previous"><br/>
</xp:pagerControl><br/>
</xp:pager><br/>
</xp:this.facets><br/>
<xe:this.summaryColumn><br/>
<xe:viewSummaryColumn columnName="Name"<br/>
columnTitle="Name"><br/>
</xe:viewSummaryColumn><br/>
</xe:this.summaryColumn><br/>
<xe:this.data><br/>
<xp:dominoView var="View1"<br/>
viewName="xpAllDocuments"><br/>
</xp:dominoView><br/>
</xe:this.data><br/>
</xe:dataView><br/>
</xe:appPage><br/>
<xe:appPage id="documentPage" pageName="documentPage"<br/>
resetContent="true" preload="true"><br/>
<xe:djxmHeading id="djxmHeading2" label="Document"<br/>
back="Back" moveTo="#allDocumentsPage"><br/>
</xe:djxmHeading><br/>
<xp:panel><br/>
<xp:this.data><br/>
<xp:dominoDocument formName="Customer"<br/>
var="document1"><br/>
</xp:dominoDocument><br/>
</xp:this.data><br/>
<xe:tabBar id="documentTabBar"<br/>
barType="segmentedControl"><br/>
<xe:tabBarButton id="tabBarButtonCancel"<br/>
label="Cancel"><br/>
<xp:eventHandler event="onclick" submit="true"<br/>
refreshMode="complete" immediate="true" save="false"><br/>
<xp:this.action><br/>
<xe:moveTo targetPage="allDocumentsPage"<br/>
transitionType="slide" direction="Right to Left"><br/>
</xe:moveTo><br/>
</xp:this.action><br/>
</xp:eventHandler><br/>
</xe:tabBarButton><br/>
<xe:tabBarButton id="tabBarButtonEdit" label="Edit"<br/>
rendered="#{javascript:!document1.isEditable()}">
<xp:eventHandler event="onclick"<br/>
refreshMode="complete"><br/>
<xp:this.action><br/>
<xp:changeDocumentMode mode="edit"<br/>
var="document1"><br/>
</xp:changeDocumentMode><br/>
</xp:this.action><br/>
</xp:eventHandler><br/>
</xe:tabBarButton><br/>
<xe:tabBarButton id="tabBarButtonSave" label="Save"<br/>
rendered="#{javascript:document1.isEditable()}">
<xp:eventHandler event="onclick" submit="true"<br/>
refreshMode="complete"><br/>
<xp:this.action><br/>
<xe:moveTo forceFullRefresh="true"<br/>
saveDocument="true" targetPage="allDocumentsPage"<br/>
transitionType="slide" direction="Left to Right"><br/>
</xe:moveTo><br/>
</xp:this.action><br/>
</xp:eventHandler><br/>
</xe:tabBarButton><br/>
</xe:tabBar> <br/>
<xe:djxmRoundRectList id="djxmRoundRectList1"><br/>
<xp:br/><br/>
<xp:image id="image1" height="100" width="100"><br/>
<xp:this.value><![CDATA[#{javascript:"/"+facesContext.getExternalContext().getRequest().getParameter("documentId")+"/$File/"+@AttachmentNames()}]]></xp:this.value><br/>
<xp:this.url><![CDATA[#{javascript:"/"+facesContext.getExternalContext().getRequest().getParameter("documentId")+"/$File/"+@AttachmentNames()}]]></xp:this.url><br/>
</xp:image><br/>
<xp:br/><br/>
<xp:br/><br/>
<xp:br/><br/>
<xp:label value="Customer No " id="label3"></xp:label><br/>
<xp:inputText id="inputText2"<br/>
value="#{document1.txtCustomerNo}" readonly="true"><br/>
</xp:inputText><br/>
<xp:br/><br/>
<xp:label value="Name " id="NameLabelID"></xp:label><br/>
<xp:inputText id="inputName"<br/>
value="#{document1.txtCustomerName}"><br/>
</xp:inputText><br/>
<xp:br/><br/>
<xp:label value="Address " id="AddressLabelID"></xp:label><br/>
<xp:inputText id="inputAddress"<br/>
value="#{document1.txtAddress}"><br/>
</xp:inputText><br/>
<xp:br/><br/>
<xp:label value="Contact No " id="ContactNoLabel"></xp:label><br/>
<xp:inputText id="inputContactNo"<br/>
value="#{document1.txtContactNo}"><br/>
</xp:inputText><br/>
<xp:br/><br/>
</xe:djxmRoundRectList><br/>
</xp:panel><br/>
</xe:appPage><br/>
<xe:appPage id="appPage3" pageName="newCustomerPage"><br/>
<xe:djxmHeading id="newDocumentPageHeading"<br/>
label="New Customer" back="Cancel" moveTo="homePage"><br/>
</xe:djxmHeading><br/>
<xp:panel><br/>
<xp:this.data><br/>
<xp:dominoDocument var="document1"<br/>
formName="Customer" computeWithForm="onsave"><br/>
</xp:dominoDocument><br/>
</xp:this.data><br/>
<xe:tabBar id="newCustomerTabBar"<br/>
barType="segmentedControl"><br/>
<xe:tabBarButton id="tabBarButtonSubmit"<br/>
label="Submit"><br/>
<xp:eventHandler event="onclick" submit="true"<br/>
refreshMode="complete"><br/>
<xp:this.action><br/>
<xe:moveTo forceFullRefresh="true"<br/>
saveDocument="true" targetPage="allDocumentsPage"<br/>
transitionType="slide" direction="Left to Right"><br/>
</xe:moveTo><br/>
</xp:this.action><br/>
</xp:eventHandler><br/>
</xe:tabBarButton><br/>
</xe:tabBar><br/>
<xe:djxmRoundRectList id="djxmRoundRectList2"><br/>
<xp:label value="Customer No " id="label2"></xp:label><br/>
<xp:inputText id="inputCustomerNo"<br/>
value="#{document1.txtCustomerNo}" readonly="true"<br/>
defaultValue="#{javascript:@UpperCase(@Unique())}">
</xp:inputText><br/>
<xp:br/><br/>
<xp:label value="Name " id="labelName2"></xp:label><br/>
<xp:inputText id="inputTextName2"<br/>
value="#{document1.txtCustomerName}"><br/>
</xp:inputText><br/>
<xp:br/><br/>
<xp:label value="Address" id="labelAddress"></xp:label><br/>
<xp:inputText id="inputTextCategory2"<br/>
value="#{document1.txtAddress}"><br/>
</xp:inputText><br/>
<xp:br/><br/>
<xp:label value="Contact No" id="label1"></xp:label><br/>
<xp:inputText id="inputText1"<br/>
value="#{document1.txtContactNo}"><br/>
</xp:inputText><br/>
<xp:br/><br/>
</xe:djxmRoundRectList><br/>
</xp:panel><br/>
</xe:appPage><br/>
<xe:appPage id="appPage4" resetContent="true" preload="true"<br/>
pageName="searchCustomerPage"><br/>
<xe:djxmHeading id="djxmHeading3" label="Search Documents"<br/>
back="Back" moveTo="#homePage"><br/>
</xe:djxmHeading><br/>
<xp:panel><br/>
<xp:this.data><br/>
<xp:dominoDocument var="document1"><br/>
</xp:dominoDocument><br/>
</xp:this.data><br/>
<xp:inputText id="inputSearch" defaultValue=""><br/>
</xp:inputText><br/>
<xp:button value="Search" id="Search"><br/>
<xp:eventHandler event="onclick" submit="true"<br/>
refreshMode="partial" refreshId="dataView2"><br/>
</xp:eventHandler><br/>
</xp:button><br/>
</xp:panel><br/>
<xe:dataView id="dataView2" pageName="#documentPage"<br/>
openDocAsReadonly="True"><br/>
<xe:this.data><br/>
<xp:dominoView var="view1"<br/>
viewName="xpSearchCustomer" keysExactMatch="false"><br/>
<xp:this.search><![CDATA[#{javascript:getComponent("inputSearch").getValue()}]]></xp:this.search>
</xp:dominoView><br/>
</xe:this.data><br/>
<xe:this.summaryColumn><br/>
<xe:viewSummaryColumn columnName="Name"></xe:viewSummaryColumn><br/>
</xe:this.summaryColumn><br/>
</xe:dataView><br/>
</xe:appPage><br/>
</xe:singlePageApp><br/>
</xp:view>