Right white space in zk - zk

I create a web page with a listbox and button, the problem is that when page loads, a white space appear at the right of both components, but if resize the page the spaces disappear.
<zk xmlns="http://www.zkoss.org/2005/zul">
<div apply="org.zkoss.bind.BindComposer" viewModel="#id('vm') #init('com.valid.pmngr.product.ProductViewModel')" height="100%" width="100%" style="border: 3px solid red;">
<style src="/css/style.css"/>
<div height="94%" width="100%" style="border: 3px solid orange;">
<vbox vflex="1" hflex="1" style="border: 3px solid blue;">
<hbox align="end" width="100%" style="background-color:#282425; padding: 30px 0px 15px 60px">
<separator height="58px"/>
<image src="/img/Logo.png"/>
</hbox>
<separator height="15px"/>
<grid>
<auxhead>
<auxheader label="Products" zclass="auxheader-g"/>
</auxhead>
<columns />
</grid>
<listbox model="#load(vm.productStatusList) #template((vm.displayEdit and each.editingStatus) ? 'editable' : 'noneditable')"
vflex="1" >
<listhead sizable="true">
<listheader label="Name" align="center"/>
<listheader label="Vertical" align="center"/>
<listheader label="Business unit" align="center"/>
<listheader/>
</listhead>
<template name="noneditable">
<listitem>
<listcell>
<label width="98%" value="#bind(each.product.name)" />
</listcell>
<listcell>
<label width="98%" value="#bind(each.product.vertical)" />
</listcell>
<listcell>
<label width="98%" value="#bind(each.product.businessUnit)" />
</listcell>
<listcell>
<button image="/img/edit.png" onClick="#command('edit')"/>
<button image="/img/delete.png" onClick="#command('delete')" />
</listcell>
</listitem>
</template>
</listbox>
</vbox>
</div>
<div vflex="min" style="border: 3px solid purple;">
<vbox hflex="1" vflex="1" style="border: 3px solid black;">
<button label="New" onClick="#command('newProduct')" />
</vbox>
</div>
</div>
</zk>
When page loads in full screen:
1
And after resize:
2
what is the problem?
EDIT
The white spaces appear in chrome, firefox and iExplorer and the version of zk is 8.0.1.1

I edited your fiddle to this. Can you check it out it meets your requirements?
I altered some things, for correctness :
Using spacing attribute in separator in stead of height.
vbox changed to vlayout as the align attribute is absolute here, and vlayout is lighter in generated html.
Removing the width and hflex where it is not needed.
Removing height and vflex where not needed and only set where needed.

Related

GWTcelltable scrollbar

I have a table with cellTable see the code bellow :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:c="urn:import:com.google.gwt.user.cellview.client"
xmlns:b="urn:import:com.bv.partenaire.graphique.client.ui.button">
<ui:with field='msg' type="com.bv.partenaire.web.client.resources.Messages" />
<ui:style>
.important {
font-weight: bold;
}
</ui:style>
<g:HTMLPanel>
<div class="modelBandeau">
<div class="divGauche">
<div class="testClass" style="background-color: green;">
<g:Label styleName="recherche">
<ui:text from="{msg.rechercher}" />
</g:Label>
</div>
<div style="margin-left:10px;margin-top: 1px;">
<g:TextBox ui:field="rechercheBox" />
</div>
</div>
</div>
<table cellspacing='0' cellpadding='0' style='width:100%'>
<tr>
<td valign='top'>
<c:CellTable ui:field="valideursTable" styleName="cellTable"/>
</td>
</tr>
<tr>
<td align='center'>
<c:SimplePager pageSize="10" ui:field="pager" />
</td>
</tr>
</table>
</g:HTMLPanel>
</ui:UiBinder>
the code works fine, my issue is when I have long data in my columns there is no horizontal Scrollbar
I tried to add <g:ScroolPanel> and <g:VerticalPanel> still doesn't work ?
tried to add also some css
table{
display: block;overflow-x: auto;white-space: nowrap;
}
I don't use the DataGrid
Any ideas ?
it works only with CSS, just add the code above and fixed width (950px) and the scrollbar will appear

ZK Intercept button click from parent window

