Quantcast
Channel: ZK Forum - Individual question feed
Viewing all 9640 articles
Browse latest View live

no placeholder for listbox "select" mold?

$
0
0
There is no placeholder attribute available for listbox "select" mold component. Kindly look help me out with this,I can't use combobox due to some reason.

Automation Testing tool

$
0
0
Hi I need to test Web Application developed using Zk Framework. I tried with Selenium, but does not recognize ZK components (ZUL components) on the webpage. the same thing for QTP. Please kindly let me know how to make these tools recognize Zk components (XUL). Is there any add-in?

Chosenbox Focus problem

$
0
0
Hi all. I have problem with Chosenbox. The function focus() not working. I use chosenbox in my App. When focus to Chosenbox and select an Item, it fire an event, and cause this chosenbox lost focus. Then I want set focus back to Chosenbox, so I call focus() function. But nothing happen, and I must press "TAB" key all around other component. Can anyone help?

zk ckeditor maximize button not working in IE-10

$
0
0
when we use in simple one page zul it's work. but when we use this in application it's getting issue in IE-10 look this video to find issue [here](http://www.youtube.com/watch?v=cb4hQgY1gDU)

zul.xsd is not complete

$
0
0
The schema in `www.zkoss.org/2005/zul/zul.xsd` does not seem complete . For instance : `` gives this error : `cvc-complex-type.2.4.a: Invalid content was found starting with element comboitem'. One of '{"www.zkoss.org/2005/zul":attribute, "www.zkoss.org/2005/zul":custom-attributes, "www.zkoss.org/2005/zul":variables, "www.zkoss.org/2005/zul":template, "www.zkoss.org/2005/zul":zk, WC[##other:"www.zkoss.org/2005/zul"]}' is expected. [20]` The App runs fine , I suppose it's just the schema that's incomplete. Without the template tag it validates fine. Is there any complete schema available ? Bart

iFrame / JasperReports: Popup-Window with PDF remains artifact in IE 10

$
0
0
We present PDFs, created with JasperReports, in a popup window using an IFrame. When this window is closed, the complete PDF content remains on screen. Reader 10.1.7 and IE 10: Artifact Reader 11.0.0 and IE 10: Artifact Reader 11.0.0 and IE 8: OK Reader 10.1.7 and chrome, Firefox: Ok So this seems to be an IE 10 problem, but any solution would be welcome. ZK Version is 6.5.3, our code: public class AmediaWindow extends Window { private Iframe iframe = new Iframe(); public AmediaWindow(AMedia amedia) { this.createWindow(amedia); } private void createWindow(final AMedia amedia) { this.setWidth("600px"); this.setHeight("500px"); this.setTitle("PDF " + LanguageController.getString("print")); this.setClosable(true); this.setSizable(true); this.iframe.setParent(this); this.iframe.setHflex("1"); this.iframe.setVflex("1"); this.iframe.setContent(amedia); } }

(Unexpected token < (SyntaxError)) on session timeout

$
0
0
Hi all. I'm using ZK 6.5.2 CE on a JBOSS 7 server. When the application session times out, I get the following error inside a browser popup window: >The server is temporarily out of service.
>Would you like to try again?
>(Unexpected token < (SyntaxError)) My zk.xml file is as follows: ajax/public/timeout.zul/public/css/mycss.cssorg.zkoss.zul.listbox.rightSelectfalse My JVM is: > java version "1.7.0_25"
> Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
> Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode) Any idea on how to solve the problem? Thanks in advance, Massimiliano

Getting the position of the Horizontal Scrollbar in a grid

$
0
0
Hi All, I have a grid displaying data ( spreadsheet ). I want to display the data by default at a particular position of a horizontal scrollbar of the grid which I am using. Can anyone please help me in solving it. In other words, I need the focus of the horizontal scrollbar at a particular position by default in a grid.

zk sessions are unserializable.

