Sources are also there, so feel free to clone/download.
A couple of notes:
there is no new buildscript yet - project is being transferred to github and restructured
there is no support for PDF viewer as I decided to move it to a separate addon in order to kill any third-party libs deps from TPT and make PDF viewer project are full powered standalone project (a more features are going to be added). So in case you depends on PDF viewer, I suggest to wait a day more - it will be published as soon as tpt transition is complete.
do you have a Vaadin 6.5.0 compatible version of TPT Toolkit?
The only links I found are broken.
The dialogs don’t seem to work with 6.5.0. From combing the forums there was a suggest of just recompiling the TPT sources against Vaadin 6.5.2. However this did not resolve the issue for me.
Yep, you can catch latest sources from the google code project site. This TPT works fine with Vaadin 6.5
Actually, I was trying to push an update to the addons section but stuck with some packaging errors and then was disrupted by other activities.
As you’re modifying UI in a separate thread, your client side need to be synchronized. If you press refresh button i na browser, client side will do a roundtrip to the server and reflect updated state. So you probably need to add some kind of refresher component or indeterminate progress indicator with polling interval enabled in order to automatically receive all separate thread ui chnages
Hello! I have been looking for a loader add-on for use in my application and came across this. I am using Navigator7 for my application and have quite a few pages. One of my pages has a UI that displays quite a few components and one of those components is a table that performs a database lookup and fetches quite a few results. I’d like to display the loader while that process is happening. My table is populated in a private class that extends customcomponent and is placed in a splitpanel. I tried to implement the LazyLoader and called:
splitPanel.setSecondComponent(new TPTLazyLoadingLayout ( new MyTableComponent(), true));
but I am getting a NullPointerException for that call. Any ideas of what I have done wrong? I have tried extending VerticalLayout instead, but I get the same results. It needs to be a private class for filtering calls and needs access to the parent class. If I remove the TPTLazyLoadingLayout and just call new MyTableComponent(), everything works fine, but obviously there is a delay.
First of all thanks a lot for the work!
I’m new to Vaadin and looking to all the feature that I need for my web site and your add-on will help me a lot!
But I’m actually facing a difficulty to use the PDFViewer feature, I don’t know if it’s the good place to post (is there a dedicated place for problem using your add on?)
I’m using the last Vaadin built 6.6.2, I add tpt-core, icepdf-core, icepdf-pro, and icepdf-pro-intl in my library and buildpath.
And my code is the following :
DocumentViewer viewer = new DocumentViewer();
viewer.loadDocument ( new PdfDocument ( new File ( myFilePath) ) );
System.out.println("Pages pdf : " + viewer.getPagesCount());
VerticalLayout myTabCoursPDF = new VerticalLayout();
myTabCoursPDF.addComponent(viewer);
tabsheet.addTab(myTabCoursPDF);
And this tabsheet is added in my mainWindow.
So the following code allow me to show the first page of the PDF, but when I try to scroll down on other pages I got an error :
java.lang.NullPointerException
at com.vaadin.terminal.StreamResource.<init>(StreamResource.java:87)
at eu.livotov.tpt.gui.vdv.core.SinglePageDocumentRenderer.generateCell(SinglePageDocumentRenderer.java:116)
at com.vaadin.ui.Table.refreshRenderedCells(Table.java:1572)
at com.vaadin.ui.Table.enableContentRefreshing(Table.java:2313)
at com.vaadin.ui.Table.changeVariables(Table.java:2159)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1299)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1219)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:735)
at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:317)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
18 juin 2011 10:52:44 com.vaadin.Application terminalError
GRAVE: Terminal error:
java.lang.NullPointerException
at com.vaadin.terminal.StreamResource.<init>(StreamResource.java:87)
at eu.livotov.tpt.gui.vdv.core.SinglePageDocumentRenderer.generateCell(SinglePageDocumentRenderer.java:116)
at com.vaadin.ui.Table.refreshRenderedCells(Table.java:1572)
at com.vaadin.ui.Table.enableContentRefreshing(Table.java:2313)
at com.vaadin.ui.Table.changeVariables(Table.java:2159)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1299)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1219)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:735)
at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:317)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
18 juin 2011 10:52:44 com.vaadin.Application terminalError
GRAVE: Terminal error:
java.lang.ArrayIndexOutOfBoundsException: 1
at com.vaadin.ui.Table.paintContent(Table.java:2496)
at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:755)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.writeUidlResponce(AbstractCommunicationManager.java:954)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.paintAfterVariableChanges(AbstractCommunicationManager.java:841)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:767)
at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:317)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Hi Dimitri, thank you for the plug in…
however I found a problem in the captcha widget, probably due to JPEGImageEncoder that is incompatible with openJDK 6.
Hi Antonio,
thanks for the bug ! Im trying to make a release of v2.0 of TPT, so will add this fix as well. Unfortunately takes longer than expected due to a lot of main job projects this summer.
Hi Audric,
this is very strange. It seems PDF file was opened as you was able to see the first page. Is your PDF ok, maybe icepdf stucks with it ?
Anyways, could you try a newer version of pdf viewer - it was removed from upcoming tpt v2.0 to a separate stand-alone project, will be released as add-on
in a couple of days or so, but for now you can just get the sources -
http://code.google.com/p/tdv/ - will this work better for your pdf or not ?
Scott, sorry for late response, it seems my account was somehow unsubscribed from this topic. Subscribed it back again.
Do you still having problems with this issue ? If so, could you please show a full stacktrace of your NPE ?
Can TPT support multiple tabs in a browser somehow? I use the ThreadLocal pattern which comes with TPT so I don’t know how to combine it with the wiki article:
Support Multiple Tabs
It seems nothing prevents you to use the mentioned technique for multi-tab support with TPT. You still have the MyApplication class which just extends TPTApplication instead of Application, so feel free to override getWindow() there as described and do the other stuff as well. Or you just tried and there were problems ?
P.S Just did not use multi-tab support yet in any of my app, so never tried this technique with TPT, but of there are any problems with this, just let me know, will be happy to fix.
P.S.2. It seems, something broken with the forum or liferay, still not getting any topic updates Im subscribed to…
This is a bug in Liferay, with subscriptions getting deleted in some situations - see
this thread . It looks like it has just been fixed in the latest Liferay builds, but I am not sure when we will have such a version in use.
The problem I am facing is to get access to the actual window for each session (in this case each browser tab). Deep in the application I call the famous
TPTApplication.getCurrentApplication()
Then I need to access the current visible window
[code]
public Window getWindow(String name) {
…
}
/* anywhere in the application i would like to get
the window of the current visible browser tab */
((MyTPTApplication)MyTPTApplication.getCurrentApplication()).getWindow(xxx)
[/code]How would I get the name for the current window from anywhere in the application?
I also implemented the ThreadLocal pattern in the main window class.
public static class MyWindow extends Window implements ParameterHandler, HttpServletRequestListener {
private static ThreadLocal<MyWindow> threadLocal = new ThreadLocal<MyWindow>();
....
}
So to get there I need to through following steps or am I missing something?
getCurrentApplication → getWindow by name → getInstance of MyWindow