I have Written Apex Class:
public class one{
public PageReference method() {
return null;
}
public string acName{set;get;}
public integer acPhone{set;get;}
public List<Account> accs{set;get;}
public string accid {set;get;}
public pagereference save(){
//accid = apexpages.currentPage().getParameters().get('id');
accs = [select id,name,phone,type from account limit 10];
return null;
}
}
VisualForce Page:
<apex:page controller="one" action="{!save}">
<apex:form >
<apex:pageBlock id="one">
<apex:pageBlockTable value="{!accs}" var="a">
<apex:column value="{!a.id}"/>
<apex:column value="{!a.name}"/>
<apex:column >
<apex:commandButton value="click" action="{!save}" reRender="two">
<apex:param name="accountName" value="{!a.name}" assignTo="{!acName}"/>
</apex:commandButton>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
<apex:pageBlock id="two">
<apex:pageBlockSection >
<apex:pageBlockSectionItem >
ID:{!acName}
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
what is the use of this Line:
<apex:param name="accountName" value="{!a.name}" assignTo="{!acName}"/>
if I Remove this Line also it is Not showing any Effect in the output,anyone explains the Logic for <apex:param>
tag