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
DeepikareddyDeepikareddy 

output panel render in salesforce

Hi.. i have a requirement, that onclick of the Edit button, that particular values should have to change to input.. 
2.)On deletetion partiucalr value in the list should be delete.. 

In my code total list is going change..!
 
public class testingclass {

public string xmlstring{get;set;}
 public string testingval{get;set;}
 public List<string> lsttestingval{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());
    }
  
}

VisualForce page:
 
<apex:page controller="testingclass">
<apex:form >

   
    <table style="width:100%">
  <tr>
    <th>name</th>
    <th>Edit</th>
    <th>Delete</th>
    
  </tr>
 <apex:repeat var="a" value="{!lsttestingval}"> 
     <tr>
     <td>
      <apex:outputPanel rendered="{!anyBooleanValue}">{!a}</apex:outputPanel>
     <apex:outputPanel rendered="{!!anyBooleanValue}"><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:repeat>
     
 
 
</table>
   
   </apex:form>
</apex:page>
Note: After editing the value should be editied as same .. 
How to achieve this functinality .. by using scripting technology.. 

Thanks
Deepika