-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Can any one let me know how to get the values of input fields from included zul files in controller
Below is the pseudo code that I am using
main zul which includes another zul file
<hbox height="100%">
<include id="sidebar" width="190px" src="WEBINF/zul/app/recons/mmfobo/mmfobo-leftmenu.zul"/>
The included zul file
<?xml version="1.0" encoding="UTF-8"?>
<?taglib uri="" prefix="c"?>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<?page id="menu"?>
<window id="mmfobowindow" width="100%">
Input fields like,ZKtextbox,listbox,radio,datebox etc
</window>
In controller I want fetch the values of the input fields based on their id and I am using the below code for that
Page p=getPage("menu");
Zkwindow sessioninfo=(Zkwindow)p;
dailyRadioId=(Radio)sessioninfo.getfellow("id of radio");
get Page method used
public static Page getPage(String id){
Execution e=Executions.getCurrent();
Desktopd=e.getDesktop();
Page p=d.getPage(id);
Return p;
}
After doing all this I am getting componentnotfoundexception saying menu page not found.. I kindly request you to help me with this problem
Thanks in advance
To be honest I never needed to give a page an explicit ID and I think you rarely have to.
Here an example showing 3 ways to access your components in nested ID-Spaces.
And here the documentation on ID-Spaces in ZK.
(Window and Include implement the IdSpace interface)
Robert
Asked: 2017-03-21 12:01:04 +0800
Seen: 27 times
Last updated: Mar 22 '17