IBM Worklight 6.0.0.1 - Rich Page Editor blocks - eclipse

Problem - As the project was growing from some point on I cannot use anymore Worklight's Rich Page Editor. It looks as on the picture.
Configuration:
Eclipse Juno EE
Worklight 6.0.0.1
Project details - All pages are packed in the same HTML file. At the moment HTML file contains 6-7 pages in about 1100 lines. Compiling and all the rest works.

There should be no problems at all with that page size or number of views, so the appearance is likely tied to recent changes in the application logic itself. In your screenshot the editor has already finished loading the page into the embedded browser (otherwise you would still see a "Loading..." message in the editor's toolbar). The circular icon in the middle does not come from the editor itself but from something in that page or an associated script. In fact it looks a bit like a jQuery Mobile loading indicator to me.
One thing that may be happening here is something in the application's startup code has been added to call out to server-side logic (ex. a Worklight adapter call). Within the editor, the full preview server is not available so generally only the browser-side resources of an application will be functional. This allows you to use the editor for UI design work and then once you start hooking up to server-side features, previewing of the app would typically switch over to the Mobile Browser Simulator (Run As->Preview) or even native browser testing.
The best recommendation is to look for something in your app initialization process that's expecting data back and put in some temporary development-time mockups for such data. As an example, instead of making a service call to retrieve some JSON data just point to a test .json file in your project instead.

Could be related to this: Worklight Studio Rich Page Editor fails of WL.* call in page load
The short answer is that if you put just about any WL.* calls (even WL.Logger.*) in a page loading handler, it causes the Rich Page Editor to lock up.
If the problem is that you are calling backend resources that aren't available, then the normal timeouts and error handling in your code should keep the editor from locking up. You do have timeouts and error handling in your code, right? ;-)
If this problem can't be debugged easily, weinre (http://people.apache.org/~pmuellr/weinre/docs/latest/) works in the Rich Page Editor. You can see what is in the JavaScript console and if there are any exceptions thrown when it locks up.

Related

Cannot get JxBrowser to render in eclipse rcp JavaFx environment

I am currently evaluating JxBrowser 6.17 as an alternative browser technology for a eclipse RCP based data maintenance application, since the SWT Browser does not suit our needs.
What are our special needs anyways? Well, we need to embed an older solution into our new application, since we would not be able to add all required features into the new application in time. Since we have the required features in an older JSP based web application we need to embed it to make the functionality available to our customers. This comes with a lot of issues, but for most of them we already generated answers. The biggest issue we are currently facing is that the SWT Browser component does not support instance based Cookies which we need, since our web application has Cookie based session management.
I have also tried using the Mozilla implementation using different profiles, which unfortunately is not possible, since the profile management is just as static as the Cookie management.
Next step is to evaluate commercial frameworks with which I am currently facing some issues.
I requested an evaluation license for JxBrowser and tried to embed it into our eclipse 4 RCP application. I would like to embed it using JavaFX, since we already use JavaFX and would like to avoid AWT.
Using the following code will instantiate a JxBrowser and load the given URL. Actually the request does get fired, but the Browser does not render any content at all.
FXCanvas canvas = new FXCanvas(parent, SWT.NONE);
Browser browser = new Browser();
BrowserView browserView = new BrowserView(browser);
browser.loadURL("http://www.google.com");
canvas.setScene(new Scene(browserView));
Even when loading specific HTML it will not render any content.
There are no observable Exceptions or errors.
Does anybody have an idea on whats the issue in my case?
In a different scenario we use the JavaFX WebView embedding the CKEditor into our application and everything works (more or less) flawlessly, but I am not able to get the JxBrowser to render its contents.
I am sure, that I am doing something wrong (probably something pretty basic :))
What could I be missing?
Any idea or tip could do the trick ;)

Mouseup event is not propagated to a popup window in IE 11

