1

Problem Tabbox Height 100 %

asked 2016-12-20 04:11:29 +0800

Senthilchettyin gravatar image Senthilchettyin flag of India
2621 3 8
http://emrpms.blogspot.in...

I have a zul with there tab. First Tab is loaded when the zul is loaded. When the user clicks on second tab, i am dynamically loading another zul file. On Click, the zul file is loaded , but the zul is not completely visible. In order to make visible, i need to change the Tabbox Height into Pixels . But this will not work in all resolution. So any solution ?

Parent zul which contains the tab

<zk>
<window id="practiceCRUD" border="none" height="100%"
    apply="org.zkoss.bind.BindComposer"
    viewModel="@id('vm') @init('com.product.webapp.encounter.EncounterCRUDMainVM')">
    <div height="100%">
        <div height="100%">
            <div width="96%">
                <span width="100%">
                    <div sclass="screenheader">
                        <separator />
                        <label id="lcaption"
                            sclass="screenheaderlabel" value="Account Information" />
                        <label id="readonly"
                            sclass="screenheaderlabel" value="(ReadOnly)" />
                        <image id="dirty"
                            tooltiptext="You have unsaved information" />
                    </div>
                </span>


                <div sclass="clearboth"></div>
                <div sclass="sectionSeperator"></div>
            </div>

            <tabbox id="tb" width="97%" height="96%">
                <tabs id="tabs" sclass="crudtabcnt">
                    <tab  id="A" label="General Information"
                        sclass="crudtab" />

                    <tab id="D" label="Client Billing Fee Override"
                        sclass="crudtab"
                        onSelect="@command('onDocumentsTab', target=self.linkedPanel)" />

                </tabs>
                <tabpanels id="tbpanels">
                    <tabpanel style="overflow:auto" height="80%">
                        <panel width="96%"
                            sclass="sectionpadding">
                            <panelchildren>
                            welcome
                            </panelchildren>
                        </panel>

                    </tabpanel>
                    <tabpanel style="overflow:auto" height="98%"></tabpanel>

                </tabpanels>
            </tabbox>
        </div>
    </div>
</window>

</zk>

Parent VM

package com.product.webapp.encounter;

import java.util.HashMap; import java.util.Map;

import org.zkoss.bind.Binder; import org.zkoss.bind.annotation.AfterCompose; import org.zkoss.bind.annotation.BindingParam; import org.zkoss.bind.annotation.Command; import org.zkoss.bind.annotation.ContextParam; import org.zkoss.bind.annotation.ContextType; import org.zkoss.bind.annotation.ExecutionArgParam; import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.Executions; import org.zkoss.zul.Messagebox; import org.zkoss.zul.Tabpanel;

public class EncounterCRUDMainVM extends TabbedScreen {

private Component currentChild;
private String calledBy;
private HashMap<String, Object> callerMap = new HashMap<String, Object>();
private Component container;
private Component view;
private HashMap<String, Object> argMap = new HashMap<String, Object>();

@AfterCompose
public void initSetup(@ContextParam(ContextType.VIEW) Component view     
         ) {

}

@Command
public void onDocumentsTab(@BindingParam("target") Tabpanel panel) {

    Messagebox.show(" i am here");
    currentChild = Executions.createComponents("/zk/encounter/encounterCRUDdocuments.zul", panel, argMap);

}

}

Child zul and vm to be shown in tab

encounterCRUDdocuments.zul

<zk>
<window border="none" title="welcome"  
    apply="org.zkoss.bind.BindComposer">
    <div width="96%">
        <span width="100%">
            <div sclass="screenheader">
                <separator />
                <label id="lcaption" sclass="screenheaderlabel"
                    value="Account Contact List" />
            </div>
        </span>
        <div id="buttonsDiv" sclass="screenheaderbuts">
            <fbutton label="Add New"
                onClick="@command('onAddNew')">
            </fbutton>
        </div>
        <div sclass="clearboth"></div>
        <div sclass="sectionSeperator"></div>
    </div>

    <panel width="96%" sclass="sectionpadding">
        <panelchildren>

</panelchildren>
    </panel>
</window>

</zk>

VM

package com.product.webapp.encounter;

import java.util.ArrayList; import java.util.List; import org.zkoss.bind.annotation.AfterCompose; import org.zkoss.bind.annotation.ContextParam; import org.zkoss.bind.annotation.ContextType; import org.zkoss.bind.annotation.ExecutionArgParam; import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.select.Selectors; import org.zkoss.zul.Messagebox;

public class encounterCRUDDocumentsVM {

private Encounter selectedEncounter;
private boolean makeAsReadOnly;
private RecordMode recordMode;

@AfterCompose
public void initSetup(@ContextParam(ContextType.VIEW) Component view,
        @ExecutionArgParam("container") Component container) {
    Selectors.wireComponents(view, this, false);

}

}

delete flag offensive retag edit

Comments

I'd like to remind you to post a simple example that catches the essence of your problem. Otherwise members of this forum will unlikely take the time to even try to help you. It will be more efficient if you provide a running example on zkfiddle.org. You can paste your code there instead of here.

cor3000 ( 2016-12-27 06:11:36 +0800 )edit

Then just provide the link to your zkfiddle example here.

cor3000 ( 2016-12-27 06:11:48 +0800 )edit
Be the first one to answer this question!
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
1 follower

RSS

Stats

Asked: 2016-12-20 04:11:29 +0800

Seen: 26 times

Last updated: Dec 20 '16

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