Какой рейтинг вас больше интересует?
|
Главная /
Каталог блоговCтраница блогера Yarixxx/Записи в блоге |
GWT: How to use new fancy LocalStorage
2015-10-26 07:24:48 (читать в оригинале)LocalStorage is definitely not a very new HTML5 feature. It is well known and used for several years. GWT provides special API for localStorage. The way it can be used is the same as in JavaScript. First of all we import: import com.google.gwt.storage.client.Storage; then we can take storage object: Storage storage = Storage.getLocalStorageIfSupported(); if localStorage […]
GWT: How to use plain old Cookies?
2015-10-25 05:08:54 (читать в оригинале)Cookies is a quite old and limited technology to save some data between sessions in browsers. There are much more capable technologies like HTML5 localStorage. There is a nice topic on how to compare and choose which one is better. To check if Cookies are enabled set Cookie we can use the following code: import […]
Some common use-cases of Gin
2015-10-25 04:01:05 (читать в оригинале)There are several useful cases for Gin injections. EventBus One of the most popular way to make application loosely coupled is to use EventBus. We can create injection without taking care of how it was instantiated. In MyWidgetClientModule we add line: bind(EventBus.class).to(SimpleEventBus.class).in(Singleton.class); It declares that injected EventBus interface should be implemented by SimpleEventBus and be […]
How to use Constants in Gin
2015-10-11 02:54:28 (читать в оригинале)Here is a nice way to inject some properties to GWT application. First of all declare Constants interface. public interface MyConstants extends Constants { @DefaultStringValue("hello") String myWords(); } Then bind MyConstants: bind(MyConstants.class).in(Singleton.class); Next we can use constants: public class MyWidgetMainPanel extends Label { @Inject public MyWidgetMainPanel(MyConstants myConstants) { this.setText(myConstants.myWords()); } } by default it will […]
How to use Gin for GWT
2015-10-09 09:53:00 (читать в оригинале)There is quite good tutorial on Gin that I’ve used to try it. First of all there is need to declare it in *.gwt.xml file. <inherits name="com.google.gwt.inject.Inject"/> Next step is to create Injector: import com.google.gwt.inject.client.GinModules; import com.google.gwt.inject.client.Ginjector; @GinModules(MyWidgetClientModule.class) public interface MyWidgetGinjector extends Ginjector { MyWidgetMainPanel getMainPanel(); } and create «binder»: import com.google.gwt.inject.client.AbstractGinModule; import com.google.inject.Singleton; public […]
Категория «Кино»
Взлеты Топ 5
+363 |
414 |
Информационный колодец |
+341 |
345 |
Yurenzo |
+339 |
343 |
CAPTAIN |
+331 |
341 |
Alta1r |
+322 |
361 |
Vindigo |
Падения Топ 5
-2 |
48 |
Illusory_doll |
-3 |
237 |
|
-3 |
252 |
Soft Hedgehog's Journal |
-5 |
264 |
Смотреть онлайн индийские фильмы. |
-5 |
27 |
warner four |
Популярные за сутки
Загрузка...
BlogRider.ru не имеет отношения к публикуемым в записях блогов материалам. Все записи
взяты из открытых общедоступных источников и являются собственностью их авторов.
взяты из открытых общедоступных источников и являются собственностью их авторов.