Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Visualforce page that sets up the topic subscription and includes the streaming component to display browser notifications.
<apex:page controller="StreamingController">
<apex:pageMessages id="msgs" />
<apex:outputPanel id="all">
<apex:outputPanel rendered="{!topic==''}">
<apex:form >
<apex:actionFunction name="createTopic" action="{!CreateTopic}" rerender="all, msgs" />
<script>
alert('Creating topic - create topic function = ' + createTopic);
createTopic();
</script>
</apex:form>
</apex:outputPanel>
<apex:outputPanel rendered="{!NOT(topic=='')}">
<c:Streaming topic="{!topic}" />
</apex:outputPanel>
</apex:outputPanel>
</apex:page>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment