• Brian Knowlton
  • NEWBIE
  • 10 Points
  • Member since 2014
  • Senior Consultant
  • West Monroe Partners

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 7
    Replies
I have a button on a vf page (using std controller) that when clicked is supposed to call an actionFunction which calls an Apex method. The method does not get called however. I run a javascript method to see if something is happening and it is being clicked, but I cannot get it to call the Apex method. 
function selectProduct()
        {
            console.log('clicked');
            CallApexMethod();
         	console.log('Complete');
        }


<apex:form id="searchProducts">
    	<apex:actionFunction name="CallApexMethod" action="{!myActionInController}" onComplete="alert('After apex method') ;"/>
        <apex:outputPanel id="main">
...


<div class="selectButton">
                <input type="button" value="Select" onclick="selectProduct();"/>
</div>

 

I am working on developing a visualforce page that shows the chatter feed. This is super simple, but it seems I'm running into something and would like to make a slight change...
 

<apex:page standardController="Case" ... >
    <chatter:feed entityId="{!case.id} ... showPublisher="false" filerType="SocialPost"/>
</apex:page>
1. when the showpublisher is false, a couple links are broken and can't be used, but when the publisher is there, the links are working. I thought it could reference the publisher on the feed page.
2. Is there a way to have the publisher to be true, but to just minimize it or hide it?
I have created the code via the Chat Button design, but am unable to add it to the current Communities page. Community Builder does not allow anything be added in, and Site.com does not allow the template to be edited (as it mentions the page is a Lightning template.) Lightning Components can be built, but do not allow for this sort of scripting. How does something scripted get added via Community Builder or Site.com Studio?
I have a button on a vf page (using std controller) that when clicked is supposed to call an actionFunction which calls an Apex method. The method does not get called however. I run a javascript method to see if something is happening and it is being clicked, but I cannot get it to call the Apex method. 
function selectProduct()
        {
            console.log('clicked');
            CallApexMethod();
         	console.log('Complete');
        }


<apex:form id="searchProducts">
    	<apex:actionFunction name="CallApexMethod" action="{!myActionInController}" onComplete="alert('After apex method') ;"/>
        <apex:outputPanel id="main">
...


<div class="selectButton">
                <input type="button" value="Select" onclick="selectProduct();"/>
</div>