param2 value null in doSomething method
public String param1 { get { return 'Welcome Message'; } }
public String param2 { get;
set {
param2 = value;
}
}
public PageReference doSomething() {
return null;
}
<apex:commandButton action="{!doSomething}" value="Click">
<apex:param name="param2" value="{!param1}" assignTo="{!param2}"/>
</apex:commandButton>
<apex:param>
here. Ifparam2
is simply holding the value ofparam1
, then you can simply useparam1
in your logic instead ofparam2
.