Page Navigation in GWT Application - gwt

I want to navigate to another page in my application. I don't want the page to reload(i.e.. application should be a single URL application).
I know only one way to accomplish this by changing the proper div attached in the RootPanel by whatever data I want to display. But I fell that might get cumbersome if there are many navigations(I haven't tried it though :P).
Is there any other way to accomplish this or make the above said approach better?
Thanks in advance.

I guess you need GWT Development with Activities and Places
Well ,its time to have a look on MVP
With that you can do
History.newItem(tokenOfYourPresenterScreen);

A nice single EntryPoint demo app is here : (BrowserHistoryExample.java)
http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsHistory.html
I added the below to the example to demonstrate links.
vertPanel.add(new Label("Access history via Hyperlinks"));
vertPanel.add(new Hyperlink("External Page 0","page0"));
vertPanel.add(new Hyperlink("External Page 1","page1"));
vertPanel.add(new Hyperlink("External Page 2","page2"));

Related

Which is the better way to white-label a flutter app

I have one project that I have to sell to another clients, so I wanna found a way to unify the code to, when I release some updates, I have to manipulate only one code (and, of course, keeping the specificities from each one)
I found an article HERE which the guy creates a new folder named 'config' and set some variables there to be used in the parent project. I tried this but find out that would be very tough to do because the first app was developed specifically by one client, and with it I would need so much time to make all the aspects dynamic... Another problem is firebase, in first app I used firebase but in the second i won't. How to make it possible?
And in this article they say about 'flavours' that can be used to do something similar.
Someone knows about this approaches or there is another to reach my goal? With flavours I will have less re-factor than with config?
I appreciate any help
A third way to do this with no client specific app configuration is to make an api call to get back your client specific theme, and then set the flutter theme based on this.
If you need web support see below:
First update your assets in index.html that aren't white labeled, leaving stubs in their place that we'll fill in later. i.e.
Next show a nice loading indicator while flutter loads. To do this, just put the html for it in the body element of the index.html file.
Finally update the webpage title and favicon using javascript inside Flutter. I used package
universal_html: 2.0.8
https://pub.dev/packages/universal_html
then you can update the favicon
import 'package:universal_html/html.dart';
var favicon = document.getElementById('favicon');
favicon?.setAttribute('href','insertLinkToYourImage');
Updating the title can be accomplished in various normal ways like just setting the title attribute of a MaterialApp widget.

reloading the soundcloud html widget with different sets from links

I was advised to post this here by SoundCloud support - I hope you can help. I want to use the html5 widget on my site and access different sets but, rather than have multiple widgets on a page, I want to be able to reload the widget with a different set by clicking on different links on the page. It seems you can do this using the API and I have been playing with w.soundcloud.com/player/api_playground.html and have got it to load my sets by putting the api.soundclound.com url in the appropriate box and clicking "reload widget".
I really don’t know javascript at all so I was hoping to copy the source from that page and try and edit it to do what I want. However, I can’t even get the page to load when it is hosted on my site:
http://www.indigomusic.co.uk/SCtest/playground.htm
I downloaded api.js and put it in a folder on my server but I’m obviously missing step(s). I’ve read http://developers.soundcloud.com/docs/html5-widget#introduction but it obviously assumes a level of javascript knowledge that I just don’t have...
...are you able to help?
Many thanks,
Dan Selby
You don't have do use the Widget API for that necessarily.
Here is a simple example using jQuery and the SoundCloud SDK doing what you described:
http://dl.dropbox.com/u/12477597/Temporary/dynamic-widget-example.html
Hope it Helps.

Best practices for designing GUI in GWT

I have recently started studying Google Web Toolkit. I have went through some walkthroughs, and I think I understand the basics and the idea. However, I have some questions on the overall architecture and design of the applications.
Let's start with the GUI. I want to build a "common" web application, where the user first sees a login page. After successful login, the user is redirected to some kind of index page and a menu is added. I created a new LoginComposite for the login page, and tried to design a nice looking HTML table using the GWT Designer. However, I find that really hard to do, as you cannot set any individual properties on the individual cells (TDs)? There's no way to specify colspan or rowspan, and I can't set any padding or margin on the cells themselves. In short, I know exactly how I would have written the HTML code, but I can't translate that to the designer. Is that just me?
Also, I am wondering about the best practice for code layout and design. I went through the StockWatcher tutorial, but that's really not a very realistic web application. For example, I would like to know how I should design different forms (should each be in a own class inheriting the Composite-class)? How should I switch between forms (for example, first a list view, then a form for editing a chosen item from the list, then a totally different page)? If I have one Composite for each page, and instantiate them when needed in my EntryPoint, would that mean that the client will download all the JavaScript for all those Composites at page load? Should I stick with only one HTML page, or should I have many?
These are questions not really covered by any GWT tutorial. If anyone know a good example of a "real" web application built using GWT, I would love to see it.
Thanks for your input!
There are a whole bunch of resources in Google IO talks. For example:
http://www.google.com/events/io/2011/sessions/high-performance-gwt-best-practices-for-writing-smaller-faster-apps.html
http://www.google.com/events/io/2011/sessions/highly-productive-gwt-rapid-development-with-app-engine-objectify-requestfactory-and-gwt-platform.html
http://www.google.com/events/io/2010/sessions/architecting-production-gwt.html
http://www.google.com/events/io/2010/sessions/architecting-performance-gwt.html
http://www.google.com/events/io/2010/sessions/gwt-ui-overhaul.html
http://www.google.com/events/io/2009/sessions/EffectiveGwt.html
Also, don't expect to be able to edit absolutely everything if you are using the GUI to build your GWT app. Good luck!

HTML pages in iPhone apps. Where to start?

I'm looking to create a small reference app. It has a UItabBar and 4 views that each load a UITableView which can be drilled down to display, essentially a page of information and pictures, like a book.
If I want to make the page a little more stylised than just using labels and image views, the common consensus seems to be to create HTML pages and load them in a web view.
Being new to this, please could someone give me some direction on where to even begin with this? As I understand it, I essentially need to develop a web page with a text editor, and then what? Actualy upload online and create a public website? It's a little confusing, and as I'm not a developer, a little disheartening to think I'll now have to learn HTML as well as Obj-C to create a simple app.
I'm sure there are some great tools or alternatives out there and if someone could recommend such avenues I'd be incredibly grateful.
Kind regards,
Ryan
If you want to display HTML pages in a UIWebView you can store them in your bundle and display them from there (so no need to put the pages online). It is best though to stick with the UI controls that Apple provides you with. If you need more customization try subclassing some of the standard controls.
If you customize your UI too much it will just confuse the user and degrade their experience.

iPhone app, help pages, multiple pages, quick to develop?

I need to provide some help for my app. I'm going to have some info buttons on some screens.
Initially I'd like them to be directed to the exact help page, but I'd like them then to be able to navigate to other pages in the help system.
What should I use, I'm looking for something quick to develop and quick to modify.
I'm thinking local html pages perhaps ?
Any examples / advice
I think the best way to do this is using a UIWebView to load HTML pages from your server. This way the user doesn't leave you app and the information can be updated or change as you may need.