I've a legacy app that features a DND from a popup window to the main one.
It works fine in IE 8 but not in any of the newer versions of IE. The effect results in the drag ghost image being stuck in the source window and not going away after the drop had occurred.
Some debugging did in fact confirm that the 'mouseup' event does not get propagated back to the source window. What can be done to fix it? Many thanks!
ITs a bit hard to begin to answer your question without some code....
use the File>Properties menu to find out which IE security zones the two windows(domains) map too...IE uses a different security model to other browsers... drag/drop is probably not allowed between local web files (using file: protocol) and internet or intranet sites.
Have you used the Dev tool yet to debug it? If you are using showModalDialog (which normally disables context menus) you can right click on a link (a) or input element to display the context menu so you can display the debugger for showModal content page.
If possible include a link to your website or a mashup (jsfiddle) with your questions.

is there a provisioning for inspecting a winJs html file

winJs application are simple html Applications. Xaml c# provides an interface view where we can look at the design drag drop elements.
Is there a Way to Debug a winJS application like firebug or inspect element in Google Chrome. running every time in the simulator to check whether code is working or not has become a tedious Job. Any alternative please suggest.
Yes there's a kind of firebug as you mentioned But it is also known as Dom Explorer
The DOM Explorer is available only while in debug mode.
Make sure you have the script debugger selected, start debugging (F5), then go to Debug -> Windows -> DOM Explorer.
Here's a link to study the details
Dom Explorer from MSDN

Unable to Edit Article After System Plugin Install

I have developed a front-end system plugin for Joomla 3.0 which replaces keywords for HTML formatted objects. This works perfectly in my local lab environment but when installed on the hosted site (WHM/cPanel) it causes issues with the administration area and prevents the administrators from editing the articles.
When the administrator clicks on a article to edit the page attempts to load then appears to go back to the same page. I have developed this as a front-end plugin only so I shouldn't affect the administration area.
The problem is also preventing admin from creating anything new (news, blogs, content, menu items etc.)
As this does not happen within my lab I can only assume the issue is with some server settings which I may need to enable/disable. I have complete administrative access to both WHM, cPanel and Joomla so can change settings where ever needed...
Things I have observed:
The article URL changes from:
/administrator/index.php?option=com_content&view=article&layout=edit&id=7
to:
/administrator/index.php?option=com_content&view=article&layout=edit&id=7
when the plugin is enabled. Notice the ampersand has changed to amp;. This makes me think it could be something to do with UTF-8 character encoding has been set in MySQL to utf8general_ci.
Any pointers on configurations I may need to change would be greatly received.
Question: How do I prevent this from occurring (without removing my essential plugin).
If you create System Plugin that should work only on front-end you have to check in your plugin if current page is front-end. You can do it using this function: JFactory::getApplication()->isSite() or JFactory::getApplication()->isAdmin()
Example usage (I assume you use onAfterRender event):
function onAfterRender() {
// Exit if current page is from Administration panel
if( JFactory::getApplication()->isAdmin() ) return;
/* your plugin main code goes here*/
}
It will prevent your plugin from modifying administration panel output. If you already done it and it does check like it should to, there is no way that reason of your problems is that plugin.

How do I transform a gwt app into a 3rd-party embeddable library

I've built a GWT application that simulates a standalone popup widget. I can invoke a javascript method that pops the widget from the html page that is part of the application (i.e. PopWidget.html) -- the html is basically auto-generated when I create the GWT eclipse project.
Now I'd like to invoke the javascript method from a standalone html (not part of application). When I try to call the javascript method, I am getting a permissions exception. Is this a SOP issue? And if so, How can i either work around this problem or transform the app to behave as an embeddable 3rd-party javascript library?
I've looked in gwt gadgets and this seems like the ticket, but I have not discovered any "popup" gadgets...
You are correct that it is an SOP issue - the default linker used builds an iframe, and loads the app source into that iframe. To prevent the js from running any file on your system, this is locked down (in most browsers).
Take a look at the "Controlling Compiler Output" section of this link http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjects.html#DevGuideModuleXml- the standard linker (std) uses iframes to protect against possible xss issues, but in your case you want cross origin loading, so you can probably use the xs linker instead.