0

how to link to different page in zscript

asked 2006-04-13 15:49:34 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3685069

By: nobody

how to add a link in zscript ? anyone can help?

i am tring to link to two different page through a if condition.



delete flag offensive retag edit

5 Replies

Sort by ยป oldest newest

answered 2006-04-13 16:14:05 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3685118

By: tomyeh

Alternative 1:
<toolbarbutton href="/a.zul" if="${cond}"/> <toolbarbutton href="/b.zul" unless="${cond}"/>

Alternative 2:
<button>
<attribute name="onClick">
Executions.sendRedirect(cond ? "/a.zul": "/b.zul");
</attribute>
</button>

link publish delete flag offensive edit

answered 2006-04-14 00:03:36 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3685715

By: gladiator

I have some valid java code imbeded in zscript as follows:
<zscript>
<![CDATA[
String[]mainParams={null,null,null,null};
String[][]subParams={null,{null,null,null},{null,null,null},null,null};

]]>
</zscript>

it's giving me the following error:
com.potix.zk.ui.UiException: Sourced file: inline evaluation
of: ``String[]mainParams={null,null,null,null};
String[][]subParams={null,{null,null,n . . . '' unknown error: null : at Line:
2 : in file: inline evaluation of: ``String[]mainParams={null,null,null,null};
String[][]subParams={null,{null,null,n . . . '' : String [ ] [ ] subParams = {

sun.reflect.GeneratedConstructorAccessor86.newInstance(Unknown Source)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
java.lang.reflect.Constructor.newInstance(Unknown Source)
com.potix.lang.Classes.newInstance(Classes.java:81)
com.potix.lang.Exceptions.wrap(Exceptions.java:164)
com.potix.zk.ui.UiException$Aide.wrap(UiException.java:48)
com.potix.zk.ui.sys.PageImpl.interpret(PageImpl.java:418)
com.potix.zk.ui.sys.UiEngineImpl.execCreate(UiEngineImpl.java:288)
com.potix.zk.ui.sys.UiEngineImpl.execNewPage(UiEngineImpl.java:209)
com.potix.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:296)
com.potix.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:258)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

any idea?
thanks

link publish delete flag offensive edit

answered 2006-04-14 02:19:46 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3685816

By: henrichen

Please post it to Bug for tracking.

/henri

link publish delete flag offensive edit

answered 2006-04-14 18:28:08 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3686998

By: gladiator

ok I submitted the bug report. are there other ways to imbed java code? I found 2 ways:
1. <zscript> java code</script> in this case it seems zk evaluates what's inside as xml, so it gives lots of compilation errors.
2. the one mentioned in the earlier post.
3. any others?

link publish delete flag offensive edit

answered 2006-04-15 02:29:52 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3687831

By: henrichen

The ZUML page is a XML page that some "rules" regarding XML has to be followed.
The way to work around is to embrace your zscript with <![CDATA[ ... ]]> so the XML parser would not interpret it and pass that as a String to ZK.

We have managed to include some simple explaination regarding XML in our Developer's Guide.

/henri

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: 2006-04-13 15:49:34 +0800

Seen: 467 times

Last updated: Apr 15 '06

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