I an trying to add file upload control in the inplace form in xpages. When I save the form, a document is created but the attachment selected in the inplace form is not saved.
Can someone tell me if there is any way to do this?
Here is the sample code from Extionsion Library Demo.
<?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"
xmlns:xc="http://www.ibm.com/xsp/custom">
<xc:OneUILayout id="cc4cconeuilayout" navigationPath="/Core/InPlaceForm">
<xp:this.facets>
<xp:panel xp:key="LeftColumn" id="panel4">
<xc:LeftCore id="cc4ccLeftCore" ></xc:LeftCore>
</xp:panel>
</xp:this.facets>
<xp:panel>
<xp:panel>
<xp:this.data>
<xp:dominoView var="view1" viewName="AllContacts"></xp:dominoView>
</xp:this.data>
<xp:label
value="This shows the in place editing capability" id="label5"
style="font-weight:bold">
</xp:label>
<xp:br></xp:br>
<xp:br></xp:br>
<xp:pager layout="Previous Group Next" id="pager1"
xp:key="header" for="repeat1" partialRefresh="true">
</xp:pager>
<xp:repeat id="repeat1" rows="15" value="#{view1}"
var="row">
<xp:div id="rowDataContainer">
User:  
<xp:text escape="true" id="computedField1"
value="#{row.FirstName}">
</xp:text>
, 
<xp:text escape="true" id="computedField2"
value="#{row.LastName}">
</xp:text>
 
<xp:span id="inform">
<xp:link escape="true" id="link1">
<xp:this.text><![CDATA[#{javascript:var c = getComponent("inPlaceForm1")
if(c.isVisible()) {
return "Close";
} else {
return "Edit"
}}]]></xp:this.text>
<xp:eventHandler event="onclick"
submit="true" refreshMode="partial" refreshId="inform">
<xp:this.action><![CDATA[#{javascript:var c = getComponent("inPlaceForm1")
c.toggle()
}]]></xp:this.action>
</xp:eventHandler>
</xp:link>
<xp:br></xp:br>
<xe:inPlaceForm id="inPlaceForm1"
partialEvents="true">
<xe:this.afterContentLoad><![CDATA[#{javascript:print("InPlaceForm: After Content Load")}]]></xe:this.afterContentLoad>
<xe:this.beforeContentLoad><![CDATA[#{javascript:print("InPlaceForm: Before Content Load")}]]></xe:this.beforeContentLoad>
<xp:panel>
<xp:this.data>
<xp:dominoDocument
var="document1" formName="Contact" action="editDocument"
documentId="#{javascript:row.getNoteID()}"
ignoreRequestParams="true">
</xp:dominoDocument>
</xp:this.data>
<xp:table role="presentation">
<xp:tr>
<xp:td>
<xp:label
value="First name:" id="firstName_Label1"
for="firstName1">
</xp:label>
</xp:td>
<xp:td>
<xp:inputText
value="#{document1.FirstName}" id="firstName1"
required="true">
</xp:inputText>
</xp:td>
<xp:td>
Required field, client
side validation
</xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:label
value="Last name:" id="lastName_Label1" for="lastName1">
</xp:label>
</xp:td>
<xp:td>
<xp:inputText
value="#{document1.LastName}" id="lastName1"
required="true" disableClientSideValidation="true">
</xp:inputText>
</xp:td>
<xp:td>
Required field, server
side validation
</xp:td>
</xp:tr>
<xp:tr>
<xp:td>
<xp:label
value="E mail:" id="eMail_Label1" for="eMail1">
</xp:label>
</xp:td>
<xp:td>
<xp:inputText
value="#{document1.EMail}" id="eMail1">
</xp:inputText>
</xp:td>
<xp:td></xp:td>
</xp:tr>
<xp:tr><xp:td>Attachment</xp:td><xp:td>
<xp:fileUpload id="fileUpload1" value="#{document1.attachments}"></xp:fileUpload></xp:td><xp:td></xp:td></xp:tr></xp:table>
<xp:button value="Ok"
id="button2">
<xp:eventHandler event="onclick"
submit="true" refreshMode="partial" refreshId="repeat1" immediate="false" save="true">
<xp:this.action>
<xp:actionGroup>
<xp:saveDocument></xp:saveDocument>
<xp:executeScript>
<xp:this.script><![CDATA[#{javascript:var c = getComponent("inPlaceForm1")
c.hide()}]]></xp:this.script>
</xp:executeScript>
</xp:actionGroup>
</xp:this.action>
</xp:eventHandler>
</xp:button>
<xp:button value="Label"
id="button1">
<xp:eventHandler event="onclick"
submit="true" refreshMode="partial" refreshId="repeat1">
<xp:this.action><![CDATA[#{javascript:document1.save();
var c = getComponent("inPlaceForm1")
c.hide()}]]></xp:this.action>
</xp:eventHandler></xp:button></xp:panel>
</xe:inPlaceForm>
</xp:span>
</xp:div>
</xp:repeat>
</xp:panel>
</xp:panel>
</xc:OneUILayout>
</xp:view>