I am using Visualforce data table to display account records.I am also using alphabetical filter to display account records based on the alphabet selected .while doing so if I press "A" it results in account starting with "A" properly, but if I press b it displays accounts with "a" and "b" and c with "a","b" and "c". What could be the issue?. How to rectify it?
In Visualforce Page:
<apex:repeat value="{!alphabets}" var="a">
<apex:commandLink value="{!a}" action="{!Alphabetorder}" style="{!if($CurrentPage.parameters.alpha=a,'font-weight:bold','')}" >
<apex:param name="alpha" value="{!a}"/>
</apex:commandLink>
|
</apex:repeat>
In controller:
string s1;
if(apexpages.currentpage().getparameters().get('alpha') == 'All')
s1='%';
else
s1= apexpages.currentpage().getparameters().get('alpha')+'%';
system.debug('alphabet ordering'+s1);
And added the s1 in query as name like :s1
