<section class="panel profile-info">
<apex:inputTextarea rows="2" value="{!pagepost}" styleClass="form-control input-lg p-text-area" id="postingonpage" />
<div class="panel-footer" style="min-height:50px;padding: 5px;">
<apex:commandButton styleClass="btn btn-danger pull-right" value="Post" id="post" action="{!postit}" reRender="postrepeat">
</apex:commandButton>
</div>
</section>
<apex:outputPanel rendered="true" id="postrepeat">
<apex:repeat value="{!objmappost}" var="post">
<p class="fb-user-status">
{!objmappost[post].MBT_SFFB__Message__c}
</p>
<ul class="fb-comments">
<apex:repeat id="comment" rendered="{!objmappost[post].MBT_SFFB__Total_Comments__c> 0}" value="{!objmapcomment[post]}" var="comment">
<li>
<div class="cmt-details">
<a href="{!comment.MBT_SFFB__Author_URL__c}">{!comment.MBT_SFFB__Author_Realname__c}</a>
<span>{!comment.MBT_SFFB__Message__c}</span>
<p>{!comment.MBT_SFFB__Published_Date_Formula__c} <a href="#" class="like-link">Like</a></p>
</div>
</li>
</apex:repeat>
<li>
<div class="chat-cmt-btn">
<apex:inputTextarea rows="2" value="{!pagecomment}" styleClass="form-control" id="pagecomment" />
</div>
<div class="btn-group">
<apex:commandButton styleClass="btn btn-danger" value="Comment" action="{!commentit}" reRender="postrepeat">
<apex:param name="comment" value="{!objmappost[post].MBT_SFFB__External_ID__c}" id="postidoffbcomment" assignTo="{!postidoffbcomment}"/>
</apex:commandButton>
</div>
</li>
</ul>
</apex:repeat>
</apex:outputPanel>
Controller:-
public string pageid{get;set;}
public string postidoffb{get;set;}
public string pagecomment{get;set;}
public string postidoffbcomment{get;set;}
public pagereference commentit()
{
System.Debug(pagecomment);
System.Debug(pageid);
System.debug(postidoffbcomment);
}
Output:-
null
16163671782332343434
16163671782332343434_1616367232434243
It should be Textbox value rather than null
apex:repeat
. If you bind single property in repeat, it would give unexpected result as you are getting.