You need to sign in to do that
Don't have an account?

Hi.. folks , got stucked in a small functionality of sample development
Note: as per my code all the rows are getting rendered, on clicking of the Edit button,but the requirement is ::
1)on click of the Edit button, that particular row should have to change to input , how it can be acheived.
Controller :

//please provide me solution that only that particular rwo should have to render.. thnks in advance
1)on click of the Edit button, that particular row should have to change to input , how it can be acheived.
Controller :
public class testingclass { public string xmlstring{get;set;} public string testingval{get;set;} public List<string> lsttestingval{get;set;} public boolean indexSel{get;set;} public boolean anyBooleanValue{get;set;} public testingclass(){ anyBooleanValue =true; lsttestingval = new list<string>(); lsttestingval.add('Red'); lsttestingval.add('Blue'); lsttestingval.add('Yellow'); } public void edit(){ anyBooleanValue =False; } public void delet(){ system.debug(lsttestingval.size()); } }V.f page:
<apex:page controller="testingclass"> <apex:form > <table style="width:100%"> <tr> <th>name</th> <th>Edit</th> <th>Delete</th> </tr> <apex:variable var="cnt" value="{!0}" /> <apex:repeat var="a" value="{!lsttestingval}"> <tr> <td> <apex:outputPanel rendered="{!anyBooleanValue}" >{!a}</apex:outputPanel> <apex:outputPanel rendered="{!!anyBooleanValue}" ><apex:inputText /></apex:outputPanel> <!--<apex:outputPanel rendered="{!!anyBooleanValue && cnt == !indexSel}"><apex:inputText value="{!a}"/></apex:outputPanel> ---> </td> <td><apex:commandbutton action="{!Edit}" value="Edit" /></td> <td><apex:commandbutton action="{!delet}" value="Delete" /></td> </tr> <apex:variable var="cnt" value="{!cnt+1}"/> </apex:repeat> </table> </apex:form> </apex:page>
Apex Controller:
VF Page:
All Answers
Apex Controller:
VF Page: