Revision history [back]

click to hide/show revision 1
initial version

answered 2022-09-16 18:56:22 +0800

ImanolRP gravatar image ImanolRP

UPDATE of the investigation (for help to resolve the doubt)

In the last hours i was searching about how create custom components with only an ViewModel without succes. In the only place i have found anything remotely similar to my case its in the oficial wiki of zk. The page has been updated: 2022/08/08 then sould be "reliable".

The example im talking about its on the point "9.template-uri > 9.2Define a Custom Component"

That point sais you can define on lang-addon a component like:

<component>
    <component-name>megamenu</component-name>
    <template-uri>/uiComposing/megaMenuParameterized.zul</template-uri>
</component>

And then invoque it from the zul with the custom tag:

<megamenu>

I have copy/pasted that example on my own project but when i'm deploying fails reading the lang-addon in that component and don't recognize me that tag on .zul files.

Anyone have tryed this example or others like this with succes?

UPDATE of the investigation (for help to resolve the doubt)

In the last hours i was searching about how create custom components with only an ViewModel without succes. In the only place i have found anything remotely similar to my case its in the oficial wiki of zk. The page has been updated: 2022/08/08 then sould be "reliable".

https://www.zkoss.org/wiki/ZKClient-sideReference/Language_Definition/component

The example im talking about its on the point "9.template-uri > 9.2Define a Custom Component"

That point sais you can define on lang-addon a component like:

<component>
    <component-name>megamenu</component-name>
    <template-uri>/uiComposing/megaMenuParameterized.zul</template-uri>
</component>

And then invoque it from the zul with the custom tag:

<megamenu>

I have copy/pasted that example on my own project but when i'm deploying fails reading the lang-addon in that component and don't recognize me that tag on .zul files.

Anyone have tryed this example or others like this with succes?

UPDATE of the investigation (for help to resolve the doubt)

In the last hours i was searching about how create custom components with only an ViewModel without succes. In the only place i have found anything remotely similar to my case its in the oficial wiki of zk. The page has been updated: 2022/08/08 then sould be "reliable".

https://www.zkoss.org/wiki/ZKClient-sideReference/Language_Definition/component

The example im talking about its on the point "9.template-uri > 9.2Define a Custom Component"

That point sais you can define on lang-addon a component like:

<component>
    <component-name>megamenu</component-name>
    <template-uri>/uiComposing/megaMenuParameterized.zul</template-uri>
</component>

And then invoque it from the zul with the custom tag:

<megamenu>

I have copy/pasted that example on my own project but when i'm deploying fails reading the lang-addon in that component and don't recognize me that tag on .zul files.

Server deploying logs

ERROR [org.zkoss.zk.ui.metainfo.DefinitionLoaders] (ServerService Thread Pool -- 73) Failed to load addon: file:/P:/jboss-eap-7.1.0/standalone/tmp/vfs/temp/temp391cd92af805a4c7/content-d31b2ec3d5f014f7/WEB-INF/lang-addon.xml: java.lang.NullPointerException
        at org.zkoss.zk.ui.metainfo.DefinitionLoaders.parseLang(DefinitionLoaders.java:446)
        at org.zkoss.zk.ui.metainfo.DefinitionLoaders.loadLang(DefinitionLoaders.java:241)

Anyone have tryed this example or others like this with succes?

UPDATE of the investigation (for help to resolve the doubt)

In the last hours i was searching about how create custom components with only an ViewModel without succes. In the only place i have found anything remotely similar to my case its in the oficial wiki of zk. The page has been updated: 2022/08/08 then sould be "reliable".

https://www.zkoss.org/wiki/ZKClient-sideReference/Language_Definition/component

The example im talking about its on the point "9.template-uri > 9.2Define a Custom Component"

That point sais you can define on lang-addon a component like:

<component>
    <component-name>megamenu</component-name>
    <template-uri>/uiComposing/megaMenuParameterized.zul</template-uri>
</component>

And then invoque it from the zul with the custom tag:

<megamenu>

I have copy/pasted that example on my own project but creating a simple zul (not provided by the wiki):

megamenu.zul

<zk>
    <label value="megamenu"/>
</zk>

But when i'm deploying fails reading the lang-addon in that component and don't recognize me that tag on .zul files.

Server deploying logs

ERROR [org.zkoss.zk.ui.metainfo.DefinitionLoaders] (ServerService Thread Pool -- 73) Failed to load addon: file:/P:/jboss-eap-7.1.0/standalone/tmp/vfs/temp/temp391cd92af805a4c7/content-d31b2ec3d5f014f7/WEB-INF/lang-addon.xml: java.lang.NullPointerException
        at org.zkoss.zk.ui.metainfo.DefinitionLoaders.parseLang(DefinitionLoaders.java:446)
        at org.zkoss.zk.ui.metainfo.DefinitionLoaders.loadLang(DefinitionLoaders.java:241)

Anyone have tryed this example or others like this with succes?

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