0

macro not working 3.6

asked 2009-03-28 08:04:22 +0800

abrar gravatar image abrar
27

I am trying to make a macro work for me but it is not working for me
I tried
<?component name="msgs" macroURI="/WEB-INF/messages.zul"?>
and then using
<msgs/>
in my zul
and also
<component>
<component-name>messages</component-name>
<macro-uri>/WEB-INF/messages.zul</macro-uri>
</component>
in my lang-addon.xml but no luck!
However if I copy the content of messages.zul in my zul file it works perfectly.
The content of my messages.zul is
<hbox width="100%">
<window title="" id="messageWindow" visible="false" border="normal" width="100%" closable="true">
<attribute name="onClose">
messageWindow.setVisible(false);
event.stopPropagation();
</attribute>
<panel id="messagePanel" title="Messages" collapsible="true" framable="true">
<panelchildren>
<listbox id="messageListBox" width="99%">
<listitem label="${each}" forEach="${messages}" style="color:red;"/>
</listbox>
</panelchildren>
</panel>
</window>
</hbox>
Any help will be appreciated!

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2009-03-29 16:18:16 +0800

sreed gravatar image sreed
195 1 3 5

updated 2009-03-29 16:27:54 +0800

I suggest putting together a very short test case with a /test/main.zul and a /test/messages.zul. I suggest putting these files in a "test" folder at the same directory level as WEB-INF. Leave WEB-INF for servlet container stuff like web.xml and zk.xml.
--------------------
/test/main.zul:

<?component name="msgs" macroURI="/test/messages.zul"?>
<zk>
<vbox>
<label value="Msgs macro should be next..."/>
<msgs/>
</vbox>
</zk>

------------
/test/messages.zul:

<zk>
<label value="This is a label in the messages macro"/>
</zk>

-------------------

Once you get that to work, then try it with your own code again.

link publish delete flag offensive edit

answered 2009-03-30 00:48:11 +0800

PeterKuo gravatar image PeterKuo
481 2

In your window, I saw visible="false".
Maybe your the macro works, but you hide it?

link publish delete flag offensive edit

answered 2009-03-30 02:05:38 +0800

sreed gravatar image sreed
195 1 3 5

Good eye, Peter!

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: 2009-03-28 08:04:22 +0800

Seen: 178 times

Last updated: Mar 30 '09

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