Question

I've been mucking around trying to get combination of xp:fileUpload and xe:multiImage for display but no luck. I'm not married to a solution using these two controls and will accept any valid approach.

I would like to provide the upload/display picture functionality withing a xe:formRow in an xe:formTable if possible.

Any ideas?

Was it helpful?

Solution

If you just want to show a list of images that are uploaded to the document, I'd suggest to use a xp:repeat instead.

In the xe:formRow you can add the following to add an upload control (in edit mode only) and a list of attached images. Assumption is that the XPage is bind to a document datasource, I've used "images" as the name of the rich text item used to store the images:

<xp:fileUpload id="fileUpload1" value="#{document1.images}"
    rendered="#{javascript:document1.isEditable()}">
</xp:fileUpload>
<xp:repeat id="repeatImages" rows="30" var="image">
    <xp:this.value><![CDATA[#{javascript:document1.getAttachmentList("images");}]]></xp:this.value>
    <xp:image url="#{javascript:image.getHref()}" id="image1"></xp:image>
</xp:repeat>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top