how to invoke component after pressing submit button?

asked 2013-06-25 07:43:51 +0800

demizon gravatar image demizon
169 1 6

updated 2013-06-25 07:44:14 +0800

Hi guys,

i got following problem....I am working on form. In the first step I insert number into the textbox and press submit button. In the second step I would like to generate in the same screen combobox with comboitems: 1..inserted number. Can anyone tell me plz, how can i generate combobox after pressing submit button?

Thx for your answers.

delete flag offensive retag edit


There are plenty of way to do this Like You can put combobox into the Zul Page itself and change the visibility according to your requirmnets

sjoshi ( 2013-06-25 13:54:11 +0800 )edit

yes, that came into my mind, but i was not able to make it work, i already posted source files, could you plz tell me what i am doing wrong?

demizon ( 2013-06-26 06:05:55 +0800 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2013-06-26 06:55:01 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8

I have created a sample code for the above issue zk-show-another-button-on-click ,may be this will help you and you can get answer what you are doing wrong with your code.

link publish delete flag offensive edit


another great help from you, it works! thank you!

demizon ( 2013-06-26 07:10:30 +0800 )edit

answered 2013-06-26 06:03:27 +0800

demizon gravatar image demizon
169 1 6

i did a test... I have created 2 buttons (2nd one is invisible) and i want to show 2nd button after I click on 1st one.

part of my zul file:

<button mold="trendy" id="btn1" label="OK1" onClick="@command('getCount') btn2.setVisible(true)"  />
<button mold="trendy" id="btn2" label="OK2" visible="false" onClick="@command('generateUniqueJobOrder')"  />

in this case nothing happened after I clicked on button1, so I tried to do it via @notifychange in modelview, but now i am getting nullpointerexception after i click on 1st button.

part of modelview file:

private Button btn1;
private Button btn2;
    public void getCount() {            

am I missing something?

link publish delete flag offensive edit
Your answer
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




Asked: 2013-06-25 07:43:51 +0800

Seen: 17 times

Last updated: Jun 26 '13

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