errai-tutorial | Errai tutorial project | Application Framework library
kandi X-RAY | errai-tutorial Summary
kandi X-RAY | errai-tutorial Summary
Errai Getting Started Demo.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Called when a contact is updated
- Returns the contact object
- Checks if the source queue is not this contact
- Gets the source queue session id
- Handler for a modal submit event
- Creates a new Contact from editor
- Update contact from editor
- Returns the property value
- Setup the UI
- Add buttons to the navigation bar
- Remove the navigation buttons
- Initialize the navigation component
- Handler for a modal action
- Sets the state of the contact
- Handles a single click event
- Handler for double - click events
- Edit a contact component
- Returns a string representation of this contact
- Deletes a contact
- Handler for a modal delete event
- Converts a string value to a Date
- Converts the given model value to a widget value
- Sort contacts by name
- Create a contact
- Deletes an entity
- Update the contact
errai-tutorial Key Features
errai-tutorial Examples and Code Snippets
Community Discussions
Trending Discussions on errai-tutorial
QUESTION
I am developing a project with Errai 4 and as usual I can run "mvn gwt:run" and hot reload just works, i.e. I change models or views and I only need to refresh the browser.
Now I need that but running my Errai application on top of Tomcat 7.
The project with the Tomcat is similar to https://github.com/stbland/errai-tutorial-tomcat
The question is how to make hot reload work with Tomcat 7 when I am only making changes in the front-end using only mvn gwt:run
or similar.
Step by step final solution:
Info for solve this:
- How can hot reload be enabled when running Errai on Tomcat?
- Errai 4 running on Tomcat (first answer)
Install the original project
For this example we will use the errai-tutorial
- git clone https://github.com/Tlaloc-Es/errai-tutorial.git --single-branch --branch develop
- cd errai-tutorial
- mvn install
Run on Tomcat
- git clone https://github.com/Tlaloc-Es/errai-tutorial-tomcat.git --single-branch --branch develop
- cd errai-tutorial-tomcat
- mvn tomcat7:run-war
Listening changes
- cd errai-tutorial
- mvn gwt:compile
- mvn gwt:run
Now you can open http://localhost:8080/errai-tutorial/ in your web browser
For do hot reload you will need import this class in your project:
and call it in a shorcut of this way (SuperDevModeHelper.devModeOn()
) like this:
ANSWER
Answered 2019-Apr-10 at 09:59Take a look to this archetype https://github.com/tbroyer/gwt-maven-archetypes/
The modular-webapp configures tomcat and gwt to work together. Hot-reload works because gwt:codeserver generates a special bootstrapper (the your-app.nocache.js) that immediately run a gwt compile and reloads on completion. To make it work you need to load the gwt:codeserver generated launcherDir into the tomcat context, this is done in this archetype using the context.xml.
Alternatively, you can add some compile-trigger into your own app so you can fire the compilation using a shortcut. This is all you need to fire a compilation (DevModeHelper). Just add a shortcut handler in your app entry point and call devModeOn()
. If you don't want to add it in your final compilation, install the event listener only if System.getProperty("superdevmode").equals("on")
is true
. In this case, use the classic Dev Mode On
bookmark the first time, then use your custom shortcut. We use this strategy and it works nicely.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install errai-tutorial
You can use errai-tutorial like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the errai-tutorial component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page