-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi, Iam Using DIV tag in ZUL.
Can i handle onFocus event in Composer for div tag declared in ZUL?
example:
<div id="test" style="font-weight:bold;border:2px solid green" focus="true">
Can i handle onFocus event in COntroller?
Hi.
Iam looking for a container (like window or panel or any thing) which can have border and also handle focus event.
Hi.. can u give one example..How can we keep a textbox control on DIV?
Of course
<window title="My First Window" border="normal" width="200px"> <textbox id="firstTextbox"/> <div> This is my div <textbox id="focusCatcher" width="1px" style="border: 0px" onFocus="alert(1)"/> </div> </window>
Hi Arsen, In my case i have many textboxes inside div.
In this scenario i have to give onFocus for each and every textbox.
Iam looking for a container becuase, if i can handle focus at one point.
<?page id="user"?>
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c" ?>
<zk xmlns="http://www.zkoss.org/2005/zul"
xmlns:h="http://www.w3.org/1999/xhtml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd">
<window id="userWindow" title="User" maximizable="true" minimizable="true" closable="true" height="70%" width="40%" style="background:#6699FF" apply="in.usit.security.controller.UserController" >
<div id="userDIV" height="50%" width="80%">
<h:table id="userTable" width="100%" align="center" border="0" >
<h:tr>
<h:td width="15%" align="right" colspan="1">
<label value="${c:l('user.loginid')}" />
</h:td>
<h:td width="5%" colspan="2">
<textbox id="loginId" value="" />
</h:td>
<h:td width="15%" align="right" colspan="1">
<label value="${c:l('user.pwd')}" />
</h:td>
<h:td width="5%" colspan="2">
<textbox id="loginPwd" type="password" value="" />
</h:td>
<h:td></h:td>
</h:tr>
<h:tr>
<h:td width="15%" align="right" colspan="1">
<label value="${c:l('user.name')}" />
</h:td>
<h:td width="5%" colspan="2">
<textbox id="userName" value="" />
</h:td>
<h:td width="15%" align="right" colspan="1">
<label value="${c:l('user.confirmpwd')}" />
</h:td>
<h:td width="5%" colspan="2">
<textbox id="confirmPwd" type="password" value="" />
</h:td>
<h:td></h:td>
</h:tr>
<h:tr>
<h:td width="15%" align="right" colspan="1">
<label value="${c:l('user.type')}" />
</h:td>
<h:td width="5%" colspan="2">
<combobox id="userType" cols="17" value="" />
</h:td>
<h:td width="15%" align="right" colspan="1">
<label value="${c:l('user.designation')}" />
</h:td>
<h:td width="5%" colspan="2">
<combobox id="designation" cols="17" value="" />
</h:td>
<h:td></h:td>
</h:tr>
<h:tr>
<h:td width="15%" align="right" colspan="1">
<label value="${c:l('user.validfrom')}" />
</h:td>
<h:td width="5%" colspan="2">
<datebox id="validFrom" cols="17" readonly="true" format="dd/MM/yyyy"/>
</h:td>
<h:td width="15%" align="right" colspan="1">
<label value="${c:l('user.validupto')}" />
</h:td>
<h:td width="5%" colspan="2">
<datebox id="validUpTo" cols="17" readonly="true" format="dd/MM/yyyy" />
</h:td>
<h:td></h:td>
</h:tr>
<h:tr>
<h:td width="15%" align="right" colspan="1">
<label value="${c:l('user.email')}" />
</h:td>
<h:td width="5%" colspan="2">
<textbox id="email" value="" />
</h:td>
<h:td width="15%" align="right" colspan="1">
<label value="${c:l('user.officephno')}" />
</h:td>
<h:td width="5%" colspan="2">
<textbox id="officePhNo" value="" />
</h:td>
<h:td></h:td>
</h:tr>
<h:tr>
<h:td width="15%" align="right" colspan="1">
<label value="${c:l('user.mobileno')}" />
</h:td>
<h:td width="5%" colspan="2">
<textbox id="mobilePhNo" value="" />
</h:td>
<h:td width="15%" align="right" colspan="1">
<label value="${c:l('user.housephno')}" />
</h:td>
<h:td width="5%" colspan="2">
<textbox id="housePhNo" value="" />
</h:td>
<h:td></h:td>
</h:tr>
</h:table>
</div>
<separator bar="false" height="2%"/>
<div id="userDeptDIV" height="40%" width="80%">
<h:table id="userDeptTable">
<h:tr>
<h:td>
<grid id="userDeptDetails" mold="paging" pagingPosition="both" pageSize="8">
<columns>
<column label="${c:l('user.select')}" />
<column label="${c:l('user.dept')}" />
<column label="${c:l('user.tree')}" />
<column label="${c:l('user.active')}" />
</columns>
<rows id="userDeptDetailRows">
</rows>
</grid>
</h:td>
</h:tr>
</h:table>
</div>
</window>
</zk>
I want to handle onFocus event for containers like window, Panel or DIV...
So that i can be free from handling the focus events from the other components that are inside the DIV.
As in my application, i need to do catch onFocus for the containers..
Arsen: If i take a textbox which is hidden. Hw it will take focus?
Asked: 2010-07-29 08:13:02 +0800
Seen: 473 times
Last updated: Aug 02 '10