$
0
0
I have an application which uses Apache Shiro and ZK, and relies on EhCache for session persistence (to enable "Remember Me" functionality. I've followed all the guidelines, all my view models are Serializable, I've set ui-factory-class to org.zkoss.zk.ui.http.SerializableUiFactory in zk.xml but I'm still getting a ton of serialization errors. sep 06, 2013 11:54:59 AM org.zkoss.io.Serializables smartWrite:63 SEVERE: Unable to serialize entry: $BINDER$=org.zkoss.bind.AnnotateBinder@5f05bb5a 11:54:59.058 [shiro-active%0053ession%0043ache.data] ERROR n.s.e.store.disk.DiskStorageFactory - Disk Write of 517ba3d1-37b5-410d-b552-2fd367d688f7 failed: java.io.NotSerializableException: org.zkoss.util.logging.Log I imagine the same is an issue if running in a clustered environment. I am running zk 6.5.2-CE through Maven. Any help appreciated. Sorry for tagging this as a bug, but there were no other appropriate tags, and I don't have enough reputation to create new ones. *Additional info:* I just tried 7.0.0-preview with no luck.

RefWidget not found

$
0
0
Hi guys! I'm using ZK CE 6.0.2 and JBoss 7.1.1 Sometimes I have error alert in the browser(I've tested in Firefox, Chrome and IE 8): **RefWidget not found: sTyPi** It happens if I deploy application to remote server. It isn't reproduced on my local machine. I've found out a place where ZK throws the error(Widget.src.js): bind_: function () { var w = Widget.$(this.uuid); if (!w) { zk.error("RefWidget not found: " + this.uuid); return; } } During debugging both on local and remote application I have noticed that this error happens in case of ZK doesn't build DOM model based data from server(there are no errors in JS console). Before I ask for help I've googled this problem but I haven't got any hint besides API description. Please any help/suggestion will be very very valuable.

OSGi (ZK 6.5.1.1) Language not found for extension zul

$
0
0
I'm trying to use the ZK OSGi bundles in my custom container. If I use the normal version of ZK with classpaths I can execute the index.zul default example. When I try to use the OSGi version I get "Language not found for extension zul".

Binding problem after datebox modified by onChange event

$
0
0
Hi all, I have a problem with databinding if I modify the value of a dateBox on an onChangeEvent : zul file : VM : @Command @NotifyChange("dob") public void onAgeChange( @BindingParam("age") String strAge_P ,@BindingParam("dob") Datebox dtbxDOB_P){ Calendar cal = Calendar.getInstance(); Integer iCurrentYear = cal.get(Calendar.YEAR); Integer iAge = Integer.valueOf(strAge_P); Integer iDOBYear = iCurrentYear - iAge; Calendar calDOB = Calendar.getInstance(); calDOB.set(Calendar.YEAR, iDOBYear); calDOB.set(Calendar.DAY_OF_MONTH, 1); calDOB.set(Calendar.MONTH, 0); dtbxDOB_P.setValue(calDOB.getTime()); } The purpose is to set the date if the user enter the age, but the problem is that the modified date is not bound. Is anyone has an idea please ? Sorry for my english. Many Thanks !

how to get opened excel file name into my program zk spreadsheet

$
0
0
Hi ZK, i'm opening my existing file using import option of file menu.using import if i import a file called test.xls in my directory i am getting test-1378212138816.xls some time stamp is getting added here. how to get the file name into my java program that was updated? or how to know the currently opened file name that was showing in browser. i have used DesktopWorkbenchContext workbench = getDesktopWorkbenchContext(); String book_name=workbench.getWorkbookCtrl().getBookName(); if i display bookname i'm getting the original file name but not the updated one with time stamp. once i get the current file name i need to save the content into database this is my aim i have written the logic to store into db.this will be success if i get the current file name. with the help of forum i tried this but i got error. i have got null pointer exception when i have written the follwing piece of code Spreadsheet spreadsheet=new Spreadsheet(); String book_name=spreadsheet.getBook().getBookName(); please let me know where i'm wrong **second question is how to retain the same file even after refreshing the browser?** i have opened a file called test.xls. i have some modifications done i just refreshed the browser i got the default file that was there in index.zul file. so how to retain the same file even after refreshing the browser? **third question:** is there any detailed documentation for zk spreadsheet please post me some documents apart from those that are available on net. please reply me asap.. thanks siva prasad

ZK Custom Pagination and Sorting

