0

zk10.0.0.FL.20220413 with custom component getting error

asked 2022-05-21 13:14:54 +0800

wastemails gravatar image wastemails
130 1 2

updated 2022-05-21 13:26:15 +0800

when running zk10FL with springboot and security and using custom component Getting error. Also Video,listgroup and some other components are not working.

delete flag offensive retag edit

5 Answers

Sort by ยป oldest newest most voted
0

answered 2022-05-30 16:29:52 +0800

hawk gravatar image hawk
3250 1 5
http://hawkphoenix.blogsp... ZK Team

Thanks for your project.

about Uncaught Unknown widget: zephyrex.Custom-navbarInfo

this is a bug. Currently, zk 10 client mvvm can't support a custom component with template-uri. We will fix it in the future release.

client MVVM doesn't allow EL

Even the bug is fixed. You code snippet won't work because of EL. Please read the small talk to know other limitations: https://www.zkoss.org/wiki/SmallTalks/2022/May/ZK10Preview:UsingthenewandlightClientMVVM#1.ELexpressionsnot_supported

video looks normal

zk generates video elements as expected in your project. image description

link publish delete flag offensive edit
0

answered 2022-05-28 09:33:48 +0800

wastemails gravatar image wastemails
130 1 2

I have simulated entire project but getting the same error. I am enclosing the source code in the following google drive , please test

https://drive.google.com/file/d/1QF6opkFysiEcgMqE0IRzf9F-llrJZACf/view?usp=sharing
link publish delete flag offensive edit
0

answered 2022-05-27 15:08:30 +0800

hawk gravatar image hawk
3250 1 5
http://hawkphoenix.blogsp... ZK Team

about the video and listgroup, I found the warning https://tracker.zkoss.org/browse/ZK-5169 But zk still can render those components correctly.

link publish delete flag offensive edit
0

answered 2022-05-26 10:15:18 +0800

wastemails gravatar image wastemails
130 1 2

using zk 10.0.0.FL.20220413-Eval

My index.zul page contains

<custom-navbar menus="@load(vm.menus)" selectedColor="#fcfcde"/>

My web/custom-component.zul file is as follows

<zk xmlns:x="xhtml">

    <style>

        .z-menupopup{padding:0px;background:#fff;}
        .z-menupopup-separator{display:none;}
        .z-menu-text, .z-menuitem-text{text-shadow:none;}
        .z-menu-content, .z-menuitem-content{border:none;padding:5px;border-radius:0px;}
        .special-menupopup .z-menuitem-content:hover{background:${selectedColor};color:#fff;padding:5px;}
        <!--        .z-menu-content:hover, .z-menuitem-content:hover{background:${selectedColor};color:#fff;}-->

        .menubar{display:flex;}
        .menubar div {flex-direction: column; justify-content: center; color:#fff;padding:14px 10px;font-size:13px;cursor:pointer;white-space:pre;}
        .menubar div.selected{background:${selectedColor};}
    </style>

    <div sclass="menubar" hflex="1">
        <forEach items="${menus}" var="menu">
            <choose>
                <when test="${empty menu.subMenu}">
                    <x:div textContent="${menu.label}" sclass="@load((menu.selected ? 'selected':''))" onClick="@command('showPage',parentId=menu.id,selectedId=menu.id,path=menu.path)" />
                </when>
                <otherwise>
                    <div sclass="@load((menu.selected ? 'selected':''))"  popup="${(menu.label+=',after_start,delay=0')}">
                        <x:span textContent="${menu.label}"/>
                        <image src="images/drop-down-arrow.svg"/>
                    </div>
                    <menupopup id="${menu.label}" style="min-width:200px;border-top:none;" action="show: slideDown; hide: slideUp" sclass="special-menupopup" >
                        <forEach items="${menu.subMenu}" var="submenu">
                            <menuitem onClick="@command('showPage',parentId=menu.id,selectedId=submenu.id,path=submenu.path)" label="${submenu.label}" />
                            <menuseparator if="${submenu.separator}"/>
                        </forEach>
                    </menupopup>
                </otherwise>
            </choose>
        </forEach>
    </div>

</zk>

My custom component configured in /metainfo/zk/lang-addon.xml as follows

<language-addon>
    <addon-name>admin-addon</addon-name>
    <version>1.0</version>
    <language-name>xul/html</language-name>

    <depends>zuti</depends>

    <component>
        <component-name>custom-navbar</component-name>
        <template-uri>~./custom-navbar.zul</template-uri>
    </component>

</language-addon>

Getting the following error in chrome browser console

Uncaught Unknown widget: zephyrex.Custom-navbarInfo     zephyrex.wpd:9677
link publish delete flag offensive edit

Comments

I put your code to simulate the problem with zkspringboot demo but can't succeed.

hawk ( 2022-05-27 15:05:40 +0800 )edit
0

answered 2022-05-25 12:19:22 +0800

hawk gravatar image hawk
3250 1 5
http://hawkphoenix.blogsp... ZK Team

I tried springboot-security-demo with zk 10.0.0.FL.20220413-Eval.

There is no error with Video:

image description

Since you upgrade zk with a major version change, something might break in the custom component. Could you attach the related error message you saw and related technical details? Which zk 10 version you use?

link publish delete flag offensive edit
Your answer
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: 2022-05-21 13:14:54 +0800

Seen: 17 times

Last updated: May 30 '22

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