-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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.
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.
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;
@Command
@NotifyChange("btn2")
public void getCount() {
btn2.setVisible(true);
}
am I missing something?
Asked: 2013-06-25 07:43:51 +0800
Seen: 17 times
Last updated: Jun 26 '13
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 )edityes, 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