0

I have a command link Ascending. If I click on the link, immediately, the value of the button/link should change to Descending.

<apex:commandLink action="{!Asc}" value="Ascending" reRender="block" status="waitMsg" />

To implement this, Im thinking of adding another commandLink with value 'Descending'. And after I click on Ascending, the Asc command button should disappear and the Descending button should appear and vice versa. How to do this? Any ideas?

<apex:commandLink action="{!Desc}" value="Descending" reRender="block" status="waitMsg" />

1 Answer 1

1

Add Boolean properties to your controller called e.g. showAscending and showDescending (that are set appropriately when the controller is constructed and by the Asc and Desc methods) and then use those to control the rendering of the links:

<apex:commandLink action="{!Asc}" ... rendered="{!showAscending}" />
<apex:commandLink action="{!Desc}" ... rendered="{!showDescending}" />

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .