On 2/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Thanks for reading my note. > > I have a Shale/MyFaces/ app which i have been using with Tiles. I have > pages home.jsp, search.jsp etc. And since the recommended method is to > have one backing bean per jsp, I have corresponding HomeBean, SearchBean, > etc. and everything works quite nicely.
I would clarify this "recommended method" to have one backing bean per *Tile* not just for the whole page. That sounds pretty much like what you did below. But now I have a new requirement: on the "menu" tile on the left nav bar I > have to place a very simple version of a "soft phone": a text field to > enter a phone number, button to click "dial", text field to enter another > number, button to click "Transfer", "Conference" etc. > > Now since this phone will essentially appear in every page of my > application, how would I code for the buttons in menu.jsp? I mean what > action should I point it to, since the "backing bean" will be different > depending on whether I am on say "home.faces or "search.faces" etc..? > > What I did initially was to make a new backing bean called PhoneBean > extending AbstractViewController) and simply coded the actions as pointing > to phone.dial, phone.transfer etc and much to my surprise it worked! But > here's the catch: now I need to add some code to the phone.prerender() > method and alas! this method is never being called - and I guess this must > be because the PhoneBean is not *really* the backing bean to home.faces, > search.faces, etc.. I can think of cludgy ways to get round this, but I am > hoping somebody will show me the error of my ways..? Perhaps there is a > way to include one jsf within another each with its own backing bean so > that both will get their prerender methods executed..? On the outer JSP page, did you include each Tile inside an <s:subview>? That is the place where you are supposed to get the view controller callbacks for the backing bean for each individual tile. If that doesn't work, please file a bug ... it is supposed to. Thanks again, > Geeta > Craig