i created a visualforce page in which actionfunction definition is
<apex:actionFunction name="setAttachment" action="{!setAttachment}" >
<apex:param name="attachmentBody" value=""/>
</apex:actionFunction>
and in my javascript code at end i am calling
setAttachment(attachmentBody);
and setAttachment method in apex controller is
public void setAttachment()
{System.debug('coming here');
String attachmentBody = ApexPages.currentPage().getParameters().get('attachmentBody');
System.debug('attachment body is'+attachmentBody);
if(attachment == null)
System.debug('coming here');
attachment.Body = EncodingUtil.base64decode(attachmentBody);
}
in logs its giving attachment body is null.but i am passing a big string in javascript code function.can anyone please tell why instead of passing string its passing null as parameter in apex controller ??