$
0
0
Hello all, I am facing a very small but strange issue while working on Custom pagination and Sorting. Pagination and Sorting both works fine but the only problem is when I sort the data, result on a first page display in a reverse direction. e.g. I am on page 5 and clicked on header ID. **Descending Order Result** Data I am Expecting : 1260,1259,1258,1257,1256,1255...... Data it is showing right now: 1255,1256,1257,1258,1259,1260 **Icon on a header changed to descending...** **Ascending Order Result** Data I am Expecting : 1255,1256,1257,1258,1259,1260 Data it is showing right now: 1260,1259,1258,1257,1256,1255...... **Icon on a header changed to ascending...** I got redirected to very first page, which is fine. Once I sort the data and navigate to next page (Page #2) and come back to page #1 then everything is in a order the way I want..i.e. 1260,1259,1258,1257,1256,1255...... I am unable to understand what thing I am doing wrong while sorting. Please take a look at the code below and any suggestions will be highly appreciated. thanks ...Vish **TagsContoller.java** import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.List; import org.zkoss.lang.Strings; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.ext.AfterCompose; import org.zkoss.zul.Listbox; import org.zkoss.zul.Listcell; import org.zkoss.zul.Listhead; import org.zkoss.zul.Listheader; import org.zkoss.zul.Listitem; import org.zkoss.zul.Paging; import org.zkoss.zul.event.PagingEvent; public class TagsContoller extends SimpleWindow implements AfterCompose { /** * */ private static final long serialVersionUID = 1L; private final String LST_TAGS = "lstTags"; private final String PAG_TAGS = "pagTag"; private String ASCENDING = "ascending"; private String DESCENDING = "descending"; private String NATURAL = "natural"; private String DATE_FORMAT = "yyyy/MM/dd HH:mm:ss"; private boolean ascending = true; Listhead listhead; Listbox lstTags; private String getHeaderLabel(String label){ if(label != null && label.equalsIgnoreCase("Timestamp")){ return TagBlinkCache.TIMESTAMP_SEC_INDEX; }else if(label != null && label.equalsIgnoreCase("x")){ return TagBlinkCache.LOC_X_INDEX; }else if(label != null && label.equalsIgnoreCase("y")){ return TagBlinkCache.LOC_Y_INDEX; }else if(label != null && label.equalsIgnoreCase("z")){ return TagBlinkCache.LOC_Z_INDEX; }else if(label != null && label.equalsIgnoreCase("Exciter Id")){ return TagBlinkCache.STATION_ID_INDEX; }else{ return TagBlinkCache.TAG_ID_INDEX; } } public void redrawForAscDesc(String indexId){ List list1 = TagBlinkCache.getInstance().getList(indexId); Paging pag = getPaging(PAG_TAGS); pag.setTotalSize(list1.size()); final int PAGE_SIZE = pag.getPageSize(); // Show Listbox with first PAGE_SIZE redraw(0, PAGE_SIZE,list1,true); pag.setActivePage(0); } public void onSortEventListener(Event event) { final Listheader lh = (Listheader) event.getTarget(); final String sortDirection = lh.getSortDirection(); String indexId = ""; if (ASCENDING.equals(sortDirection)) { ascending = true; indexId = getHeaderLabel(lh.getLabel()); redrawForAscDesc(indexId); } else if (DESCENDING.equals(sortDirection) || NATURAL.equals(sortDirection) || Strings.isBlank(sortDirection)) { ascending = false; indexId = getHeaderLabel(lh.getLabel()); redrawForAscDesc(indexId); } } @SuppressWarnings("unchecked") public void afterCompose() { lstTags = getListbox(LST_TAGS); Listhead listhead = lstTags.getListhead(); List list = listhead.getChildren(); for (Object object : list) { if (object instanceof Listheader) { Listheader lheader = (Listheader) object; if (lheader.getSortAscending() != null || lheader.getSortDescending() != null) { lheader.addEventListener("onSort", new EventListener() { public void onEvent(Event event) { onSortEventListener(event); } }); } } } String indexId = "tagId_INDEX"; final List list1 = TagBlinkCache.getInstance().getList(indexId); Paging pag = getPaging(PAG_TAGS); pag.setTotalSize(list1.size()); final int PAGE_SIZE = pag.getPageSize(); // Show Listbox with first PAGE_SIZE redraw(0, PAGE_SIZE,list1,false); pag.addEventListener(org.zkoss.zul.event.ZulEvents.ON_PAGING, new EventListener() { public void onEvent(Event event) { PagingEvent pe = (PagingEvent) event; int pgno = pe.getActivePage(); int ofs = pgno * PAGE_SIZE; // Redraw current paging redraw(ofs, PAGE_SIZE,list1,false); } }); } private void redraw(int firstResult, int maxResults, List list1,boolean sorting) { RangeFinder.Range range; List subList; synchronized (list1) { range = RangeFinder.findRange(list1, firstResult, maxResults, ascending); try { subList = list1.subList(range.getFromIndex(), range.getToIndex()); } catch (IndexOutOfBoundsException e) { subList = new ArrayList(); } } Listbox lst = getListbox(LST_TAGS); lst.getItems().clear(); SimpleDateFormat df = new SimpleDateFormat(DATE_FORMAT); for (TagBlink tagBlink : subList) { Listitem li = new Listitem(); li.setValue(tagBlink); li.appendChild(new Listcell("" + tagBlink.getSource())); li.appendChild(new Listcell(tagBlink.getFormat())); li.appendChild(new Listcell(tagBlink.getId())); li.appendChild(new Listcell(tagBlink.getX()+"")); li.appendChild(new Listcell(tagBlink.getY()+"")); li.appendChild(new Listcell(tagBlink.getZ()+"")); li.appendChild(new Listcell(tagBlink.getBattery()+"")); li.appendChild(new Listcell(tagBlink.getStationId()+"")); li.appendChild(new Listcell(tagBlink.getStatus()+"")); Date date = new Date(tagBlink.getTimestampMillis()); li.appendChild(new Listcell(df.format(date))); lst.appendChild(li); } } } **tags.zul**
p.s. I debugged the code and also put Sys.out when it fill the list..it is filling the list in a correct order but while displaying on a page(.zul) it just comes out in a reverse order. Is this because I am having sort="auto" or ZUL page?

when can the ZK mobile edition be released?

$
0
0
Orignial message at: https://sourceforge.net/forum/message.php?msg_id=3910192 By: nobody Hi, I am using the ZK framework, and I also want to construct the applicaiton in mobile env. So how about the ZK mobile edition and when can it be finished?

ZK setWidgetAttribute() method issue?

$
0
0
I worked with Rapid Spell Checker+ZK Integration and in ZUL i have to do following.. If i am using above code everything working fine. But when i am using `setWidgetAttribute()` method in Datebox Extend Class the same thing not working. public class MyDatebox extends Datebox { private static final long serialVersionUID = 1L; private boolean mandatory; public AmandaDatebox() { setFormat(CsdcUtility.getDateFormat()); setWidgetAttribute("d:nospell" , "true"); } } In this case i have removed the `d:nospell='true'` from the ZUL page becuase DateBox Component already have this defined in Java Class. But now in this it is not working . If i will use `d:nospell='true'` in zul i have to write same attribute with each datebox component in each zul page ,so overcome this issue i was trying Java class way. But no any success .Can anyone know what i am doing wrong here?

Textbox 多行問題 急需

$
0
0
請問我目前Textbox例如有設定rows="4" cols="35" 且css有設定英文自動斷行,但因為css的自動斷行並沒有補換行符號。 我的需求是他如果設定rows="4"就真的只能輸入4行。若超過就要拋警訊。 但若Css沒有補換行符號時,我有辦法抓到目前該Textbox內有幾Row的資料嗎?? 麻煩各位了...

Date box with mask and water mark

$
0
0
Hi By Extending ZK Textbox, i have created date box which will have masking and water mark for the date field. You can see the example here http://emrpms.blogspot.in/2012/07/my-date-box-component.html

ZK 5.0.9 + Javascript

$
0
0
Hi guys, I'd like to close a zul page, i.e. registration form page. I'm trying to use this code: in my zul page: Clients.evalJavaScript("chiudi()");

onBlur event is not sent when clicking on a Html component

$
0
0
Hey all, I'm having a problem that I'm struggling to fix for quite some time. I have an Html component with an OpenLayers map and a textbox that it's value is going to be persisted on a database when it's onBlur event arrives. The problem is that everytime that I click on the map the onBlur event is not sent. This behavior doesn't happen if I perform the same action on textbox's container. Anyone have any ideia about what it could be? Thanks in advance! Cheers
Viewing all 9640 articles
Browse latest View live