struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig McClanahan <craig...@gmail.com>
Subject Re: [shale] Use cases confusion
Date Thu, 20 Jan 2005 00:57:03 GMT
On Tue, 18 Jan 2005 19:57:16 -0500, Sean Schofield
<sean.schofield@gmail.com> wrote:
> In BaseDialogController you have a protected method getFacesContext.
> Its a pretty simple method that doesn't really seem to be necessary
> (all it does is call FacesContext.getCurrentInstance).
> 
> In fact, the method is not being used by any of the other use case
> classes (just the getBean method of the same class).  Also, Dialog
> (which extends BaseDialogController) actually calls
> FacesContext.getCurrentInstance directly without using the superclass
> method.
> 
> No big deal but I'd suggest dropping the method in
> BaseDialogController to avoid confusion.
> 

Sometimes, ease of use considerations matter too.  In particular,
FacesContext.getCurrentInstance() is not something that is easily
visible to a newcomer to JSF, leaving them to wonder "how in the heck
do I get ahold of things about the current request".  Providing a
convenience method for the use of *applications* is one approach to
dealing with this confusion, even if it's not required by the
framework for its own purposes.

> Sorry for the suggestion "tidbits".  I will try to provide more
> substantive feedback once I understand the whole framework better.
> For now, I will just be pointing out the minor stuff (hopefully that
> helps.)

It definitely helps (even if I don't necessarily agree with all the
suggestions :-).

> 
> sean
> 

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message