.
- snooperman
- Posts: 155
- Joined: 06 Nov 2012, 18:43
I found this email in my inbox, I can't find the original article, but I think it's relevant
JSF Coding rules
Here are the rules to follow when developing JSF pages:
1. One view = one xhtml page.
2. One modalPanel = one xhtml page.
3. One page xhtml = one corresponding backing bean
4. Edit form = Add form
5. Backing bean name xxx = xxxBean.
6. Do not use session scope.
7. No text should be hardcoded in the page -> Everything should be in a utf-8 properties file.
8. Avoid at maximum the components binding
9. A bean should have the same name as the page viewBuyers.xhtml --> viewBuyersBean
10. Utilize 'empty' and 'not empty' instead of '!=null'
11. Add always the id attribute on the JSF components. The prefixes are:12.Prefix the page name based on the actions :
- Input text : txt
Label : lbl
Div : div
Combobox : sel
Column : col
Datatable : dtb
Checkbox : chk
Form : frm
Button : btn
Link : lnk
DataScroller : dts
Image : img
Panel : pnl
ModalPanel : mdl13.Postfix the page by Modal if it the page contains a modal panel(ex : editBuyerModal).
- viewMyPage : if the page displays the details of an entity(ex : viewBuyer)
listMyPage : if the page displays a list of entities (ex : listBuyer)
editMyPage : if the page add/modify an entity (ex : editBuyer)
var details = {
. . PF.version: "5.0.x",
. . JSF.version: "2.x",
. . Tomcat.version: "8.x"
}
. . PF.version: "5.0.x",
. . JSF.version: "2.x",
. . Tomcat.version: "8.x"
}
-
- Information
-
Who is online
Users browsing this forum: Google [Bot] and 40 guests