-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi, I'm nwb in ZK framework ... I installed ZK Studio 0.8.2 on Eclipse 3.4 Ganymede, i create my first file .zul with ZUL Editor and copy and paste the simple example in Dev Guide >> Interactivity:
<?page id="testZul" title=" New ZUL Title" cacheable="false" language="xul/html" zscriptLanguage="Java" contentType="text/html;charset=UTF-8"?> <?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit"?> <zk xmlns="http://www.zkoss.org/2005/zul" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd"> <window title="My First Window" border="normal" width="200px"> Hello, World! <button label="Say Hello" onClick="alert("Hello World!")"/> </window> </zk>
but Editor give me Syntax Error mark:
Multiple annotations found at this line: - Syntax error on tokens, delete these tokens - Hello cannot be resolved to a type - alert cannot be resolved to a type
on
onClick="alert("Hello World!")"
Thanks ZK Team and ZK Community and sorry for my bad enaglish!!!
ORAZIO
Hi, We are trying to let studio works both on 3.3 and 3.4.
There is some implementation issue in Studio.
In onXXX and zscript, we only supports Java Language, all text in this part will transfer to Java Code.
Which means any XML escape character the code segment cause Java Error , just like you type such code(text) in a Java class.
there are two way to work around this,
1.
<button label="Say Hello" onClick='alert("Hello World!")'/>
<button label="Say Hello"> <attribute name="onClick"> alert("Hello World!"); </attribute> </button>
Hello all,
I have this same problem...
And I solved with the workaround, thanks ;)
Just one question... if I develop my application using the work around #1 i will not have any problems in the future??? or when this issue is resolved for Eclipse 3.4. I need to rewrite all my .zul pages? or is better use the work around #2? or is better download Eclipse 3.3?
Thanks in advance :)
Yes, it will be no issue, I think case one is also the XML spec, and should works in both eclipse 3.3 and 3.4.
use case 1,2 to write some a simple demo code or prototyping are both good chooses,
Wow thanks for quick response Dennis...
I downloaded 3.3.2 eclipse-jee-europa-winter-win32 and install in another PC, the Eclipse IDE, ZK Studio, Apache tomcat... and everything works fine....
Only when I try this simple example:
<button label="Say Hello" onClick="alert("Hello World!")"/>
Eclipse marks an error in: alert(&
and said:
Error: alert cannot be resolved to a type Error: Syntax error on tokens, delete these tokens
and in Hello text:
and said:
Error: Hello cannot be resolved to a type
The ZUL Visual editor works very nice, and the page is rendered perfectly in Web Browser...
If I use the work arounds both of them work perfectly again.... :)
Then I still used the work arounds??? even in Eclipse 3.3?
I had hoped that with the 3.3.2 version the issue will be resolved.
Did you know wich combination Eclipse/ZK Studio the issue disappears?
Thanks :)
Hi, neomartigan,
this is XML Character escaping issue, you cannot use " in "",
try this,
<button label="Say Hello" onClick='alert("Hello World!")'/>
Asked: 2008-09-19 14:04:54 +0800
Seen: 1,355 times
Last updated: Mar 10 '09