Skip to main content
added 1 character in body
Source Link
Alexis
  • 129
  • 1
  • 13

I want to include many visualForce page into a single with apex:repeat. the pages are all rendered as a pdf, because what I want to obtain is like a big pdf that includes many pdf that can be generated from records.

Here is my visualForce for now:

<apex:page renderAs="pdf" applyBodyTag="false" showHeader="false" standardStylesheets="false"
       standardController="Asset" recordSetVar="Asset" extensions="AssetElectricCertificationController">

    <apex:repeat value="{!assetsToShow}" var="SingleAsset">
        {!SingleAsset.Name}
        <apex:include pageName="AssetElectricCertification"/>
    </apex:repeat>
</apex:page>

the assetsToShow is juste a List<Asset> that my controller chose.

AssetElectricCertification is a visualForce page shown as pdf that can be generated if I go on each Asset record of my list. But I want to have them all on the big pdf.

I have two problems. The first one is that the <apex:include> component generate the error :Unknown property 'VisualforceArrayList.Name' which is not resolvable by changing my repatrepeat variables names.

The other broblem is how will the <apex:include> know how to generate a page from a record from my repeat? There is know way of passing a variable like a recordId tho tell a <apex:include> the record from wich it should be generated. I think it use apexPages.currentPage() to generate a page normally, but the documentation doesn't talk about that at all.

Thank you

I want to include many visualForce page into a single with apex:repeat. the pages are all rendered as a pdf, because what I want to obtain is like a big pdf that includes many pdf that can be generated from records.

Here is my visualForce for now:

<apex:page renderAs="pdf" applyBodyTag="false" showHeader="false" standardStylesheets="false"
       standardController="Asset" recordSetVar="Asset" extensions="AssetElectricCertificationController">

    <apex:repeat value="{!assetsToShow}" var="SingleAsset">
        {!SingleAsset.Name}
        <apex:include pageName="AssetElectricCertification"/>
    </apex:repeat>
</apex:page>

the assetsToShow is juste a List<Asset> that my controller chose.

AssetElectricCertification is a visualForce page shown as pdf that can be generated if I go on each Asset record of my list. But I want to have them all on the big pdf.

I have two problems. The first one is that the <apex:include> component generate the error :Unknown property 'VisualforceArrayList.Name' which is not resolvable by changing my repat variables names.

The other broblem is how will the <apex:include> know how to generate a page from a record from my repeat? There is know way of passing a variable like a recordId tho tell a <apex:include> the record from wich it should be generated. I think it use apexPages.currentPage() to generate a page normally, but the documentation doesn't talk about that at all.

Thank you

I want to include many visualForce page into a single with apex:repeat. the pages are all rendered as a pdf, because what I want to obtain is like a big pdf that includes many pdf that can be generated from records.

Here is my visualForce for now:

<apex:page renderAs="pdf" applyBodyTag="false" showHeader="false" standardStylesheets="false"
       standardController="Asset" recordSetVar="Asset" extensions="AssetElectricCertificationController">

    <apex:repeat value="{!assetsToShow}" var="SingleAsset">
        {!SingleAsset.Name}
        <apex:include pageName="AssetElectricCertification"/>
    </apex:repeat>
</apex:page>

the assetsToShow is juste a List<Asset> that my controller chose.

AssetElectricCertification is a visualForce page shown as pdf that can be generated if I go on each Asset record of my list. But I want to have them all on the big pdf.

I have two problems. The first one is that the <apex:include> component generate the error :Unknown property 'VisualforceArrayList.Name' which is not resolvable by changing my repeat variables names.

The other broblem is how will the <apex:include> know how to generate a page from a record from my repeat? There is know way of passing a variable like a recordId tho tell a <apex:include> the record from wich it should be generated. I think it use apexPages.currentPage() to generate a page normally, but the documentation doesn't talk about that at all.

Thank you

Source Link
Alexis
  • 129
  • 1
  • 13

Include many visualForce page into one

I want to include many visualForce page into a single with apex:repeat. the pages are all rendered as a pdf, because what I want to obtain is like a big pdf that includes many pdf that can be generated from records.

Here is my visualForce for now:

<apex:page renderAs="pdf" applyBodyTag="false" showHeader="false" standardStylesheets="false"
       standardController="Asset" recordSetVar="Asset" extensions="AssetElectricCertificationController">

    <apex:repeat value="{!assetsToShow}" var="SingleAsset">
        {!SingleAsset.Name}
        <apex:include pageName="AssetElectricCertification"/>
    </apex:repeat>
</apex:page>

the assetsToShow is juste a List<Asset> that my controller chose.

AssetElectricCertification is a visualForce page shown as pdf that can be generated if I go on each Asset record of my list. But I want to have them all on the big pdf.

I have two problems. The first one is that the <apex:include> component generate the error :Unknown property 'VisualforceArrayList.Name' which is not resolvable by changing my repat variables names.

The other broblem is how will the <apex:include> know how to generate a page from a record from my repeat? There is know way of passing a variable like a recordId tho tell a <apex:include> the record from wich it should be generated. I think it use apexPages.currentPage() to generate a page normally, but the documentation doesn't talk about that at all.

Thank you