Changes for page Your First Project - Hello World
Last modified by Steve Peery on 2013/05/29 14:41
From version 8.1
edited by Pascal Robert
on 2011/12/27 07:06
on 2011/12/27 07:06
Change comment:
There is no comment for this version
To version 14.1
edited by Theodore Petrosky
on 2013/05/29 14:41
on 2013/05/29 14:41
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki.p robert1 +XWiki.tedpet - Content
-
... ... @@ -7,6 +7,7 @@ 7 7 8 8 {{info}} 9 9 If the Wonder project types don't appear in the File->New menu, you are probably in a Java perspective instead of WOLips. 10 +Go to the Window->Open Perspective->Other... menu and select WOLips. 10 10 {{/info}} 11 11 12 12 The project wizard will ask for the project name. Enter **HelloWorld**. Click **Finish**. ... ... @@ -14,7 +14,7 @@ 14 14 [[image:SetProjectName.png||border="1"]] 15 15 16 16 {{info}} 17 -Don't put spaces in the project name, Eclipse ha vea hard time with projects that have spaces in the file system path.18 +Don't put spaces in the project name, Eclipse has a hard time with projects that have spaces in the file system path. 18 18 {{/info}} 19 19 20 20 The project have been created, you will see it in the **WO Explorer** tab. Expand it (click on the triangle next to the project name) and you will see the following folders: ... ... @@ -34,7 +34,7 @@ 34 34 35 35 Now, let's make the "Hello World" to be dynamic. If the HelloWorld application is still running, terminate it by clicking on the square red button in the **Console** tab. 36 36 37 -In the project, open the **Sources** folder, open the **your.app.components** package and open **Main.java**. **Main.java** is the Java part of a Project Wonder component. If you check the content of the **Related** tab, you will see that **Main.java** is related to other files like **Main.wo** and **Main.api**, it's a good way to find out if a Java class is part of a component. 38 +In the project, open the **Sources** folder, open the **your.app.components** package and open **Main.java**. **Main.java** is the Java part of a Project Wonder component. If you check the content of the **Related** tab, you will see that **Main.java** is related to other files like **Main.wo** and **Main.api**, it's a good way to find out if a Java class is part of a component. 38 38 39 39 [[image:RelatedTab.png||border="1"]] 40 40 ... ... @@ -54,7 +54,7 @@ 54 54 55 55 Save the file. 56 56 57 -So now we have a variable to display the content of a string. The next step is to open the HTML part of the component to actually display the string. In the **Related** view, double-click on the **Main.wo** file. This action will open the component in the Component Editor. 58 +So now we have a variable to display the content of a string. The next step is to open the HTML part of the component to actually display the string. In the **Related** view, double-click on the **Main.wo** file. This action will open the component in the Component Editor. 58 58 59 59 [[image:ComponentEditor.png||border="1"]] 60 60 ... ... @@ -64,8 +64,10 @@ 64 64 <wo:str value = "$myTextForDisplay" /> 65 65 {{/code}} 66 66 67 -And save your modifications. You are now ready to run the application again. The first time you ran the application, it created a run configuration inside Eclipse, so to run the application again, click on the green circle with a white arrow in the toolbar, and select **HelloWorld**. [[image:RunConfig.png||border="1"]]68 +And save your modifications. You are now ready to run the application again. The first time you ran the application, it created a run configuration inside Eclipse, so to run the application again, click on the green circle with a white arrow in the toolbar, and select **HelloWorld**. 68 68 70 +[[image:RunConfig.png||border="1"]] 71 + 69 69 The application is now displaying the string for the Java variable You can terminate the application. 70 70 71 71 Final step: making the string truly variable by having a small text field to update the string. To do so, go back into the Main component editor view and just after the //<wo:str_ call, add~:// ... ... @@ -91,3 +91,5 @@ 91 91 {{/code}} 92 92 93 93 Run the project again, and update the string in the text field. It's now 100% dynamic Since we added a setter for the variable a couple of steps before, you don't need to set the string in the updateString method, that's the power of bindings. 97 + 98 +[[You can move on to the next tutorial>>Your First Rest Project]].