0

How to create anchor dynamically

asked 2006-03-19 11:50:39 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3637869

By: tskale

How to create following anchor programatically?

<h:A value="click me" href="/hello.zul">click me </h:A>

Couldn't quite figure out how to use com.potix.zhtml.A with namespace h.

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2006-03-19 11:53:43 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3637870

By: tskale

Just looked at the thread
http://sourceforge.net/forum/forum.php?thread_id=1461076&forum_id=510209. Will try Execution class.

link publish delete flag offensive edit

answered 2006-03-19 12:15:33 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3637887

By: tomyeh

ZUML supports multiple set of components, such as xul and xhtml. To use them in the same page, you have to use XML name spaces to distinquish them.

If you are not familar with XML name spaces, suggest you to take a look at them first.

For example,

<x:window xmlns:x="http://www.mozilla.org/keymaster
/gatekeeper/there.is.only.xul" xmlns:h="http://www.w3.org/1999/xhtml">
<h:a href="/hello.zul">click me</h:a>
</x:window>

x and h are only shortcuts to the XML name space (such as http://www.w3.org/1999/xhtml). It could be anything you prefer.

You CANNOT specify h: and expect some magic. XML parser needs to know what h stands for!

To minimize the effort of specifying XML name space for each page, ZUML determined the default name space by its extension. For example, if the extension is zul, it knows the following element, xyz, is from the name space, "http://www.mozilla.org/keymaster /gatekeeper/there.is.only.xul".

<xyz>...</xyz>

In other words, it is the same as

<xyz xmlns="http://www.mozilla.org/keymaster
/gatekeeper/there.is.only.xul">...


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: 2006-03-19 11:50:39 +0800

Seen: 757 times

Last updated: Mar 19 '06

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