0

Need help

asked 2006-09-18 21:35:42 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

By: nobody

I'm quite new to all this ZK Javax stuff and also not very experienced with Java Classes, now, I have to build a screen where the user press the name of a table that comes from the DB and the table structure is "drawn" on the screen, I don't know the column names in advance, nor the size of the table. I can get in Java the column amount and the row count, but What is the best way to build something like that? I don't have a structure and in the EL you can call functions so I can't get rows dynamically right?


delete flag offensive retag edit

5 Replies

Sort by ยป oldest newest

answered 2006-09-19 10:30:51 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

By: vman974

According to me you should create your table from java and not Zscript.

For exemple: you make a function who takes as parameter the number of column and row and then you create your component dynamicly.

In your Zul page you define a window using your java classes
ex: <window title="table" id="tableDlg" use="com.MyComposantZK.TableDB"> </window>


and in your java classes you define you component

ex:
public class TableDB extends Window
{
//this function will be call at the rendering of the zul page
public void onCreate()
{
// we get the component who will have your table (you will use it to setParent
of your component
Window myWin=(Window) getFellow("tableDlg");

// call of function to know how much row or column you have and create your
component table.
...
myComponent.setParent(myWin);
}
}


I Hope it will help you.



link publish delete flag offensive edit

answered 2006-09-19 14:39:27 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

By: nobody

call Executions.getCurrent().forwar(forwardPath) then happened execption as
follows:
java.lang.IllegalStateException: Use sendRedirect instead when processing user's request

link publish delete flag offensive edit

answered 2006-09-20 11:18:02 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

By: tomyeh

forward must be called at the very beginning and not in an event listener. If still in doubt, post more complete codes so we can really help.

link publish delete flag offensive edit

answered 2011-05-28 05:48:55 +0800

samit1010 gravatar image samit1010
15

Give solution How to get column dynamically from database with example

From Sam

link publish delete flag offensive edit

answered 2011-06-11 11:50:46 +0800

RyanWu gravatar image RyanWu
533 2
about.me/flyworld

@sam
please open another thread to ask question :)

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-09-18 21:35:42 +0800

Seen: 240 times

Last updated: Jun 11 '11

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