-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I'm new to ZK.
Can one write the GUI bits in zul and then write all the event handler/business logic code in java which is compiled (not zscript)?
If yes, can you please give me an example?
Tks.
@americiea
welcome to ZKoss forum.
have a look at this thread and study the code.
this
What you can see is:
-------------------------------
1. Listbox with Itemrenderer and sorting columns(comparator)
2. Event Handling in java code.
2.1 doubleClick on row opens a dialogWindow (remarked SingleRowClick or IconClick opens Dialog)
3. overhanded parameters from ListPage to DialogPage.
4. CRUD operations in the dialogWindow with readonly/edit modus.
The data comes from a table by a ServiceDAO. You must fill it by your own.
I have updated the sources (zk 3.5.2).
whishes Stephan
PS: Help to prevent the global warming by writing cool software.
Yes you can.By using the use attribute of window tab as follows
<window id="win" title="ZK WINDOW" height="520px" width="765px" border="normal" closable="true" use="mypack.MyClass">
You just override the function for Window onCreate()
e.g.
import org.zkoss.zul.*;
public class MyClass extends Window
{
public void onCreate()
{
this.appendChild(new Textbox()); // to add new textbox in your window
// Write your code here to add more components
}
}
// -- Cheers
ok - that's very good.
Had at the code and I get the idea.
Can you do things the other way round?
Can you create a richlet and then in the richlet load the zul file and call some method which parses the zul file, creates the components etc?
Tks.
Asked: 2009-02-21 10:58:24 +0800
Seen: 291 times
Last updated: Feb 21 '09