When my application performs a search, it might take a long time so I want to replace the standard processing window with my own processing window with a cancel option.
I added my own java-script to create my custom processing window. This is the part of the ZUL file:
Events.postEvent("onClick", imgBtn, null); |
This is my part of my java class:
public class SearchComposer extends GenericForwardComposer {
private LibraryService libraryService = (LibraryService)SpringUtil.getBean("libraryService");
public void onSearch(ForwardEvent event) throws InterruptedException {
if (ResourceManager.getUserCabinets().size() == 0)
{
Messagebox.show("You do not have cabinet access to any cabinets.", "Documation Library", Messagebox.OK, Messagebox.EXCLAMATION);
return;
}
}
When I test this, I get "Exception in thread "Thread-38" org.zkoss.zk.ui.UiException: SpringUtil can be called only under ZK environment!", any suggestion on how I can fix this?
↧
Replacing processing window, getting SpringUtil can be called only under ZK environment error
↧
Click on a cell then move the cursor perform area selection
Hi,
I have a classic mouse selection behavior issue:
1-Click (classic left click) on a cell
2-Move the cursor to another cell
Result: it triggers an area selection automatically
It is like when you click on cell and don't release the click when you move the cursor.
But I noticed when I click very quickly on cell to another cell there is no issue.
I am using
ZSS EE 3.9.1
ZK 8.0.4.1 EE (build: 2017012412)
Chrome Version 56.0.2924.87
Thanks for your support
↧
↧
zkLoader Servlet - Avg. Request Service Time (ms)
We having issue of ZKLoader Avg.Request Service Time(ms). We facing this issue many times and We tried to resolve it we made also some changes but it's not working. Here i am attached Application and DB logs When ZKLoader alert came.
Application Log:-
06:12:16.072===========> ExtMUser.saveError: SaveError - EMail format is invalid: EMail Address - [mycbosplatform@centralbos.com1] [183]
06:12:16.072===========> Login.getClients: Failed to update user record with date last login [183]
07:22:31.019===========> ExtMUser.saveError: SaveError - EMail format is invalid: EMail Address - [mycbosplatform@centralbos.com1] [175]
07:22:31.020===========> Login.getClients: Failed to update user record with date last login [175]
07:28:40.457===========> ExtMUser.saveError: SaveError - EMail format is invalid: EMail Address - [mycbosplatform@centralbos.com1] [180]
07:28:40.457===========> Login.getClients: Failed to update user record with date last login [180]
07:36:14.503===========> ExtMUser.saveError: SaveError - EMail format is invalid: EMail Address - [mycbosplatform@centralbos.com1] [177]
07:36:14.504===========> Login.getClients: Failed to update user record with date last login [177]
08:53:32.484===========> GridField.createDefault: Created - Unparseable date: "SYSDATE" [195]
08:53:32.518===========> Evaluator.evaluateLogicTuple: Logic tuple does not comply with format '@context@=value' where operand could be one of '=!^><' => 'API'= [195]
08:53:32.563===========> Evaluator.evaluateLogicTuple: Logic tuple does not comply with format '@context@=value' where operand could be one of '=!^><' => 'API'= [195]
08:53:32.620===========> Evaluator.evaluateLogicTuple: Logic tuple does not comply with format '@context@=value' where operand could be one of '=!^><' => 'API'= [195]
08:53:32.688===========> Evaluator.evaluateLogicTuple: Logic tuple does not comply with format '@context@=value' where operand could be one of '=!^><' => 'API'= [195]
08:53:51.488===========> Evaluator.evaluateLogicTuple: Logic tuple does not comply with format '@context@=value' where operand could be one of '=!^><' => 'API'= [192]
08:53:51.522===========> Evaluator.evaluateLogicTuple: Logic tuple does not comply with format '@context@=value' where operand could be one of '=!^><' => 'API'= [192]
08:53:51.559===========> Evaluator.evaluateLogicTuple: Logic tuple does not comply with format '@context@=value' where operand could be one of '=!^><' => 'API'= [192]
08:53:51.597===========> Evaluator.evaluateLogicTuple: Logic tuple does not comply with format '@context@=value' where operand could be one of '=!^><' => 'API'= [192]
08:53:55.733===========> Evaluator.evaluateLogicTuple: Logic tuple does not comply with format '@context@=value' where operand could be one of '=!^><' => 'API'= [180]
08:54:02.508===========> Evaluator.evaluateLogicTuple: Logic tuple does not comply with format '@context@=value' where operand could be one of '=!^><' => 'API'= [195]
08:54:02.555===========> Evaluator.evaluateLogicTuple: Logic tuple does not comply with format '@context@=value' where operand could be one of '=!^><' => 'API'= [195]
08:54:02.596===========> Evaluator.evaluateLogicTuple: Logic tuple does not comply with format '@context@=value' where operand could be one of '=!^><' => 'API'= [195]
08:54:15.156===========> Evaluator.evaluateLogicTuple: Logic tuple does not comply with format '@context@=value' where operand could be one of '=!^><' => 'API'= [192]
08:55:09.083===========> Trx.commit: POSaveM_InOut_09a2e922-3ff3-42a3-9818-f3d901a16037 [195]
org.postgresql.util.PSQLException: ERROR: insert or update on table "m_inout" violates foreign key constraint "celementvalueuser1_minout"
Detail: Key (user1_id)=(0) is not present in table "c_elementvalue".; State=23503; ErrorCode=0
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2182)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1911)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:173)
at org.postgresql.jdbc2.AbstractJdbc2Connection.executeTransactionCommand(AbstractJdbc2Connection.java:824)
at org.postgresql.jdbc2.AbstractJdbc2Connection.commit(AbstractJdbc2Connection.java:848)
at com.mchange.v2.c3p0.impl.NewProxyConnection.commit(NewProxyConnection.java:1007)
at org.compiere.util.Trx.commit(Trx.java:357)
at org.compiere.util.Trx.commit(Trx.java:399)
at org.compiere.model.PO.save(PO.java:2133)
at org.compiere.model.GridTable.dataSavePO(GridTable.java:2190)
at org.compiere.model.GridTable.dataSave(GridTable.java:1516)
at org.compiere.model.GridTab.dataSave(GridTab.java:963)
at org.adempiere.webui.adwindow.ADTabpanel.dataSave(ADTabpanel.java:1772)
at org.adempiere.webui.adwindow.CompositeADTabbox.dataSave(CompositeADTabbox.java:1098)
at org.adempiere.webui.adwindow.AbstractADWindowContent.onSave0(AbstractADWindowContent.java:2426)
at org.adempiere.webui.adwindow.AbstractADWindowContent.onSaveCallback(AbstractADWindowContent.java:2385)
at org.adempiere.webui.adwindow.AbstractADWindowContent.access$19(AbstractADWindowContent.java:2372)
at org.adempiere.webui.adwindow.AbstractADWindowContent$28.onCallback(AbstractADWindowContent.java:2346)
at org.adempiere.webui.adwindow.AbstractADWindowContent$28.onCallback(AbstractADWindowContent.java:1)
at org.adempiere.webui.adwindow.validator.WindowValidatorManager$ChainCallback.start(WindowValidatorManager.java:124)
at org.adempiere.webui.adwindow.validator.WindowValidatorManager.fireWindowValidatorEvent(WindowValidatorManager.java:103)
08:55:09.083===========> Trx.saveError: DeleteErrorDependent - ERROR: insert or update on table "m_inout" violates foreign key constraint "celementvalueuser1_minout"
Detail: Key (user1_id)=(0) is not present in table "c_elementvalue". [195]
08:56:27.844===========> GridField.createDefault: Created - Unparseable date: "SYSDATE" [172]
08:56:27.871===========> Evaluator.evaluateLogicTuple: Logic tuple does not comply with format '@context@=value' where operand could be one of '=!^><' => 'API'= [172]
08:56:27.901===========> Evaluator.evaluateLogicTuple: Logic tuple does not comply with format '@context@=value' where operand could be one of '=!^><' => 'API'= [172]
08:56:27.946===========> Evaluator.evaluateLogicTuple: Logic tuple does not comply with format '@context@=value' where operand could be one of '=!^><' => 'API'= [172]
08:56:28.012===========> Evaluator.evaluateLogicTuple: Logic tuple does not comply with format '@context@=value' where operand could be one of '=!^><' => 'API'= [172]
08:56:34.064===========> Evaluator.evaluateLogicTuple: Logic tuple does not comply with format '@context@=value' where operand could be one of '=!^><' => 'API'= [185]
08:56:34.100===========> Evaluator.evaluateLogicTuple: Logic tuple does not comply with format '@context@=value' where operand could be one of '=!^><' => 'API'= [185]
08:56:34.138===========> Evaluator.evaluateLogicTuple: Logic tuple does not comply with format '@context@=value' where operand could be one of '=!^><' => 'API'= [185]
08:56:34.177===========> Evaluator.evaluateLogicTuple: Logic tuple does not comply with format '@context@=value' where operand could be one of '=!^><' => 'API'= [185]
08:56:37.334===========> Evaluator.evaluateLogicTuple: Logic tuple does not comply with format '@context@=value' where operand could be one of '=!^><' => 'API'= [181]
DB log:-
2017-03-16 12:49:29 UTC::@:[2577]:LOG: checkpoint complete: wrote 407 buffers (0.1%); 0 transaction log file(s) added, 0 removed, 2 recycled; write=40.964 s, sync=0.025 s, total=41.033 s; sync files=81, longest=0.024 s, average=0.000 s
2017-03-16 12:53:31 UTC:172.31.22.169(58258):adempiere@idempiere:[22817]:ERROR: permission denied for database rdsadmin
2017-03-16 12:53:31 UTC:172.31.22.169(58258):adempiere@idempiere:[22817]:STATEMENT: SELECT pg_database_size('rdsadmin') size
2017-03-16 12:53:48 UTC::@:[2577]:LOG: checkpoint starting: time
2017-03-16 12:54:48 UTC::@:[2577]:LOG: checkpoint complete: wrote 594 buffers (0.1%); 0 transaction log file(s) added, 0 removed, 1 recycled; write=59.677 s, sync=0.011 s, total=59.712 s; sync files=167, longest=0.010 s, average=0.000 s
2017-03-16 12:54:54 UTC:172.31.25.101(48892):adempiere@idempiere:[23019]:ERROR: insert or update on table "m_inout" violates foreign key constraint "celementvalueuser1_minout"
2017-03-16 12:54:54 UTC:172.31.25.101(48892):adempiere@idempiere:[23019]:DETAIL: Key (user1_id)=(0) is not present in table "c_elementvalue".
2017-03-16 12:54:54 UTC:172.31.25.101(48892):adempiere@idempiere:[23019]:STATEMENT: COMMIT
2017-03-16 12:58:48 UTC::@:[2577]:LOG: checkpoint starting: time
2017-03-16 12:59:48 UTC::@:[2577]:LOG: checkpoint complete: wrote 593 buffers (0.1%); 0 transaction log file(s) added, 0 removed, 1 recycled; write=59.611 s, sync=0.011 s, total=59.650 s; sync files=165, longest=0.011 s, average=0.000 s
We faced zkloader issue when in above logs processes running. and also we have configured ZKLoader for monitoring on monitoring system(NMS).
↧
Host cannot be null [<Apply>]
In my index.zul I'm trying to use a simple template.
In browser I get this error:
HTTP ERROR 500
Problem accessing /pulse/. Reason:
Host cannot be null []
Caused by:
org.zkoss.zk.ui.UiException: Host cannot be null []
at org.zkoss.zk.ui.HtmlShadowElement.afterCompose(HtmlShadowElement.java:559)
at org.zkoss.zuti.zul.TemplateBasedShadowElement.afterCompose(TemplateBasedShadowElement.java:78)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:859)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:827)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:841)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:797)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:740)
at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:460)
at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:369)
at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:211)
at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:447)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:574)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1038)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:374)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:972)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:293)
at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:120)
at org.eclipse.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:566)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:447)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:556)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1038)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:374)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:972)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:363)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:920)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:982)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:745)
Can someone tell me what am I doing wrong?
↧
Unexpected Token Main Page
Hi, i'm using ZK CE 8.0.1.1. My application has a template file, so all pages are based on it and work without a problem but the main page doesn't render correctly and shows `Failed to mount: Unexpected token <`. Does anyone know why is this happening?
↧
↧
ZK framework fetching the data of included file
Can any one let me know how to get the values of input fields from included zul files in controller
Below is the pseudo code that I am using
main zul which includes another zul file
The included zul file
Input fields like,ZKtextbox,listbox,radio,datebox etc
In controller I want fetch the values of the input fields based on their id and I am using the below code for that
Page p=getPage("menu");
Zkwindow sessioninfo=(Zkwindow)p;
dailyRadioId=(Radio)sessioninfo.getfellow("id of radio");
get Page method used
public static Page getPage(String id){
Execution e=Executions.getCurrent();
Desktopd=e.getDesktop();
Page p=d.getPage(id);
Return p;
}
After doing all this I am getting componentnotfoundexception saying menu page not found.. I kindly request you to help me with this problem
Thanks in advance
↧
@BindingParam issue
Hello everyone,
I'm trying to make a simple tree like the example in ZkDemo : "Getting Started > Tree"
Everything is going fine from here until I tried to add a button at the end of each line in the resultGrid line.
I just try to get the click event on the "add cart button" but no matter what I do, in the @Command method "addToCart", "article" is always null !...
My zul :
And my View :
@VariableResolver(DelegatingVariableResolver.class)
public class ListeCatalogueServiceViewModel extends AbstractListeViewModel implements Serializable {
private static final long serialVersionUID = 1L;
@WireVariable
CatalogueService catalogueService;
private TreeModel catalogueTree;
private TreeitemRenderer catalogueTreeitemRenderer;
@Wire("#resultCatalogueServiceTreeGrid")
private Listbox resultGrid;
@AfterCompose
public void afterCompose(@ContextParam(ContextType.VIEW) Component view) {
Selectors.wireComponents(view, this, false);
}
@Init(superclass = true)
public void initTree() throws IOException {
Catalogue catalogue = catalogueService.findActif();
if (catalogue == null) {
Messagebox.show("Il n'existe pas de catalogue actif à afficher", "Erreur", Messagebox.OK, Messagebox.ERROR);
return;
}
initCatalogueTreeModel(catalogue);
}
public TreeModel getCatalogueTree() {
return catalogueTree;
}
public void setCatalogueTree(TreeModel catalogueTree) {
this.catalogueTree = catalogueTree;
}
private void initCatalogueTreeModel(Catalogue catalogue) throws IOException {
setCatalogueTree(new CatalogueTreeModel(getCatalogueTreeRoot(catalogue)));
}
private CatalogueTreeNode getCatalogueTreeRoot(Catalogue catalogue) throws IOException {
return catalogueService.getCatalogueTreeRoot(catalogue);
}
public TreeitemRenderer getCatalogueTreeitemRenderer() {
if (catalogueTreeitemRenderer == null) {
catalogueTreeitemRenderer = new TreeitemRenderer() {
@Override
public void render(Treeitem treeitem, CatalogueTreeNode catalogueTreeNode, int i) throws Exception {
Treerow dataRow = new Treerow();
dataRow.setParent(treeitem);
treeitem.setValue(catalogueTreeNode);
treeitem.setOpen(true);
Treecell treecellLabel = new Treecell(catalogueTreeNode.getLibelle());
dataRow.appendChild(treecellLabel);
dataRow.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
CatalogueTreeNode selectedNodeValue = ((Treeitem) event.getTarget().getParent()).getValue();
if (selectedNodeValue.getTypeCatalogueNode() == TypeCatalogueNode.FAMILLE) {
resultGrid.setModel(new ListModelList<>(((SousFamille) selectedNodeValue.getEntity()).getListeArticle()));
}
}
});
Treecell treecellNombreArticle = new Treecell(String.valueOf(catalogueTreeNode.getNombreArticle()));
dataRow.appendChild(treecellNombreArticle);
}
};
}
return catalogueTreeitemRenderer;
}
public void setCatalogueTreeitemRenderer(TreeitemRenderer catalogueTreeitemRenderer) {
this.catalogueTreeitemRenderer = catalogueTreeitemRenderer;
}
@Command
public void addToCart(@BindingParam("article") Article article) {
if (article == null) {
return;
}
}
}
I'm not new to ZK and I usually find what is wrong but here I'm stuck for hours looking on forum and so...:(
Thank you for your help !
↧
integerate zk into ofbiz
I want to integrate zk framework into ofbiz,It sames all right ,but it always display a tips 'processing...' for me .what I should get is a 'hello world'
I need some help,thank you!
↧
Menubar drop-down - arrow inside text
I've implemented a menubar with a menupopup and two menuitems. But now the arrow for the drop-down is inside my text, can someone help me fix this?
↧
↧
Problem with listbox selectedItem
I have this code in ZK:
And the idea is i have a list with users and if a click in a user, it have a collection of Mno, and when i open a new page all my Mno must to be load in a listbox, but the mno of the User must to be checked
And i have in Java a class with my viewModel, and is:
public class UserMno {
Collection mnoList;
Collection allMno = MnoDAO.getAllMnosByName();
public Collection getMnoList() {
return mnoList;
}
public void setMnoList(Collection mnoList) {
this.mnoList = mnoList;
}
public Collection getAllMno() {
return allMno;
}
public void setAllMno(Collection allMno) {
this.allMno = allMno;
}
@AfterCompose
public void initSetup(@ExecutionArgParam("mnoList") Collection mnoList) {
this.mnoList=mnoList;
}
}
And the java where i pass the user is:
@Command
public void showModal(@BindingParam("languageContributionStatus") UserStatus mnoList) {
//create a window programmatically and use it as a modal dialog.
final HashMap map = new HashMap();
setPickedItemSet(mnoList.getMnoList());
map.put("mnoList", mnoList.getMnoList());
win = (Window) Executions.createComponents("/com.gemalto.segmentation.web.users/CreateMnosUser.zul", null, map);
win.doModal();
}
UserStatus is a class with a collection of Mno, and when i select a user, my user is: mnoList.
Then The idea is:
I have a list of users in a page, and i need load a page, and in that page, i need load a list that the user mno that the user has associated.
But my listbox never load my collection with my selected item. And i do not know, what happen =(.
Can somebody help me?
↧
width binding in window
I have a window like:|
.
.
.
And i need spicify a width to the Window, but i need the width depending of a number in my model.
public class MainCpp {
int num = mmDAO.getnum();
//Getter and Setter
//Some Methods
.
.
.
}
Then i need the `width = "num px"` of my window camp;
When my view is open,
How can i do it?
↧
Content does not resize when splitter is dragged
How do I drag the splitter and have the context automatically resize? A label will resize but I grid will not. Why? What use is a splitter if I cannot drag it from one position to another. Please tell me I'm missing something.
http://zkfiddle.org/sample/3gphhgl/3-Hbox-Splitter-that-does-not-drag-when-populated-with-grids
↧
can zk support resizable window?
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3864817
By: nobody
when i create a window with overlap mold then i can move it,but i can not drag its border to resize it, and also there are no maxmize and minimize action.
↧
↧
Add RealTime Events in windows service
Hi forum,
I have a ZK Fingerprint device. I have developed a windows service to download attendance log from the device to a database.
I would like to use realtime events of SDK, like axCZKEM1_OnKeyPress and axCZKEM1_OnAttTransactionEx to write in the lcd of the device error message if the user doesn' click a specific botton (ex. F1 or F2) from the device, but the code written by me doesn' work.
I have defined the real time event on Start() event of service:
protected override void OnStart(string[] args)
{
eventLog1.WriteEntry("servizio gestione presenze avviato");
axCZKEM1 = new zkemkeeper.CZKEMClass();
IsConnected = axCZKEM1.Connect_Net("192.168.1.201", Convert.ToInt32(4370));
if (IsConnected)
{
iMachineNumber = 1;
_clickedKey = 0; //initialize variable that contain the button key clicked
//eventi real time
if (axCZKEM1.RegEvent(iMachineNumber, 65535))
{
* //eventi real time
this.axCZKEM1.OnKeyPress += new zkemkeeper._IZKEMEvents_OnKeyPressEventHandler(axCZKEM1_OnKeyPress);
this.axCZKEM1.OnAttTransactionEx += new zkemkeeper._IZKEMEvents_OnAttTransactionExEventHandler(axCZKEM1_OnAttTransactionEx);
this.axCZKEM1.OnNewUser += new zkemkeeper._IZKEMEvents_OnNewUserEventHandler(axCZKEM1_OnNewUser);*
}
}
}
Follow the events:
private void axCZKEM1_OnAttTransactionEx(string sEnrollNumber, int iIsInValid, int iAttState, int iVerifyMethod, int iYear, int iMonth, int iDay, int iHour, int iMinute, int iSecond, int iWorkCode)
{
eventLog1.WriteEntry("OnAttTransactionEx");
if (_clickedKey == 12 || _clickedKey == 13)
{
if (iWorkCode != 0)
{
if (axCZKEM1.ClearLCD())
{
axCZKEM1.RefreshData(iMachineNumber);//the data in the device should be refreshed
int iRow = 1;
int iCol = 1;
string sText1 = @"Errore";
string sText2 = @"CheckIn\Out";
axCZKEM1.WriteLCD(iRow, iCol, sText1);
axCZKEM1.WriteLCD(iRow + 1, iCol, sText2);
if (axCZKEM1.WriteLCD(iRow, iCol, sText1) && axCZKEM1.WriteLCD(iRow + 1, iCol, sText2))
{
axCZKEM1.RefreshData(iMachineNumber);//the data in the device should be refreshed
}
}
}
}
else
{
if (_clickedKey == 11 || _clickedKey == 14)
{
if (iWorkCode == 0)
{
if (axCZKEM1.ClearLCD())
{
axCZKEM1.RefreshData(iMachineNumber);//the data in the device should be refreshed
int iRow = 1;
int iCol = 1;
string sText1 = @"Errore";
string sText2 = @"Permesso";
axCZKEM1.WriteLCD(iRow, iCol, sText1);
axCZKEM1.WriteLCD(iRow + 1, iCol, sText2);
if (axCZKEM1.WriteLCD(iRow, iCol, sText1) && axCZKEM1.WriteLCD(iRow + 1, iCol, sText2))
{
axCZKEM1.RefreshData(iMachineNumber);//the data in the device should be refreshed
}
}
}
}
else
{
if (axCZKEM1.ClearLCD())
{
axCZKEM1.RefreshData(iMachineNumber);//the data in the device should be refreshed
int iRow = 1;
int iCol = 1;
string sText1 = @"Errore";
string sText2 = @"CheckIn\Out";
axCZKEM1.WriteLCD(iRow, iCol, sText1);
axCZKEM1.WriteLCD(iRow + 1, iCol, sText2);
if (axCZKEM1.WriteLCD(iRow, iCol, sText1) && axCZKEM1.WriteLCD(iRow + 1, iCol, sText2))
{
axCZKEM1.RefreshData(iMachineNumber);//the data in the device should be refreshed
}
}
}
}
_clickedKey = 0;
}
//When you press the keypad,this event will be triggered.
private void axCZKEM1_OnKeyPress(int iKey)
{
eventLog1.WriteEntry("OnKeyPress");
//memorizzo il tasto cliccato
this._clickedKey = iKey;
}
But none of this event works infact none of eventlog is written!
Why this happens?
The same code in a Windows application works fine, why?
Can help me please?
Thans a lot in advance!
↧
Use only Swipe-Event right-left
Hi all,
i have a tabbox with several tabpanels. I check the Swipe-Event for left and right swipe on every tabpanel and change the tabpanels when the Event is fired. Here is the code for a tabpanel:
public void onSwipe$tperg(SwipeEvent event) throws RemoteException {
SwipeEvent se = (SwipeEvent) event;
if (se.getSwipeDirection().equals("right"))
tbinfo.setSelected(true);
else if (se.getSwipeDirection().equals("left"))
tbsearch.setSelected(true);
}
On a tabpanel i have a grid. It is no longer possible to scroll the Grid vertically. Is it possible to ignore the up/down Event? I think that is the problem that it no longer works.
Regards Andi
↧
how to get rid of startpageing123.com redirect from browser
Someone can help me get rid of startpageing123.com site link from my Chrome browser? The annoying link always appears in the browser address bar every time I open the browser. I type www.google.com into the address bar to delete it but it comes back again. I don't know whether it is a malware that will damage my PC if I keep it on computer for a long time? There are many anti-malware programs (Malwarebytes Anti-Malware, SpyHunter, NOD32 Online Scanner,Adwcleaner,TDSSKiller, etc)claim to help remove the latest malware within a few steps. Which is more powerful and effective?
↧
zk combobox filtering option is not working inside listbox .
↧
↧
Not show borderlayout in Tabbox
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4779333
By: suharmono
I've created a tabbox and i want to include file zul in tabpaned but if i run in the browser the border layout not show..
what wrong with my code?
Code : main.zul
<tabbox width="100%" ><tabs><tab label="INBOX" image="img/16x16menu/received.png" width="150px"/><tab label="IM" image="img/16x16menu/articles.gif" width="150px"/><tab label="PEMBERITAHUAN" image="img/16x16menu/forums.gif"
width="150px"/><tab label="FORM" image="img/16x16menu/edit_f2.png" width="150px"/><tab label="REPORT" image="img/16x16menu/attendance.png"
width="150px"/><tab label="LOGOUT" image="img/16x16menu/download.gif" width="150px"/></tabs><tabpanels><tabpanel>
AAA</tabpanel><tabpanel><include id="mmfInbox" src="mmf_Inbox.zul" /> </tabpanel><tabpanel>This is panel C</tabpanel><tabpanel>This is panel D</tabpanel><tabpanel>This is panel E</tabpanel></tabpanels></tabbox>
Code : mmf_Inbox.zul
<zk><y:borderlayout xmlns:y="http://www.zkoss.org/2007/yui"><y:west><attribute name="config">
margins= '{1,5,5,1}', initialSize= 250, titlebar= true,
collapsible= true, animate= true, title='Mail'</attribute><y:nestedpanel><y:borderlayout><y:center autoScroll="true"><y:contentpanel fitToFrame="true"
onCreate="self.setResizeEl(wp)"><include id="wp" src="wp.zul" /></y:contentpanel></y:center><y:south><attribute name="config">
title=Calendar, collapsedTitle=Calendar,
split=true, initialSize= 180, minSize= 100,
maxSize= 200, autoScroll=true,
collapsible=true, titlebar= true</attribute><y:contentpanel><calendar width="200px" /></y:contentpanel></y:south></y:borderlayout></y:nestedpanel></y:west><y:center><attribute name="config">
titlebar= false, autoScroll=true, hideWhenEmpty=false,
useShim=true, tabPosition=top, resizeTabs=true</attribute><y:nestedpanel title="Tile Horizontally"><y:borderlayout><y:north><attribute name="config">
title=Inbox, collapsedTitle=Inbox,
split=true, initialSize= 250, minSize= 100,
maxSize= 300, autoScroll=true,
collapsible=true, titlebar= true</attribute><y:contentpanel fitToFrame="true"
onCreate="self.setResizeEl(hp)"><div id="hp"><y:grid columnhide="true" columnlock="true" model="@{mails}"
selectedItem="@{yselected}"><y:columns><y:column
sortAscending="${sendasc}" sortDescending="${senddsc}"
width="150px" label="Sender" /><y:column
sortAscending="${emailasc}" sortDescending="${emaildsc}"
width="250px" label="Email" /><y:column
sortAscending="${subjectasc}" sortDescending="${subjectdsc}"
width="450px" label="Subject" /></y:columns><y:rows><y:row self="@{each=ymail}"><y:label
value="@{ymail.sender}" /><y:label
value="@{ymail.email}" /><y:label
value="@{ymail.subject}" /></y:row></y:rows></y:grid></div></y:contentpanel></y:north><y:center autoScroll="true"><y:contentpanel fitToFrame="true" autoScroll="true"
onCreate="self.setResizeEl(hpi)"><include id="hpi" src="@{yselected.path}" /></y:contentpanel></y:center></y:borderlayout></y:nestedpanel></y:center></y:borderlayout></zk>
thanks
anton
↧
add script file bottom zul
I would like to use some extended template themes.
I need to add a javascript file to the bottom of the page. So what do I have to do.


↧
How to embed gwt page into zul?
I have created a simple GWT HTML page that looks like this :Title
...
...
Now I want to convert this page into zul. I've changed the extension into zul and added
namespace declarations in the and tag like this :
...
That works ok, but there's one small catch : whenever I want to load this zul, I have to refresh it manually (by hitting F5) in order for GWT part to start working. Chrome console will throw one error stating that search.nocache.js cannot be found (for some reason). When I refresh, everything is ok. I've also seen that jsessionid= is appended to nocache.js at the end, after ";", not sure if that's causing trouble or something else.
The reason why I embedded gwt into zul is because my web app was written in zk and I want to utilize gwt app and zk sessions.
Am I missing something here? Is there a better approach?
Please help.
↧