Search code examples
zk

Tab Panel ends up as blank


Using the ZK framework, no matter what I do this tabpanel will not show itself and just ends up being blank.

<window id="indexwin" height="100%" width="100%" visible="true">


    <style src="/css/itb.css" />

    <hlayout width="100%" style="padding-right: 3px; text-align: right; overflow: auto" valign="middle">

        <div width="260px" style="margin-right: 9px; padding-top: 6px; padding-bottom: 6px">
            <button label="Logout" id="logout" sclass="logout-button"/>
        </div>
    </hlayout>

    <tabbox width="99%" height="76%" style="margin:12px;">
        <tabs>
            <tab label="Anomalies" id="anomaliesTab"/>
        </tabs>
        <tabpanels>
            <tabpanel id="anomalysearchpanel" style="background-color: #ffffff" >
                <panel border="none">
                    <panelchildren>
                        <borderlayout width="100%" height="100%">
                            <west hflex="1" title="Search....

I previously had nested (included) windows which were fine but the collapsible panels were not working so I attempted to change. Is there any further information I need to add to


Solution

  • Did some research,

    Your code is correct but I'm suspecting a bug.

    <window id="indexwin" height="100%" width="100%" visible="true">
        <hlayout width="100%" style="padding-right: 3px; text-align: right; overflow: auto" valign="middle">
            <div width="260px" style="margin-right: 9px; padding-top: 6px; padding-bottom: 6px">
                <button label="Logout" id="logout" sclass="logout-button"/>
            </div>
        </hlayout>
    
        <tabbox width="99%" height="76%" style="margin:12px;">
            <tabs>
                <tab label="Anomalies" id="anomaliesTab"/>
            </tabs>
            <tabpanels>
                <tabpanel id="anomalysearchpanel" >
                    <panel collapsible="true" tiltle=" ">
                        <panelchildren>
                          <label value="hey chillworld"/>
                      </panelchildren>
                  </panel>
              </tabpanel>
          </tabpanels>
      </tabbox>
    </window>
    

    At title is no normal space but a space that counts as a char (alt gr + 255).
    I needed to do this cause you the panel header is only visible when a title is set (a normal space doesn't do the trick).

    Example of this in the this fiddle.

    If you suspect also a bug, you can make an issue tracker at zk for this.
    Include the fiddle and mention the difference with no title set.