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
YashavantYashavant 

Want to change the color of commandLink on click event in apex:repeat call

Hi,

I have displayed the total available pages with help of 'commandLink' and on the 'Click' event of that i am displaying the records of that page.

Now, i want to apply particular color to that commandLink which is 'clicked' by the user so as to differentiate from others.

Code is as follow. Any pointers on this will be helpful.

Code:
<apex:repeat value="{!valuesForPageNumber}" var="page" id="theRepeat" >
    <apex:commandLink value="" onClick="setLink({!page})" action="{!paginationLink}" >
           <apex:outputText value="{!page}"/>
    </apex:commandLink>&nbsp;&nbsp;
</apex:repeat>

 

Yash
vishalavishala

Hi Searching for the same solution, if you have got please post it.

S PraveenS Praveen

Hi

 

Searching for same ,if you got the solution please let me know.

 

 

Regards,

Praveen Sappati

calvin_nrcalvin_nr

Can't the style attribute be used? You can specify the color using CSS.

vishalavishala

The page is getting refreshed, when they click on the pagenumber. So it doesn't show the colour that is mentioned in the style, it gets reset.