Multiple Composer in ZUL [closed]

asked 2018-01-09 00:07:17 +0800

javiut gravatar image javiut flag of Venezuela, Bolivarian Republic of
90 1 5

I have a view with a composer that composer is using a HtmlMacroComponent to create several listboxes that macroComponent is using also a composer in the listbox i have this code


But a error states pantallaParaDetalle is not part of the composer but this property is in the HtmlMacroComponent composer how can i do that or set the composer to the HtmlMacroComponent and not the view general composer thanks a lot.

delete flag offensive retag edit

The question has been closed for the following reason "the question is answered, right answer was accepted" by cor3000
close date 2018-01-09 20:10:06

1 Answer

Sort by ยป oldest newest most voted

answered 2018-01-09 09:17:05 +0800

cor3000 gravatar image cor3000
5399 2 7
ZK Team

updated 2018-01-09 09:19:00 +0800

Hi Javiut,

As you found the default composer variable is $composer. If you want to reference a specific composer you can either user the extended syntax - id$composer - using the component-id as a prefix, or specify a composerName in a <custom-attributes> element.

<div id="compA" apply="some.package.ComposerA">
  <div id="compB" apply="some.package.ComposerB">
    <div if="${compA$composer.pantallaParaDetalle}">
      some detail

<div apply="some.package.ComposerA">
  <custom-attributes composerName="myCompA"/>
  <div apply="some.package.ComposerB">
    <div if="${myCompA.pantallaParaDetalle}">
      some detail

These options also are described in our composer documentation page.


link publish delete flag offensive edit


great thanks.

javiut ( 2018-01-09 19:09:16 +0800 )edit

you're welcome

cor3000 ( 2018-01-09 20:10:17 +0800 )edit

what if i dont have created a name explicity i mean i dont have the name='' because i have mapped the component name with the zul in lang-addon.xml and i have created as a Spring bean and in the zul i dont have a name

javiut ( 2018-01-09 20:20:44 +0800 )edit

i mean how can i do <custom-attributes composerName="myCompA"/> if i dont have a explicit apply='' or can i do it in the lang-addon.xml??

javiut ( 2018-01-09 20:24:29 +0800 )edit

I can't follow completely how you'd like to do that in a lang-addon.xml. if you have a spring bean you can just use the name of the spring bean ${mybean.aproperty} (just enable the variable resolver for spring beans on that page)

cor3000 ( 2018-01-10 15:07:29 +0800 )edit

Question tools

1 follower



Asked: 2018-01-09 00:07:17 +0800

Seen: 14 times

Last updated: Jan 09 '18

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