aspose file tools
The moose likes JSF and the fly likes consistency in jsf pages Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "consistency in jsf pages" Watch "consistency in jsf pages" New topic
Author

consistency in jsf pages

Jan de Ruiter
Greenhorn

Joined: Jan 12, 2008
Posts: 12
My questions concern consistency of the JSF application
and how to manage it.
Many references in JSF are only made using strings.

Most (if not all) of these strings are evaluated during
runtime, and can cause problems there.
Of course extensive testing can detect some of these problems,
but it occurs to me that many of these references can be
checked even before the first testing starts.
Indeed i already wrote some scripts implementing such
checks.
But i get the feeling that the problems i see must have
been seen by many programmers before me, and by writing
these scripts i am just re-inventing the wheel.

The checks i am referring to are:

1. html files can contain entries like
<h:comandButton action="result" ... >
such an action must exist as a <from-outcome> in
a <navigation-case>

2. html files can contain entries like
<h:comandButton action="#{Bean.method}" ... >
This Bean and its method must exist, and the value it
returns must exist as a <from-outcome> in a
<navigation-case>

3. the <to-view-id> in a <navigation-case> refers to
a page to which the user will be navigated. This page
must exist in the application

4. <from-outcome> values in a <navigation-case>
that never occur as either an action value or as
a return value from a bean indicate a 'loose end'.
This can never cause a runtime error, but indicates
sloppiness on the part of the programmer: either it
is part of an execution path he intended to build, and
never finished, or it is part of a deprecated excution path
which should be removed as undesirable.

5. pages in the application that never occur as a
<to-view-id> in a <navigation-case> also indicate a loose end,
see the reasoning on 4.

Doubtless there are many more of these checks that could
be done, and i would expect that there are already several
tools on the market that cover them.
Only i have been unable to find them. If you know of any you can
recommend i would love to hear about them.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17224
    
    1

Well, I would think they would be plugins for the major IDES like Eclipse and IntelliJ. I know in IntelliJ I have struts and tiles interactivity, where it checks, and I can Hit the CTRL button and click on a tile insert in a jsp page and it take me to the tile definition for it, and from a tile definition that points to a jsp page, I can hit the CTRL button and click on it to get to the jsp page.

For JSF, I think Netbeans, Excadel (Eclipse), and IntelliJ also have built in support for JSF.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Jan de Ruiter
Greenhorn

Joined: Jan 12, 2008
Posts: 12
I am using a plugin for eclipse, but that only offers runtime support.
There are no checking functions that I am aware of.
Can anybody advise a plugin that does offer the kind of checking that I am looking for?
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: consistency in jsf pages
 
Similar Threads
Using redirect from backing bean and getting IllegalStateException error
(servlet) downloading a dynamically generated file
Clemen
Redirecting to another page in Bean
Jsf + tiles + trinidad (Is it posible to get this work?)