I have this zul:
<zk>
<style>
tr.z-listitem-seld { background-image:none ; background-color :
LIGHTSKYBLUE;}
</style>
<window self="#define(content)" id="winReportFatturePassive" apply="controller.ReportFatturePassive">
<div align="center">
<panel sclass="grid_report_log">
<panelchildren>
..........
..........
..........
..........
<!-- Dettagli POD -->
<window id="winDettagliPod" visible="false">
<separator spacing="30px" />
<grid oddRowSclass="none" >
<columns>
<column align="center" hflex="1" />
<column align="center" hflex="1" />
<column align="center" hflex="1" />
<column align="center" hflex="1" />
<column align="center" hflex="1" />
<column align="center" hflex="1" />
<column align="center" hflex="1" />
</columns>
<rows>
<row valign="top" style="background:#FFFFFF;">
<label value="${labels.app.Pod}" />
</row>
<row>
<textbox id="txtPodDettagliPod" width="120px" />
<button id="btnFilterTechDettagliPod" label="${labels.app.filter}" />
</row>
</rows>
</grid>
..........
..........
..........
..........
</window>
</panelchildren>
</panel>
</div>
</window>
How is possibile itercept click on button btnFilterTechDettagliPod in sub-window winDettagliPod in controller ReportFatturePassive ?
My Controller Java is:
public class ReportFatturePassive extends SelectorComposer<Component> {
Is possibile use a simil code:
#Listen(Events.ON_CLICK + " = #btnFilterTechDettagliPod")
public void FilterTechDettagliPod() throws Exception {
}
Thanks
For this kind of use, I think you should try the Event Queues.
https://www.zkoss.org/wiki/ZK_Developer's_Reference/Event_Handling/Event_Queues#Subscribe_to_an_Event_Queue
This first article is working in MVC.
In this second one you will find an exemple with MVVM.
It's a shopping cart example. I think this is close to your need. When you add an article to the shopping cart, you have to force refresh of an other windows.
http://books.zkoss.org/zk-mvvm-book/8.0/advanced/communication_between_viewmodel_and_composer.html

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
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.

How to align column and rows in form

I have a form, and want that a row has 2 or 3 columns, to do so I am doing
.formcol {
float: left;
padding: 2px;
}
.formcol label {
font-weight: bold;
display:block;
}
how to get something like this
here is the fiddle
see i made following changes to your html strucutre:
<div class="formcol row">
<div class="formcol form-left middle">
<input type="text" id="col1x" size="12" name="col1x" />
<label for="col1x" >col1x</label>
</div>
<div class="formcol form-right middle">
<input type="text" id="col2x" size="12" name="col2x" />
<label for="col2x">col2x</label>
</div>
</div>
and added one extra class of mine :
.middle > label
{
text-align: center;
font-weight: bold;
font-size: 15px;
color: black;
}
and it works: fiddle
for 3 columns: make your structure like:
<div class="formcol row">
<div class="formcol form-left middle">
<input type="text" id="col1x" size="12" name="col1x" />
<label for="col1x" >col1x</label>
</div>
<div class="formcol form-left middle">
<input type="text" id="col1x" size="12" name="col1x" />
<label for="col1x" >col2x</label>
</div>
<div class="formcol form-right middle">
<input type="text" id="col2x" size="12" name="col2x" />
<label for="col2x">col3x</label>
</div>
</div>
(it uses all your existing class, plus one of mine)
Use CSS and HTML to float 2 or 3 div element blocks. Within each div section place your form input fields. Then simply remember to clear your floats when you are done.
Also within your CSS, control the height of each input field to be the same all around (i.e.
.my-input {
height:20px;
}
and associate the class name .my-input to every input field you have on the page.
This should visually give you the sense that there are rows of input fields due to the equal height of each field.

ajaxToolkit:ModalPopupExtender drag issue

When I try to drag the popup, first I have to click on draging position. But when I try to click on the draging enable area, popup window goes to another position. Even I try again it continuously happens.
here is my mark up:
<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender" runat="server" TargetControlID="btnEditAddress"
PopupControlID="Panel1" BackgroundCssClass="modalBackground" OkControlID="btnOKAddress"
CancelControlID="btnCancelAddress" DropShadow="true" PopupDragHandleControlID="headHolder"
X="270" Y="130" />
<asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" Style="width: 320px;
display: none;">
<div>
<div id="headHolder" runat="server" class="addressEditHead" style="height: 20px;
padding-top: 5px;">
<span style="padding-left: 5px;" id="addressType" />
</div>
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div style="height: 25px; text-align: center;">
<asp:Button ID="btnOKAddress" runat="server" CssClass="button" Text="Save" OnClientClick="saveAddress();" />
<asp:Button ID="btnCancelAddress" runat="server" CssClass="button" Text="Cancel" />
<asp:HiddenField ID="hdnRelatedTable" runat="server" />
<asp:HiddenField ID="hdnRelatedID" runat="server" />
</div>
</div>
</asp:Panel>
Hi, All I found the solution. I upgrade the ajaxtoolkit to latest version. Now It's working coreclty
I found the solution. I upgraded the ajaxtoolkit to latest version. Now It's working coreclty.