HandyTapestry
This plugin for IntelliJ Idea 6.0 helps to develop Tapestry web application faster and provides following features:
- Code completions in the HTML template
- Navigations from HTML template to the Java code
- Create Tapestry component dialog
- Delete component action
- OGNL expressions syntax and error highlighting
- Component types, listeners, message keys, page names error highlighting
- Switch between component class and template (Ctrl-Alt-W)
- Page structure tool window
Code completions in the HTML template
The plugin adds helpful completions in the HTML template:
- jwcid attribute value (component type, component reference)
- component parameter names
- OGNL expressions
- listener name
- page attribute value
- asset
- message key
- key attribute value
- constant in OGNL
- component: expression
Navigations from HTML template to the Java code
Also the plugin adds navigations from HTML template to the Java code:
- jwcid attribute value (component type, component reference)
- OGNL expressions
- listener name
- page attribute value
- script attribute value
- asset
- message key
- key attribute value
- constant in OGNL
- component: expression
Create Tapestry component dialog
To create a Tapestry component please do the actions below:- Right click on folder or package in the project view and invoke context menu:
- Select the New / Create Tapestry component menu item.
- Enter a component name:
The component name is Java identifier, or starts with letter, contains letters and digits. Therefore the name can't include slashes and dots.
Component folder is optional. For example, if you entered UserTable name and didn't select component folder then your component resides in the component root and reference to the component is "UserTable". If the name is CreateAdmin and subfolder is admins then component is resides in the admins subfolder of the component root and the reference is "admins/CreateAdmin".
Delete component action
Right click on component class or template and choose "Delete component" action. Confirm deletion and the action deletes all component files: specification, class, template, script and properties.Installation instructions
- Download the HandyTapestry.jar
- Put the plugin jar into the
idea_home/plugins
folder - Restart Idea
- Open web project and press yes in the "Enable tapestry support?" dialog
- Choose the HandyTapestry license* in the license dialog
Tapestry project structure
The Tapestry component consists from:- Java class (with properties and listener methods)
- Template (HTML file)
- Specification (jwc extension, defines component class)
- Properties file (localized strings)
- Script file (script extension)
MY_PROJECT PAGE_ROOT COMPONENT_ROOT EditGroup.html EditGroup.jwc EditGroup.properties EditGroup.script Home.html WEB-INF Home.properties Home.script ...The future versions may support other project structures. You can change template, specification and script extensions in the release version.
** Plugin doesn't support page specification yet
Plugin configuration
Go to Settings and open HandyTapestry configuration:
Please select page, component and WEB-INF folders (for details see Tapestry project structure). Also you can select packages for component and page classes.
If you add component libraries to the project through application file:
then specify application file location.
<library id="contrib"
specification-path="/org/apache/tapestry/contrib/Contrib.library"/>