You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Sean Schofield <se...@gmail.com> on 2005/01/19 01:57:16 UTC

[shale] Use cases confusion

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.

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.)

sean

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


Re: [shale] Use cases confusion

Posted by Craig McClanahan <cr...@gmail.com>.
On Tue, 18 Jan 2005 19:57:16 -0500, Sean Schofield
<se...@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