0

databinding is not working if i use 2models in same page

asked 2015-06-14 17:52:58 +0800

WelcomeDivya gravatar image WelcomeDivya
1

updated 2015-06-15 06:57:03 +0800

I have created a zul page with 2 components combo box and list box

<vbox>
<combobox model="@{fields}">
<comboitem self="@{each=fieldList}" value="@{fieldList}" label="@{fieldList.displayName} />
</combobox>

<listbox model="@{field.updateFellows}">
<listitem _var="@{fellowlist}" value="@{fellowlist}">
<listcell label="@{fellowlist.whenValue}"/>
<listcell label="@{fellowlist.fieldName}"/>
<listcell label="@{fellowlist.fieldValue}"/>
 </listitem></listbox></vbox>

Here field is an object, updateFellows is collection(Set) of updateFellow objects, fields is a collection of field object.

In my controller class i set the bean as

binder.bean("field",field);
binder.bean("fields",fieldobj);
binder.loadAll();

Without below line

<comboitem self="@{each=fieldList}" value="@{fieldList}" label="@{fieldList.displayName} />

combo box will show only list of field objects. In order to show only displayName from field object i have used this line.

Without the above line, listbox values rendered properly. But when I add comboitem line, I'm getting error as "cannot find the specified bean for the expression

:@{field.updateFellows} "

Please any one help me to solve this issue.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-06-29 09:25:41 +0800

Darksu gravatar image Darksu
1991 1 4

Hello WelcomeDivya,

Could you please re-check your domain models in order to see if you have created the Get/Set methods?

Best Regards,

Darksu

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

Follow
1 follower

RSS

Stats

Asked: 2015-06-14 17:52:58 +0800

Seen: 22 times

Last updated: Jun 29 '15

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