Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
Articles
CreateManager_it
ValidationAndList_it




JSPWiki v2.2.33

[RSS]


Hide Menu

CreateActions_it


Difference between version 3 and version 2:

At line 5 changed 2 lines.
!!About this Tutorial
This tutorial will show you how to create a Struts Action, a JUnit Test (using [StrutsTestCase|http://strutstestcase.sourceforge.net/]), and a JSP for the form. The Action we create will talk to the PersonManager we created in the [Creating Managers|CreateManager] tutorial.
!!Informazioni su questo Tutorial
Questo tutorial ti mostrerà come creare una Action di Struts, un Test JUnit (usando [StrutsTestCase|http://strutstestcase.sourceforge.net/]), ed una JSP per il form. La Action che creiamo parlerà con il PersonManager che abbiamo creato nel tutorial [Creare Manager|CreateManager_it].
At line 8 changed 1 line.
By default, AppFuse ships with [Struts|http://struts.apache.org] as its web framework. As of 1.6+, you can use [Spring|http://www.springframework.org] or [WebWork|http://opensymphony.org/webwork] as your web framework. In 1.7, support was added for using [JSF|http://myfaces.apache.org] or [Tapestry|http://jakarta.apache.org/tapestry].
Per default, AppFuse esce con [Struts|http://struts.apache.org] come framework web. Dalla 1.6+, puoi usare [Spring|http://www.springframework.org] o [WebWork|http://opensymphony.org/webwork] come tuo framework web. Nella 1.7, è stato aggiunto il supporto per usare [JSF|http://myfaces.apache.org] o [Tapestry|http://jakarta.apache.org/tapestry].
At line 10 changed 1 line.
To install any of these web frameworks instead of Struts, simply navigate to the ''extras'' directory and into the directory of the framework you want to install. The README.txt file in this directory has further instructions. The tutorials for these other frameworks are listed below.
Per installare uno di questi framework web invece di Struts, è sufficiente che tu vada nella directory ''extras'' e da qui nella directory del framework che vuoi installare. Il file README.txt in questa directory contiene ulteriori informazioni. I tutorial per questi altri framework sono elencati sotto.
At line 17 changed 1 line.
Let's get started by creating a new Struts Action and JSP your AppFuse project.
Iniziamo a creare una nuova Struts Action ed una JSP per il tuo progetto AppFuse.
At line 19 changed 1 line.
;:%%(color: blue)''I will tell you how I do stuff in the __Real World__ in text like this.''%%
;:%%(color: blue)''Ti dirò come faccio le cose nel __Mondo Reale__ in un testo come questo.''%%
At line 21 changed 8 lines.
!Table of Contents
* [1] Add XDoclet Tags to Person to generate PersonForm
* [2] Create skeleton JSPs using XDoclet
* [3] Create PersonActionTest to test PersonAction
* [4] Create PersonAction
* [5] Run PersonActionTest
* [6] Clean up the JSP to make it presentable
* [7] Create Canoo WebTests to test browser-like actions
!Indice
* [1] Aggiungi Tag XDoclet a Person per generare PersonForm
* [2] Crea lo scheletro delle JSP usando XDoclet
* [3] Crea PersonActionTest per effettuare test su PersonAction
* [4] Crea PersonAction
* [5] Esegui PersonActionTest
* [6] Ripulisci la JSP per renderla presentabile
* [7] Crea dei WebTests Canoo per effettuare test di interazioni browser-like
At line 30 changed 1 line.
!!Add XDoclet Tags to Person to generate PersonForm [#1]
!!Aggiungi Tag XDoclet a Person per generare PersonForm [#1]
At line 44 changed 1 line.
!!Create skeleton JSPs using XDoclet [#2]
!!Crea lo scheletro delle JSP usando XDoclet [#2]
At line 92 changed 1 line.
!!Create PersonActionTest to test PersonAction [#3]
!!Crea PersonActionTest per effettuare test su PersonAction [#3]
At line 167 changed 1 line.
!!Create PersonAction [#4]
!!Crea PersonAction [#4]
At line 319 changed 1 line.
!!Run PersonActionTest [#5]
!!Esegui PersonActionTest [#5]
At line 322 added 1 line.
At line 348 changed 1 line.
!!Clean up the JSP to make it presentable [#6]
!!Ripulisci la JSP per renderla presentabile [#6]
At line 372 changed 2 lines.
!![[Optional] Create a Canoo WebTest to test browser-like actions [#7]
The final (optional) step in this tutorial is to create a [Canoo WebTest|http://webtest.canoo.com] to test the JSPs.
!![[Opzionale] Crea dei WebTests Canoo per effettuare test di interazioni browser-like [#7]
At line 375 changed 1 line.
;:''I say this step is optional, because you can run the same tests through your browser.''
Il passo finale (opzionale) di questo tutorial è creare un [WebTest Canoo|http://webtest.canoo.com] per effettuare test sulle JSP.
At line 377 changed 1 line.
You can use the following URLs to test the different actions for adding, editing and saving a user.
;:''Dico che questo passo è opzionale, perché puoi eseguire gli stessi test attraverso il tuo browser.''
At line 379 changed 4 lines.
* Add - [http://localhost:8080/appfuse/editPerson.html].
* Edit - [http://localhost:8080/appfuse/editPerson.html?id=1] (make sure and run __ant db-load__ first).
* Delete - [http://localhost:8080/appfuse/editPerson.html?method=Delete&id=1] (or edit and click on the Delete button).
* Save - Click [edit|http://localhost:8080/appfuse/editPerson.html?id=1] and then click the Save button.
Puoi usare le URL seguenti per effettuare test sulle diverse action di aggiunta, modifica e registrazione di un utente.
At line 384 changed 1 line.
Canoo tests are pretty slick in that they're simply configured in an XML file. To add tests for add, edit, save and delete, open test/web/web-tests.xml and add the following XML. You'll notice that this fragment has a target named ''PersonTests'' that runs all the related tests.
* Aggiungi - [http://localhost:8080/appfuse/editPerson.html].
* Modifica - [http://localhost:8080/appfuse/editPerson.html?id=1] (make sure and run __ant db-load__ first).
* Elimina - [http://localhost:8080/appfuse/editPerson.html?method=Delete&id=1] (or edit and click on the Delete button).
* Registra - Click [edit|http://localhost:8080/appfuse/editPerson.html?id=1] and then click the Save button.
At line 387 added 2 lines.
I test du Canoo sono piuttosto slick in quanto si configurano tramite un semplice file XML. Per aggiungere test per aggiungi, modifica, registra ed elimina, apri test/web/web-tests.xml ed aggiungi il seguente XML. Noterai che questo frammento ha un target che si chiama ''PersonTests'' per eseguire tutti i test correlati.

Back to CreateActions_it, or to the Page History.