0

Warnings in Eclipse 3.5.2

asked 2010-04-12 07:07:28 +0800

nanchu gravatar image nanchu
24

Hello! I have installed for my first time zk in eclipse 3.5.2. I installed the zkStudio plug in for ecplipse. The "hello word" example works great. However when i add the code from the BandBoxes example i get annoying warnings in the zul file. The program is deployed all rigth but it i would like to know if i might have something configured wrong.

I created a zkProject with:
zk-bin-3.6.3
Apache Tomcat 6.0.26
Dynamic web boudle 2.5

I added the file example.zul with the following code:

<?page title="new page title" contentType="text/html;charset=UTF-8"?>
<zk>
<vbox>
<bandbox id="bd" >
<bandpopup>
<vbox>
<hbox>
Search
<textbox />
</hbox>
<listbox width="200px"
onSelect="bd.value=self.selectedItem.label; bd.close();">
<listhead>
<listheader label="Name" />
<listheader label="Description" />
</listhead>
<listitem>
<listcell label="John" />
<listcell label="CEO" />
</listitem>
<listitem>
<listcell label="Joe" />
<listcell label="Engineer" />
</listitem>
<listitem>
<listcell label="Mary" />
<listcell label="Supervisor" />
</listitem>
</listbox>
</vbox>
</bandpopup>
</bandbox>
<hbox>
<checkbox checked="false" onCheck="bd.autodrop = self.checked"
label="auto drop popup when typing" />
<checkbox checked="true"
onCheck="bd.buttonVisible = self.checked" label="button visible" />
<checkbox label="Use rounded bandbox" checked="true"
onCheck='bd.mold=self.checked? "rounded": "default"'/>
</hbox>
</vbox>
</zk>


The warings are all the same:
Multiple annotatinos found at this line:
-BD.XXXXXX cannot be resolved or it is not a field
-self.XXX cannot be resolved or it is not a filed


Any ideas?? I believe that i must have somtehing missing in the compiler options. I read several guides from the site but i was unsuccessful to make work.

Thanks in advance,
Hernan

delete flag offensive retag edit

5 Replies

Sort by ยป oldest newest

answered 2010-04-12 20:51:51 +0800

iantsai gravatar image iantsai
2755 1

You didn't get anything wrong, this is a part that ZK Studio's Zul Editor hard to implement.

ZK's current Zscript Java interpreter's implementation is based on BeanShell, and in BeanShell, instead of calling bean.setXXX(v);, you can declare bean.xxx = v;. Unfortunately Zul Editor can only read strict Java, so you got this "error" message.

To eliminate them you can rewrite those part back to standard Java form.

link publish delete flag offensive edit

answered 2010-04-12 21:08:56 +0800

nanchu gravatar image nanchu
24

Hi iantsai, thanks for your help. I have written a few pages(10 ten) with jsf and i do not have everything very clear. In this example i haven't created any bean. I assume that bd is a bean created automatically by ZK. If it isn't too many trouble for you. Could you please rewrite a few parts of the code so that i would understated perfectly.

One last question, when i get all these warnings i lost the ide assistance for auto-complete on these elements. How do you usually make to have those features working?

Thank in advance for your help,
Hernan.

link publish delete flag offensive edit

answered 2010-04-12 21:59:55 +0800

SimonPai gravatar image SimonPai
1696 1

Hi nanchu,

For example, change your script from

<listbox width="200px" onSelect="bd.value=self.selectedItem.label; bd.close();">

to

<listbox width="200px" onSelect="bd.setValue(self.getSelectedItem().getLabel()); bd.close();">

Just substitute

xxx.yyy = ... ; 

by

xxx.setYyy(...); 

And on the variable reading side substitute

zzz.www

by

zzz.getWww()

Regards,
Simon

link publish delete flag offensive edit

answered 2010-04-12 22:56:59 +0800

nanchu gravatar image nanchu
24

Simon Pai you really really saved me. I really appreciate your help. Thank you very much Iantsai and Simon Pai.

I think that this help must be added in a special section in the installation face. Yesterday i was really confused and i thought that i was doing something wrong.

Thank you very much!

link publish delete flag offensive edit

answered 2010-04-12 23:44:02 +0800

iantsai gravatar image iantsai
2755 1

I've made these information in warning level, but seems it's still worried some people.

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

RSS

Stats

Asked: 2010-04-12 07:07:28 +0800

Seen: 852 times

Last updated: Apr 12 '10

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