Directory

← Back

Toolkit Productivity Tools

Productivity helper library for fast day-to-day vaadin-based apps development

Author

Rating

Popularity

<100

Toolkit Productivity Tools is an pure server-side extension to a great server-side rich UI Vaadin framework, providing extra collection of common patterns, widgets and utilities you usually use in almost any vaadin-based web application. This library aims to help you save development time by reusing most commonly used patterns and things:

  • Built-in fast PDF viewer - let your application users to browse thousands of pages PDF documents even without downloading them to local computer - pages are displayed online as per reading. See the on-line demo for details !

  • Built-in ThreadLocal pattern allows to get your app instance from any piece of code, even from spawned threads via simple getTPTApplication static call.

  • Built-in internationalization support (i18n) - make your app messages and custom layout files internatioalized in seconds. Moreover, i18n files are based on standard java property files, not limited in count and structure and resides in your theme folder for easy editing even in a running deployed app !

  • Built-in views-based navigational component allows you to create iphone-os-like views and naviagte between them either programmatically or manually via URL - built-in support for URIFragmentUtility is present ! You can even pass parameters to your views and let your views to listen to navigation events !

  • Built-in wrapper for lazy loading or long initializing views or components, easily letting developer to avoid client browser stucks and red wheel of death ;)

  • Built-in standard dialogs - message dialog, confirmation dialog, question dialog, download dialog and custom dialog - created and invoked with a single statement !

  • Several small but useful widgets to save your coding time: captcha component, sizer to quickly insert dynamic margins, message panel, lazy loading panel

  • Easy to use - even no widgetset compilation required - all code is server-side only.

TPT has no external dependencies except as for PDF viewer, where open source edition of IcePDF is used internally for page rendering.

TPT is also a pure server-side - it does not contain any custom widgetsets - just a server-side .jar file. This is especially important for those who does not use Eclipse and do not have automatic widgetset compilation feature.

Sample code

/** provide translation files in standard java .property files in your theme folder **/
main.windows.logo=TPT
main.window.version=Version %s
developer.handbook=Download developer book



/** use translations in your app code **/
Label h1 = new Label ( TM.get ( "main.window.logo") );
h1.setStyleName ( "h1" );

Label h2 = new Label ( TM.get("main.window.version", "1.1") );
Link manual = new Link ( TM.get("developer.handbook"), new ThemeResource ( "files/handbook.pdf" ) );
DocumentViewer viewer = new DocumentViewer();
viewer.loadDocument ( new PdfDocument ( new File ( "/path/to/doc.pdf" ) ) );

addComponent ( viewer );
addComponent ( new TPTMessagePanel ( "Hello World !" ) );
final OptionDialog dlg = new OptionDialog ( TPTApplication.getCurrentApplication () );

dlg.showMessageDialog ( "Hello", "That's a deal. Period.", new OptionDialog.OptionDialogResultListener () 
{
  public void dialogClosed ( OptionKind closeEvent )
  {
    TPTApplication.getCurrentApplication ().getMainWindow ().showNotification ( "That's a deal !");
  }
});
final OptionDialog dlg = new OptionDialog ( TPTApplication.getCurrentApplication () );

dlg.showConfirmationDialog ( "Attention please !", "Are you sure to exit ?", new OptionDialog.OptionDialogResultListener () 
 {
  public void dialogClosed ( OptionKind closeEvent )
  {
    TPTApplication.getCurrentApplication ().getMainWindow ().showNotification ( "TYou answered: " + closeEvent.name ());
  }
});

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

  • new PDF Document Viewer component - view hugePDF files online with just a coupe lines of code
  • new TPTMessagePanel utility component to quickly add V/H centered labels
  • updated I18N module, now allows to use formatted strings in TM.get("key.name", "format") like in String.format(...)
  • numerous of fixes and code cleanups
  • aligned with Vaadin 6.3
  • as usual - server-only addon, no custom widgetset compilation required
Released
2010-04-19
Maturity
STABLE
License
Apache License 2.0

Compatibility

Framework
Vaadin 6.3+
Vaadin 6.2+ in 1.0.0
Vaadin 6.5+ in 1.2.0
Browser
N/A

Vaadin Add-on Directory

Find open-source widgets, add-ons, themes, and integrations for your Vaadin application. Vaadin Add-on Directory
The channel for finding, promoting, and distributing Vaadin add-ons.
Online