Thanks for your answer. I've just a problem with your solution : ILink link = svc.getLink(false,params) doesn't work. This instruction stop the execution but don't get any error message... I've tested it with differents solutions : 1/ @InjectPage("NoviaMail_ReadMail") public abstract ReadMail getReadMail(); ILink link = svc.getLink(false, getReadMail());
2/ ILink link = svc.getLink(false, "NoviaMail_ReadMail); No one works... Have you got any idea ? Jessek wrote: > > I should clarify, this all works when using the normal core ajax > services provided in 4.1.1, not specifically in the XTile service. > > On 12/6/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote: >> FYI, this all "just works" as expected in t 4.1.1. (the solution is >> still a little questionable but it's the best default behavior I could >> think of so far) >> >> On 12/6/06, Robert Zeigler <[EMAIL PROTECTED]> wrote: >> > cycle.activate will make the "activated" page be the page that renders. >> > However... the xtile service doesn't result in a page render. It >> results >> > in an "ajax" response; hence, cycle.activate won't work. What you might >> > consider doing is putting the url of the page you want to activate into >> > the service parameters. Then you could just replace the document >> > location with the new url. Something along the lines of: >> > >> > else { >> > IEngineSerivce svc = >> cycle.getEngine().getService(Tapestry.PAGE_SERVICE); >> > Object[] params = new Object[] { "NoviaMail_ReadMail" }; >> > ILink link = svc.getLink(false,params); >> > cycle.setServiceParameters(new Object[] >> > {"redirect",link.getAbsoluteURL()}); >> > } >> > >> > and in javascript, something like: >> > >> > my_function(params) { >> > if (params[0] == "redirect") { >> > document.location.href=params[1]; >> > return; >> > } >> > ... >> > } >> > >> > Something along those lines. >> > >> > Robert >> > >> > MattHouston wrote: >> > > Hi ! >> > > >> > > I have a probleme using the XTile component and cycle.activate. >> > > I do sth in AJAX with XTile and in my Java function who handle >> requests, >> > > sometimes i only receive and send requests to the client, that works >> good. >> > > But i would like to sometimes not send a request but activate another >> page, >> > > I thought I can do that with cycle.activate, but it doesn't works... >> > > >> > > The code of my function : >> > > >> > > public void handleListOfMailsRequest(IRequestCycle cycle) { >> > > Object[] params = ((RequestCycle) >> cycle).getServiceParameters(); >> > > System.out.println("length parmas : "+params.length); >> > > if (params.length == 0) return; >> > > >> > > if (params[0].equals("isNews")) { // works good >> > > [...] >> > > >> > > String[] ret = {mm.getDate(), mm.getFrom(), >> mm.getSubject(), >> > > mm.getSize(), "false", mm.getId()}; >> > > ((RequestCycle) >> cycle).setServiceParameters(ret); >> > > } >> > > else { //dont work >> > > cycle.activate(NoviaMail_ReadMail); >> > > } >> > > } >> > > >> > > Any help will be apprecated. >> > > Thanks >> > > >> > > MattHouston >> > >> > >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > >> > >> >> >> -- >> Jesse Kuhnert >> Tapestry/Dojo team member/developer >> >> Open source based consulting work centered around >> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com >> > > > -- > Jesse Kuhnert > Tapestry/Dojo team member/developer > > Open source based consulting work centered around > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/XTile-and-cycle.activate-tf2769341.html#a7738544 Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]