function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
WitteWitte 

repeat and actionsupport no rerender

Can anyone tell me, help me, why the mainimage not rerenders?

The mainImage renders in a  datatable component but not in a repeat component.

Use of repeat component is because i want a list of images shown horizontally instead of vertically.

 

The VisualForce page.:

 

 

<"abc__c"extensions="cntabcImageBrowser">

<apex:form>

    <apex:pageBlock>

       <apex:outputpanelid="mainImage">

           <apex:Imagevalue="{!theImage}"title="{!theImage}"height="135px"/>

       </apex:outputpanel>

    <br/>

    <h2>Images in table form as they will be displayed the page</h2>

    <br/>

    <apex:repeatvalue="{!abcList}"var="stocksetImage">

    <apex:Image value="{!abcImage}" title="{!abcImage}" width="49px"/>

    <apex:actionSupport action="{!makeMainImage}" event="onmouseover" rerender="mainImage">     

       <apex:param name="ImageID" value="{!abcImage}" />

    </apex:actionsupport>     </apex:repeat> <!-- the list of images in a simple table -->    

    <br/>  

    <br/>

    <br/>  

    </apex:page>

</apex:pageBlock>

</apex:form>

 

 

Controller:

 

 

public String theImage {get;set;}

 

// action on Page image Generiek

    public PageReference makeMainImage(){

          theImage = ApexPages.CurrentPage().getParameters().get('ImageID');

    returnnull;

 

}

 

Thanks in front

 

Paul

Best Answer chosen by Admin (Salesforce Developers) 
Sonali BhardwajSonali Bhardwaj

try

<apex:page controller="ImageView ">
<apex:form >

<apex:pageBlock >

<apex:outputpanel id="mainImage">

<apex:Image value="{!theImage}" title="{!theImage}" height="135px"/>

</apex:outputpanel>

<br/>

<h2>Images in table form as they will be displayed the page</h2>

<br/>

<apex:repeat value="{!stocksetImagesList}" var="stocksetImage" >

<apex:Image value="{!stocksetImage}" title="{!stocksetImage}" width="49px">

<apex:actionSupport action="{!makeMainImage}" event="onmouseover" rerender="mainImage">

<apex:param name="ImageID" value="{!stocksetImage}" />

</apex:actionsupport>
</apex:Image >

</apex:repeat> <!-- the list of images in a simple table -->

<br/>

<br/>

<br/>


</apex:pageBlock>

</apex:form>
</apex:page>