I don't know what is wrong with the code, I read a lot about the commandbutton and param, but it doesn't work.
The Debug shows me that the value of the MS_Item is Null. 07:44:00.0 (8771917)|USER_DEBUG|[8]|DEBUG|my MS_Item: null
PAGE:
<apex:page controller="clicktest">
<apex:form>
<apex:commandButton action="{!Stats_In}" value="click" reRender="">
<apex:param name="MS_Item" value="MS_Item_45382" assignTo="{!MS_Item}" />
</apex:commandButton>
</apex:form>
</apex:page>
CLASS:
public class clicktest {
Public String MS_Item {get; set;}
public PageReference Stats_In() {
MedienServer_Stats__c sta = new MedienServer_Stats__c();
sta.MS_Item__c = MS_Item;
System.debug('my MS_Item: ' +MS_Item);
INSERT sta;
RETURN NULL;
}
}