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
Articles_cn
Articles_de
Articles_pt
Articles_zh
JSFBeans




JSPWiki v2.2.33

[RSS]


Hide Menu

ValidationAndListJSF


Difference between version 10 and version 9:

At line 11 changed 1 line.
* [1] View validation settings in personForm.jsp
* [1] View validation settings in personForm.xhtml
At line 17 changed 1 line.
* [7] Create people.jsp and Canoo test
* [7] Create people.xhtml and Canoo test
At line 23 changed 1 line.
The validation integration for the personForm.html page is already done by AppGen in the personForm.page. If you open web/personForm.jsp, you should see the following JSP Tags. I've highlighted the portions that are relevant to validation.
The validation integration for the form page is already done by AppGen in the personForm.xhtml. If you open web/personForm.xhtml, you should see the following JSP Tags. I've highlighted the portions that are relevant to validation.
At line 33 changed 1 line.
There are a [number of different validators|http://www.marinschek.com/myfaces/tiki/tiki-index.php?page=Features] you can use, this example just shows a way to validate Strings are entered. The userForm.jsp contains examples of validation e-mail and validating with regular expressions. All input fields generated by AppGen are required by default. You can change this by modifying the extras/appgen/src/**/Form_jsp.xdt file.
There are a [number of different validators|http://www.marinschek.com/myfaces/tiki/tiki-index.php?page=Features] you can use, this example just shows a way to validate Strings are entered. The userForm.xhtml contains examples of validation e-mail and validating with regular expressions. All input fields generated by AppGen are required by default. You can change this by modifying the extras/appgen/src/**/Form_xhtml.xdt file.
At line 147 changed 1 line.
In the last couple of tutorials, you've been working with the PersonForm to interact with your form JSP. Now you need to create a new Managed Bean that'll simply handle getting and displaying a list of people in the database.
In the last couple of tutorials, you've been working with the PersonForm to interact with your form view page. Now you need to create a new Managed Bean that'll simply handle getting and displaying a list of people in the database.
At line 224 changed 1 line.
There should already be a persons.jsp file in your ''web'' directory. If not, you can create it using AppGen. From the command-line, navigate to extras/appgen and run __ant -Dobject.name=Person -Dappgen.type=pojo__. This will generate a Persons.jsp file in __extras/appgen/build/gen/web__.
There should already be a persons.xhtml file in your ''web'' directory. If not, you can create it using AppGen. From the command-line, navigate to extras/appgen and run __ant -Dobject.name=Person -Dappgen.type=pojo__. This will generate a personList.xhtml file in __extras/appgen/build/gen/web__.
At line 226 changed 1 line.
Copy PersonList.jsp to ''web'' and rename it to __people.jsp__. Open it for for editing. There are two references to "personList.persons". Change those to be "personList.people".
Copy personList.xhtml to ''web'' and rename it to __people.xhtml__. Open it for for editing. There are two references to "personList.persons". Change those to be "personList.people".
At line 245 changed 1 line.
<from-view-id>/people.jsp</from-view-id>
<from-view-id>/people.xhtml</from-view-id>
At line 248 changed 1 line.
<to-view-id>/personForm.jsp</to-view-id>
<to-view-id>/personForm.xhtml</to-view-id>
At line 252 changed 1 line.
<to-view-id>/personForm.jsp</to-view-id>
<to-view-id>/personForm.xhtml</to-view-id>
At line 259 changed 1 line.
Now that you have a List Screen, let's change the pages that are displayed after adding and deleting a new Person. In the faces-config.xml file, change the references for the personForm.jsp from "mainMenu" to "people".
Now that you have a List Screen, let's change the pages that are displayed after adding and deleting a new Person. In the faces-config.xml file, change the references for the personForm.xhtml from "mainMenu" to "people".
At line 264 changed 1 line.
<from-view-id>/personForm.jsp</from-view-id>
<from-view-id>/personForm.xhtml</from-view-id>
At line 267 changed 1 line.
<to-view-id>/people.jsp</to-view-id>
<to-view-id>/people.xhtml</to-view-id>
At line 272 changed 1 line.
<to-view-id>/people.jsp</to-view-id>
<to-view-id>/people.xhtml</to-view-id>

Back to ValidationAndListJSF, or to the Page History.