Apache Wicket BackButton support Browser Compatibility issue - java

I am a newbie evaluating wicket framework for development and I have encountered a problem while trying to implement the Browser BackButton support feature of wicket.
After reading the documentation and forum discussions on the same topic I tried to put my components and everything in a form and used the -
form.setVersioned(true);
for enabling the Browser BackButton Support.
This works fine for Mozilla Firefox. However, the Back Button of Chrome and Internet Explorer fails to deliver the same functionality. This issue has created concern in my further exploration of wicket. Please help.

probably it is not about serVersioned(true) that is in most cases true by default. The most important thing is to call modelChanging() and modelChanged() methods to notify Wikcet about changes.
See https://cwiki.apache.org/WICKET/browser-back-forward.html

Related

Can a JavaFX 2 applet request focus and so focus on browser / tab?

I'm wondering if there would be any solution to show and focus on browser's tab containing a javafx 2 applet programmatically from the applet.
I don't think there's a simple solution, but who knows :)
PS : Obviously, stage.requestFocus() and stage.toFront() don't work.
No, there's absolutely no way to do this using no custom native bridge doing the job, even with a javascript bridge.
With the next versions of JavaFX neither.
And applets are not supported anymore in Chrome, so I think nobody would try that anymore.

Integrate Google Chrome browser into eclipse

I am trying to create an application using SWT Browser. Is it possible to integrate Google Chrome as browser into Eclipse (not as external web browser)?
No, as of current stable release of google chrome, you cannot use it inside SWT. The reason is that google chrome (and essentially chromium) doesn't support ActiveX (like IE, Firefox, Safari etc) but is based on NPAPI. (Note: I am considering that you are working on Windows machine as you haven't mentioned in your question !!)
But there are projects which are trying to make an embeddable version of chromium. See these links:
Chromiumembedded
Is Google Chrome embeddable?
You can set it through Eclipse UI.
Goto : Window > Preferences > General > Web Browser
Select "Use External Browser" radio button
Click "New" button to add a new browser eg. Chrome !
Click Apply + Ok
... and you have it working !
Bug 405031 - [Browser] implement Chromium support
https://bugs.eclipse.org/bugs/show_bug.cgi?id=405031
If you can not make it through UI, Try to edit settings in the following file.
YOUR-WORKSPACE\.metadata\.plugins\org.eclipse.core.runtime\.settings there will be a file called org.eclipse.ui.browser.prefs open it with any text editor and change the appropriate values, It is self descriptive you can easily find out what to change and all. Have a back up of the same before you modify.
Hope this helps you.
EDIT: Restart your eclipse to effect the above change.
To integrate Chromium into Eclipse or SWT applications you can use https://github.com/equoplatform/chromium-swt.

phonegap 1.0 android facebook plugin login fail

i'm adding facebook post button to my app (phonegap 1.0), it seems that the only method to have this working is using the plugin here:
https://github.com/jos3000/phonegap-plugins/tree/master/Android/Facebook
But it's not working for me, first i saw in the log PluginManager not found, reading the docs it seems plugins are not being loaded like that anymore.
But the intent and dialog of facebook appear when calling
window.plugins.facebook.authorize(appID, function(res){...})
I can see the facebook page being loaded but just after it finished the page automatically goes back with no response.
Anyboy has used succesfully this plugin??. actually the whole phonegap-plugin system seems to be very buggy... but i can't change the framework right now all the rest of the app is working.
At the end i managed to have it working by changing the Facebook authentication option in the java file, not using single sign on.
By the way i do NOT recommend phonegap... it seems to me the library is still full of bugs
I've only ever had very minor issues working with PhoneGap and iOS. Most we were able to find quick workarounds to resolve.
The issue is Android itself. I'm trying to avoid supporting it until Google steps in and enforces standards on every phone device manufacturer. Otherwise, you're guaranteeing yourself a swiss cheese codebase to deal with workarounds on every single device out there.

Testing GWT Apps in Development Mode in STS

When using Run As -> Web Application for a GWT app in STS, a Development Mode view is opened that contains a clickable link that in turn opens a browser and tests the GWT app...
What are the rules behind changing code while the code is running in the Development Mode. Does the Development Mode reflect these changes? Do you always have to terminate and restart Development Mode?
Any tips for how to speed up the loading of the link in Development Mode?
I would pose the same questions for Debug As -> Web Application.
Thanks!
The answer really depends on if you are running with "Debug As" or not. Actually, the whole topic is a little bit more complex (differentiating between server side/client side code, restarting vs refreshing vs reloading, ...), and instead of repeating myself, I will just provide you with a link to my answer here.
Note: The Google Plugin/GWT SDK behavior isn't specific to STS.
No, you don't have to restart. Just saving the files is sufficient. Another way to develop is to debug as a GWT app and then open the hosting html/jsp page in a browser and add the &gwt.codesvr=9997 at the end of the URL.

How to port web ui to desktop app?

I have seen a lot of people try to make a web ui looks like a desktop ui. However, most of the time i feel web ui is much more interesting than the desktop ui, with the help of javascript toolkit like jquery, gwt-ext etc.
My question is, how to port the web ui to desktop ui? Do I need to embed a javascript engine in java? css engine? html layout engine? That sounds like a lot of work to do.
Any easy way of doing this?
you can embed a web server in your app and you can embed a browser inside your app window. i know eclipse does this pretty well. it uses SWT to do the heavy lifting
http://www.eclipse.org/swt/snippets/#browser
check the Browser section
your web server doesnt even have to be a proper web server, it just has to set the content, and can query / change it on the fly. the javascript on the page can even interact directly with your app.
you should be even able to use crazy web frameworks like
http://echo.nextapp.com/site/
or
http://code.google.com/webtoolkit/
or even run a ruby site through JRUBY
or make really complex apps using the new HTML5 engine [canvas/video tags] (if your client has the new mozilla installed)
Adobe AIR technology solves this exact problem. The code you develop using Flex can be rendered in the Flash player plugin of a browser or the same code can be easily packaged as a Desktop application that runs on the AIR runtime.
Have you seen Appcelerator's Titanium Desktop
This is one of the best solution for you (i think!)
You write the javascript and html code, and the titanium SDK creates the Desktop application of the same
There is support for Python and Ruby.
Must try :
http://www.appcelerator.com/products/titanium-desktop/
if you are a Ruby programmer then you must also see this
http://www.rubyinside.com/bowline-rails-for-the-desktop-2183.html
Prism from Mozilla is made for this goal, exactly. It's out of beta now too, I believe.
Check Google Gears y Adobe AIR
It not 'a lot of work to do', it's a huge amount of work to do - you would in effect be writing you own browser and it'd never come close to the poplar ones out there, simply because you wouldn't get the level of feedback something like Firefox gets.
If you're trying to avoid address bars, menu bars, etc these can be switched off in all the popular browsers and so to the user the appearance would be that it's more application like with only the rich content of the HTML visible.
Sounds like JavaFX would be good for you?
http://en.wikipedia.org/wiki/Javafx
Try XULRunner from Mozilla. If you have developed extensions for Firefox, then this is the exact same thing. XULRunner contains the Gecko engine, so it can render XUL and HTML with CSS, and it supports JavaScript with many useful XUL Components, like file read and write, directory browser and network tools.
Because it supports HTML you can in effect make a webpage and have it run like an application. Also it is cross platform, so it will run on Windows, Mac and Linux, anywhere Firefox runs actually.
There is some information on creating XULRunner applications on the net, but since it's so similar to making Firefox Extensions, you can just google for that. A good Tutorial for getting started is this one.

Categories