You need to sign in to do that
Don't have an account?
Thukkaram
In VF, Is there a way to conditionally replace a text with an image in particular column with the apex repeat?
Here is my code and need to replace a particular column text with image dynamically
<apex:pageBlock >
<apex:pageBlockTable value="{!collectionList}" var="cList"> <!-- collection with list of requried details -->
<apex:repeat value="{!headerLst}" var="key"> <!-- Header list contains the header values for table -->
<apex:column headerValue="{!key}" style="text-align:center" value="{!cList[key]}" > <!-- displaying the details from collection list for the matching header list values -->
</apex:column>
</apex:repeat>
</apex:pageBlockTable>
</apex:pageBlock>
I have a column named as "Trend" in the collection list with different text values. Conditionally need to update the text values to an image dynamically.
Example: if the "Trend" column contains a text value "Up", need to display an Up arrow image
if chart column contains a text value "Down", need to display down arrow image on the above dynamic table.
Any suggestions or inputs would be helpful. Thanks for your support in advance!
Cheers!
<apex:pageBlock >
<apex:pageBlockTable value="{!collectionList}" var="cList"> <!-- collection with list of requried details -->
<apex:repeat value="{!headerLst}" var="key"> <!-- Header list contains the header values for table -->
<apex:column headerValue="{!key}" style="text-align:center" value="{!cList[key]}" > <!-- displaying the details from collection list for the matching header list values -->
</apex:column>
</apex:repeat>
</apex:pageBlockTable>
</apex:pageBlock>
I have a column named as "Trend" in the collection list with different text values. Conditionally need to update the text values to an image dynamically.
Example: if the "Trend" column contains a text value "Up", need to display an Up arrow image
if chart column contains a text value "Down", need to display down arrow image on the above dynamic table.
Any suggestions or inputs would be helpful. Thanks for your support in advance!
Cheers!