0

How to make the "button self="@{action}" and "buttton forward" both work?

asked 2009-01-19 15:17:50 +0800

lemondlut gravatar image lemondlut
9

Hi,
I have make a spring web flow and want to make page transiting when click the button in revise.zul. however, I want the forward="undate()" to work first, then self="@{action}" work to transit.In fact, the self works well, but the forword does not work.
the some codes attached follows,
KMMain.xml
... ...
<view-state id="reviseKM">
<transition on="confirmKM" to="KMMain" >
</transition>
<transition on="cancel" to="KMMain" />
</view-state>
... ...

Revise.zul
... ...
<div class="buttonGroup">
<zul:button id="confirm" label="确认修改" self="@{action(confirmKM)}" forward="onUpdate"/>
<zul:button id="cancel" self="@{action(cancel)}" label="返回"/>
</div>
... ...

Thank you very much!!!

delete flag offensive retag edit

4 Replies

Sort by » oldest newest

answered 2009-01-20 02:55:47 +0800

evpole gravatar image evpole
481 2

updated 2009-01-20 02:56:10 +0800

i'm fresher,
i think the problem is that the action works on client.the event was deel onlicent.so the server can't receive forward event.
not sure but maybe you could try echoEvent in your transition.

祝好运!

link publish delete flag offensive edit

answered 2009-01-20 09:11:16 +0800

henrichen gravatar image henrichen
3869 2
ZK Team

It is about timing. forward is done after the onClick event is handled.
However, the confirmKM action is process in onClick so it transit the page.
The forward is not possible to continue and stopped.

link publish delete flag offensive edit

answered 2009-01-25 09:38:32 +0800

lemondlut gravatar image lemondlut
9

Thank you very much,evpole and henrichen, now i understand the reason. Maybe, I can use onclick to use the "onUpdate()" method. I will try.

link publish delete flag offensive edit

answered 2009-01-29 16:09:53 +0800

henrichen gravatar image henrichen
3869 2
ZK Team

Try use Events.sendEvent("onUpdate()", confirm.getSpaceOwner()) to change the process sequence.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-01-19 15:17:50 +0800

Seen: 286 times

Last updated: Jan 29 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More