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 5 and version 4:

At line 77 changed 1 line.
;: ''The files in the "pages" directory will end up in "WEB-INF/pages" at deployment time. The container provides security for all files below WEB-INF. This applies to client requests, but not to forwards from Struts' ActionServlet. Placing all JSPs below WEB-INF ensures they are only accessed through Actions, and not directly by the client or each other. This allows security to be moved up into the Action, where it can be handled more efficiently, and out of the base presentation layer.''
;: ''I file nella directory "pages" finiranno in "WEB-INF/pages" al momento del deployment. Il container mette in sicurezza tutti i file sotto WEB-INF. Ciò si applica alle richieste del client, ma non ai forward dalla ActionServlet di Struts. Mettere tutte le JSP sotto WEB-INF assicura che queste siano accedute solo tramite Action, e non direttamente dal client o fra loro. Ciò consente di spostare la sicurezza nella Action, dove può essere gestita in modo più efficiente, e fuori dallo strato di presentazione di base.''
At line 79 changed 1 line.
The web application security for AppFuse specifies that all *.html url-patterns should be protected (except for /signup.html and /passwordHint.html). This guarantees that clients must go through an Action to get to a JSP (or at least the ones in ''pages'').
La sicurezza a livello di web application per AppFuse specifica che tutti le url del tipo *.html siano protette (ad eccezione di /signup.html e /passwordHint.html). Ciò garantisce che i client passino attraverso una Action per arrivare ad una JSP (o almeno a quelle in ''pages'').
At line 81 changed 1 line.
%%note __NOTE:__ If you want to customize the CSS for a particular page, you can add <body id="pageName"/> to the top of the file. This will be slurped up by SiteMesh and put into the final page. You can then customize your CSS on a page-by-page basis using something like the following:
%%note __NOTA:__ Se vuoi personalizzare il CSS per una pagina particolare, puoi aggiungere <body id="pageName"/> in cima al file. Questo verrà risucchiato da SiteMesh e messo nella pagina finale. Dopo puoi personalizzare il tuo CSS pagina per pagina usando qualcosa del tipo seguente:
At line 84 changed 2 lines.
* Add keys in ApplicationResources.properties the titles and headings in the JSPs
In the generated JSPs, there are two keys for the title (top of the browser window) and the header (heading in the page). These fields are provided above with key names of personDetail.title and personDetail.heading.
* Aggiungi le chiavi ApplicationResources.properties relative a titoli ed intestazioni nelle JSPs
Nelle JSP generate, ci sono due chiavi per il titolo (in cima alla finestra del browser) e l'intestazione (in testa alla pagina). Questi campi sono forniti sopra con i nomi di chiavi di personDetail.title personDetail.heading.
At line 87 changed 1 line.
''Just above, we added "personForm.*" keys to this file, so why do I use personDetail instead of personForm for the titles and headings? The best reason is because it gives a nice separation between form labels and text on the page. Another reason is because all the *Form.* give you a nice representation of all the fields in your database.
''Appena sopra, abbiamo aggiunto delle chiavi del tipo "personForm.*" a questo file, per cui per quale motivo ora uso personDetail invece di personForm per i titoli e le intestazioni? Il motivo migliore è che dà una buona separazione fra le etichette del form ed il testo nella pagina. Un altro motivo è perché tutti i *Form.* ti danno una buona rappresentazione give di tutti i campi nel tuo database.
At line 89 changed 1 line.
I recently had a client who wanted all fields in the database searchable. This was fairly easy to do. I just looked up all the keys in ApplicationResources.properties which contained "Form." and then put them into a drop-down. On the UI, the user was able to enter a search term and select the column they wanted to search. I was glad I followed this Form vs. Detail distinction on that project!''
Recentemente ho avuto un cliente che voleva tutti i campi nel database ricercabili. Ciò è stato piuttosto semplice da fare. Ho semplicemente cercato tutte le chiavi in ApplicationResources.properties che contenessero "Form." e le ho messe un un menu a discesa. Sulla UI, l'utente poteva inserire un termine da cercare e selezionare la colonna in cui volesse effettuare la ricerca. Sono stato contento di aver seguito questa distinzione Form vs. Detail in quel progetto!''
At line 94 changed 1 line.
To create a StrutsTestCase Test for PersonAction, start by creating a PersonActionTest.java file in the test/web/**/action directory:
Per creare un Test StrutsTestCase per PersonAction, inizia con il creare un file PersonActionTest.java nella directory test/web/**/action:
At line 156 changed 1 line.
You will need to add __PERSON_KEY__ as a variable to the src/dao/**/Constants.java class. The name, "personForm", matches the name given to the form in the struts-config.xml file.
Devi aggiungere __PERSON_KEY__ come variabile alla classe src/dao/**/Constants.java. Il nome, "personForm", corrisponde al nome dato al form nel file struts-config.xml.
At line 166 changed 1 line.
If you try to run this test, you will get a number of NoSuchMethodErrors - so let's define the edit, save, and delete methods in the PersonAction class.
Se provi ad eseguire questo test, otterrai una serie di NoSuchMethodErrors - pertanto definiamo i metodi edit, save, e delete della classe PersonAction.
At line 170 changed 1 line.
In src/web/**/action, create a PersonAction.java file with the following contents:
In src/web/**/action, crea un file PersonAction.java con il seguente contenuto:

Back to CreateActions_it, or to the Page History.