-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I am trying to transfer to another screen from my composer page, after the user clicks the "edit" button.
I want to make the transfer in this program, not in the xml part.
I have displayed a list of items and an edit button next to each. When the user clicks the "edit" button, I want to transfer to another zul page and composer for a detail screen. I have tried the "events." command, but no luck yet. I am a newbie Grails/Groovy/ZK developer.
Any help you can give would be appreciated. If this is not posted in the correct place, please let me know.
Thanks in advance for your help!
Doug Bell
Justin and Senthilchettyin,
Thanks a bunch. I was able to make my code work correctly using the "Executions.sendRedirect" command.
I appreciate all your help and I'll be looking through your blog, Senthilchettyin!
Doug
For new newbie, you can also refer my blog http://emrpms.blogspot.in/
Hi Doug,
I am also a newbie. But I have discovered a couple of methods to do this in the java code:
1. Change the include src
if you .zul file is included as such
<window id="contentWindow" border="none" width="100%" apply="controller.contentWindowController"> <vlayout spacing="5px"> <include id="content" src="/content/details.zul" /> <button id="editButton" label="edit" /> </vlayout> </window>
then you can simply change the src of the include on the click of the button in your controller class:
@Listen("onClick = #editButton") public void redirectPage(){ try{ content.setSrc("/content/generic/message.zul"); } catch (Exception e){ } }
2. Redirect your browser on the click of the button in your controller class
@Listen("onClick = #editButton") public void redirectHome(){ Executions.sendRedirect("/edit.zul"); }
In both instances you can pass parameters to the url, for example edit.zul?parm1=p2&parm2=p2
Asked: 2012-10-16 18:29:11 +0800
Seen: 83 times
Last updated: Oct 17 '12