struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig McClanahan <craig...@gmail.com>
Subject Re: [SHALE] prerender() never called..?
Date Sun, 28 Aug 2005 22:52:33 GMT
On 8/28/05, Bjørn T Johansen <btj@havleik.no> wrote:
> Ok, that I did not know...

Tonight's nightly build will include Javadocs for ViewController that
make this requirement much more explicit -- you're not the first
person to run into it.

> But now I have changed the name of my managed bean to
> correspond to this naming scheme, but still no methods is called...?
> Am I missing more...?

Without more details about what you're doing, it's impossible to tell
what is going wrong -- but one thing you should *not* be worrying
about is explicitly declaring the Shale ViewController.  That happens
automatically when shale-core.jar is included in your webapp.

Does the "use cases" example app work for you?

> 
> 
> BTJ

Craig


> 
> Craig McClanahan wrote:
> > On 8/28/05, Bjørn T Johansen <btj@havleik.no> wrote:
> >
> >>I have a managed bean that implements ViewController and I also have changed
the
> >>view-handler to ShaleViewHandler, but none of the methods in the ViewController
is called...
> >>What am I missing?
> >>
> >
> >
> > The most common cause for this is having a managed bean name (for your
> > ViewController) that does not match the name mapping rules that Shale
> > requires.  There is a pluggable interface for this, but the default
> > rules take a context relative view id, and convert it to a
> > corresponding managed bean name like this:
> > * Strip the leading "/" character
> > * Strip the trailing ".jsp" (or whatever) extension
> > * Convert any remaining "/" characters to "$" characters.
> >
> > Thus, if you have a view named "/mainmenu.jsp", the corresponding view
> > controller managed bean *must* be named "mainmenu".  Likewise, a vew
> > named "/customer/details.jsp" would be mapped to managed bean name
> > "customer$details".
> >
> > Craig
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

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


Mime
View raw message