Any change of: Executions.createComponents("person/edit.gsp") ?

184 views
Skip to first unread message

Madruga

unread,
May 31, 2012, 9:01:27 AM5/31/12
to zk-ui...@googlegroups.com
Hi *, 

I think that this is not possible, but it might be my vision that's a bit blurred.

I'm working on a plain grails app, adding a bit of ZK flavor on top of it.

I have the person/list.gsp (now with zkui tags) and shows the person list.
The client wants that the create and edit operations, to be handled on the same URL with ajax (meaning that an onClick event will open the create/edit.gsp inside a modal window)

Could this be done somehow?

Or my only solution for this is replacing create.gsp and list.gsp to plain zul files?

Thanks and regards,
Madruga

groovyquan

unread,
Jun 3, 2012, 7:45:26 AM6/3/12
to zk-ui...@googlegroups.com
It not recommend use Executions.createComponents for gsp page.

But if you trying create a modal window with gsp you can write your code in Composer:

void onClick_createButton(org.zkoss.zk.ui.event.Event e) {
        def window = new Window(title: "Create  Person", border: "normal", 
                width: "460px", closable: true, droppable: true)
        window.setPage(e.getPage())
        window.mode = 'modal'
        window << {
            include(src: "/person/create.gsp")
        }
    }



Access the parent window by page tag:

comp.getDesktop().getPageIfAny('page_id')





在 2012年5月31日星期四UTC+8下午9时01分27秒,Madruga写道:

zhuxi...@gmail.com

unread,
Feb 7, 2013, 7:46:36 AM2/7/13
to zk-ui...@googlegroups.com
BTW, how to pass params to the modal-windows created using 'include'?


在 2012年5月31日星期四UTC+8下午9时01分27秒,Madruga写道:

Madruga

unread,
Apr 28, 2013, 9:29:38 PM4/28/13
to zk-ui...@googlegroups.com, zhuxi...@gmail.com
Hi, 

Sorry to revive this old thread, but Im updating that old app, and hit the same question from zhuxi.

Its possible to pass parameter direct to the gsp being included?

Thanks

Andre Filipe Aloise

unread,
Apr 28, 2013, 10:02:15 PM4/28/13
to zk-ui...@googlegroups.com


2013/4/28 Madruga <omad...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Grails ZK UI Plugin User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zk-ui-user+...@googlegroups.com.
To post to this group, send email to zk-ui...@googlegroups.com.
Visit this group at http://groups.google.com/group/zk-ui-user?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Gustavo Madruga

unread,
Apr 28, 2013, 10:11:45 PM4/28/13
to zk-ui...@googlegroups.com
Hi Andre, 

Thanks for the tip, but unfortunately this app is still on MVC paradigm. And updating all the app to MVVM is not a viable option right now.

Gustavo Madruga
Diretor de Tecnologia
Produzza - www.produzza.com - Aumentamos o desempenho da sua empresa através de software + consultoria + metodologia
Rua Petit Carneiro, 768, Água Verde

Gustavo Madruga

unread,
Apr 29, 2013, 10:48:43 AM4/29/13
to zk-ui-user
Got it.

        def window = new Window(title: "Alterar Ponto", border: "normal", width: "500px", closable: true)
        window.setPage(event.page)
        window.setMode("modal")

        def include = new Include("/employeeCheckin/edit.gsp")
        include.setDynamicProperty("id", id)
        include.setDynamicProperty("version", version)

and then on the gsp you can access the values direct with ${id} and ${version}

Gustavo Madruga
Diretor de Tecnologia
Produzza - www.produzza.com - Aumentamos o desempenho da sua empresa através de software + consultoria + metodologia
Rua Petit Carneiro, 768, Água Verde


Reply all
Reply to author
Forward
0 new messages