Windows.Open in the Account.html Not functioning

15 views
Skip to first unread message

Onyekachi Anyanwu

unread,
Apr 3, 2012, 10:58:31 AM4/3/12
to gwt-cx

The code below fails to execute as expected,but rather shows a
spinning circle pic on the screen. I have recompile the code and
ran GWT compile but cannot get it to Open up.

url.append(GwtCxEntryPoint.encodeBase64(arg1Value));
Log.debug("Window.open() arg1Value: " + arg1Value + " Base64:
" + GwtCxEntryPoint.encodeBase64(arg1Value));
Log.debug("Window.open() RelativeURL: " +
Serendipity.getRelativeURL(url.toString()));
Window.open(GwtCxEntryPoint.getRelativeURL(url.toString()), NAME,
FEATURES);

If comment out the Window.Open line and uncomment the line below, It
copens up but as nested window.

What am I doing wrong?

PlaceRequest placeRequest = new PlaceRequest(NameTokens.accountPage);
placeRequest = placeRequest.with(ACTIVITY,
GwtCxEntryPoint.encodeBase64(EDIT)).with(AccountsRecord.ACCOUNT_ID,
GwtCxEntryPoint.encodeBase64(accountId));
placeManager.revealPlace(placeRequest);

Rob

unread,
Apr 3, 2012, 7:36:33 PM4/3/12
to gwt-cx
Hi,

-> Account.html

<body>

<div id="loading" style="display: block;position: absolute;top:
50%;left: 50%;
text-align: center;font-family: Tahoma, Verdana, sans-
serif;font-size: 11px;">
<img src="images/progress.gif" />
</div>

...

</body>

->

A progress indicator is displayed while the page is loading and then
hidden by the Account Page Entry Point (see
AbstractMultiPageEntryPoint -> onModuelLoad2()):

-> AbstractMultiPageEntryPoint

...

// hide the animated 'loading.gif'
RootPanel.get("loading").setVisible(false);

->

If the page is failing to load then check the JavaScript console for
errors, etc. and/or step through the sample code in Eclipse.

-> AbstractAccountPresenter

...

public void onRecordDoubleClicked(String id) {
openHostFile(HOST_FILENAME, EDIT, id, FEATURES);
}

->

-> AbstractPagingPrersenter

...

public static void openHostFile(String filename, String queryString,
String id, String features) {

StringBuilder url = new StringBuilder();
url.append(filename).append("?");

String arg0Name = URL.encodeQueryString(ID);
url.append(arg0Name);
url.append("=");
String arg0Value = URL.encodeQueryString(id);
url.append(GwtCxEntryPoint.encodeBase64(arg0Value));
Log.debug("Window.open() arg0Value: " + arg0Value + " Base64: " +
GwtCxEntryPoint.encodeBase64(arg0Value));
url.append(PARAMETER_SEPERATOR);

String arg1Name = URL.encodeQueryString(ACTIVITY);
url.append(arg1Name);
url.append("=");
String arg1Value = URL.encodeQueryString(queryString);
url.append(GwtCxEntryPoint.encodeBase64(arg1Value));
Log.debug("Window.open() arg1Value: " + arg1Value + " Base64: " +
GwtCxEntryPoint.encodeBase64(arg1Value));

Window.open(GwtCxEntryPoint.getRelativeURL(url.toString()), NAME,
features);
}

->

Cheers
Rob

http://code.google.com/p/gwt-cx/


On Apr 4, 12:58 am, Onyekachi Anyanwu <onyekachi
Reply all
Reply to author
Forward
0 new messages