-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I am very new to ZK framework and trying to customize few things and have struck at one point which I am not sure how to achieve that.
I have a predefined section where I need to show 2 drop down and a button and need to persist those drop down values on button click event. This is how It has been define in Spring file
<bean id="mybean" parent="parentBean" class="WidgetRenderer">
<property name="detailRenderer">
<bean class="DetailsListRenderer" parent="abstractWidgetDetailRenderer"/>
</property>
</bean>
Here mybean
is being used to show main section and I am adding my drop down using this bean while button are being added to detailRenderer
.
Save button is bind to onClick
event, but I am not sure how I can fetch values from my custom drop down?
I am aware about binding those Dropdown
with onClick
event but they have to be in same class.
Can any one suggest me how I can fetch values of those drop down.I am creating down down with following code
Listbox listbox = new Listbox();
listbox.appendItem("item1", "item1");
listbox.appendItem("item2", "item2");
This is my button code in another class
protected void createUpdateStatusButton(Widget widget,Div container)
{
Button button = new Button(LabelUtils.getLabel(widget, buttonLabelName, new Object[0]));
button.setParent(container);
button.addEventListener("onClick", new EventListener()
{
public void onEvent(Event event)throws Exception
{
MyClass.this.handleSaveStatusEvent(widget, event);
}
});
}
Asked: 2014-01-09 13:07:46 +0800
Seen: 23 times
Last updated: Jan 09 '14
ZK drang and drop and databinding [closed]
Create a Zk session variable with a menu
How to handle big (large) file upload?
How to get the absolute path of attached file
Id attribute set in zul code doesn't reflect in html code? [closed]
passing present viewmodel to included page. [closed]
Create Crud of a User that has a collection of books
Is there any chance you can modify things so that you use a ModelView architecture? If so I can try and help. Looks like you're creating all your components manually. Are you in a legacy code base?
rickcr ( 2014-01-09 19:43:16 +0800 )edit@rickcr: I can modify few things in it..I am using an underlying framework so can not change many changes....You can suggest changes and I can try to include them.
umeshawasthi ( 2014-01-10 04:10:04 +0800 )editIt will greate if u can use MVVM framework of ZK
sjoshi ( 2014-01-13 06:45:43 +0800 )edit@sjoshi: can you point me to that?
umeshawasthi ( 2014-01-13 07:44:34 +0800 )edit