Display Google Group in a Browserframe

Hi:

I can’t seem to get my Google Group to display in a Browserframe. My “test” string shows up, but the group does not display. The Javascript console shows no errors.

The code posted on the Google website to embed is this (mysite and mygroup inserted to protect the innocent):

<iframe id="forum_embed"
  src="javascript:void(0)"
  scrolling="no"
  frameborder="0"
  width="900"
  height="700">
</iframe>
<script type="text/javascript">
  document.getElementById('forum_embed').src =
     'https://groups.google.com/a/mysite/forum/embed/?place=forum/mygroup'
     + '&showsearch=true&showpopout=true&showtabs=false'
     + '&parenturl=' + encodeURIComponent(window.location.href);
</script>

Since a Browserframe is already an iframe, I’ve been trying to put the code into the Browserframe directly. I created a webpage like this:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body id="forum_embed" src="javascript:void(0)">
<p>test</p>
<script type="text/javascript">
    document.getElementById('forum_embed').src =
        'https://groups.google.com/a/mysite/forum/embed/?place=forum/mygroup'
        + '&showsearch=true&showpopout=true&showtabs=false'
        + '&parenturl=' + encodeURIComponent(window.location.href);
</script>
</body>
</html>

and the following controller:

package com.paslists.merges.web.screens.gmailQueue;

import com.haulmont.cuba.gui.components.*;
import com.haulmont.cuba.gui.screen.*;

import javax.inject.Inject;
import java.util.EnumSet;

@UiController("merges_GmailMessage.browse")
@UiDescriptor("gmail-message-browse.xml")
public class GmailMessageBrowse extends Screen {

    @Inject
    private BrowserFrame forum_embed;

    @Subscribe
    public void onInit(InitEvent event) {

        forum_embed.setId("forum_embed"); 
forum_embed.setSandbox(EnumSet.of(BrowserFrame.Sandbox.ALLOW_SAME_ORIGIN,BrowserFrame.Sandbox.ALLOW_SCRIPTS, BrowserFrame.Sandbox.ALLOW_POPUPS));
    }
}

Can anybody shed some light on what I am doing wrong?

Hi,

iframe is certainly required, even though you’re using the BrowserFrame component. Could you please add it and check the result?

Regards,
Gleb