29.01.2013 Views

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

g. If you want to create method stubs, click the check boxes to select the<br />

ones you want.<br />

7. Click Finish.<br />

ActionForm wizard<br />

To create a Struts form bean and optionally create a form bean mapping,<br />

complete the following steps:<br />

1. In the Project Navigator of the Web perspective, right-click the name of a<br />

project or artifact within a project.<br />

2. Click New -> Other -> Web -> Struts -> ActionForm Class -> Next.<br />

3. On the New ActionForm Class page in the ActionForm class name field, type<br />

the name of the ActionForm subclass that you are creating.<br />

4. Fill out the other fields as appropriate for the subclass you are creating, and<br />

click Next.<br />

5. On the Choose new fields for your ActionForm class page, click the check box<br />

beside the name of each node for which you want a get and a set method<br />

created. Check boxes exist for every node in the following hierarchy:<br />

– Project<br />

– Module<br />

– Folder<br />

– Web page<br />

– Form<br />

– Form field (leaf)<br />

If you click the check box beside the name of a form field, you will generate a<br />

corresponding field, get method, and set method in your form bean. If you<br />

click the check box beside the name of a parent, you will generate a<br />

corresponding field, get, and set for every leaf underneath that parent. Click<br />

Next.<br />

6. On the Create new fields for your ActionForm class page, click Add and type<br />

the field name and type for each field you want to create. If you want to create<br />

a form-bean mapping, click Next. Otherwise click Finish and skip the final<br />

step.<br />

7. On the Create a mapping for your ActionForm class page, make sure that the<br />

Add new mapping box is selected and that the correct configuration file<br />

name and mapping name are specified. Then click Finish.<br />

412 <strong>IBM</strong> <strong>WebSphere</strong> <strong>Application</strong> <strong>Server</strong> - Express V5.0.2 Developer Handbook

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!