0

How do I access components inside include files

asked 2014-07-09 12:24:03 +0800

stevemdavis gravatar image stevemdavis
11 1

Hi,

Scenerio: 2 files, main.zul and inc.zul

what is the correct way to access a ZK textbox component in an include ZUL file using Zscript inside the main ZUL?

I've noticed that accessing components in the main.zul can be accessed directly simply by using their IDs, whilst referencing it inside an include file, but not vice-versa.

e.g If a textbox in main.zul is created with id="firstname", then if zscript was used to call firstname.setValue("something") whilst in inc.zul this will set the textbox.

However accessing a textbox with id="surname" inside inc.zul does not work, if called from main.zul. e.g. surname.getValue("something")

If this a bug in ZK ??

Like JavaScript, var o = document.getElementById(theID), this will give reference to any object at any container level,

PAGE/FORM/COMPONENT

Is there an equivalent in ZK?

Thanks Steve

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2014-09-19 03:21:46 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

Hi you can refer to here

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
1 follower

RSS

Stats

Asked: 2014-07-09 12:24:03 +0800

Seen: 18 times

Last updated: Sep 19 '14

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