See also the Isis Addons Excel module, which allows programmatic export and import, eg to support bulk updating/inserting.
The module contributes an additional "view" for both standalone and parented collections:
For example, assuming some fixtures have been installed:
Then the standalone collection of all incomplete todo items shows an additional link to select the excel view:
In both cases this view is simply a button to download the collection as an Excel spreadsheet:
And the spreadsheet contains the contents of the collection:
How to run the Demo App
The prerequisite software is:
- Java JDK 8 (>= 1.9.0) or Java JDK 7 (<= 1.8.0)
- maven 3 (3.2.x is recommended).
To build the demo app:
git clone https://github.com/isisaddons/isis-wicket-excel.git mvn clean install
To run the demo app:
mvn antrun:run -P self-host
Then log on using user:
How to configure/use
You can either use this extension "out-of-the-box", or you can fork this repo and extend to your own requirements.
To use "out-of-the-box", simply add this component to your classpath, eg:
<dependency> <groupId>org.isisaddons.wicket.excel</groupId> <artifactId>isis-wicket-excel-cpt</artifactId> <version>1.8.0</version> </dependency>
Check for later releases by searching Maven Central Repo.
You should then find that a new view is provided for all collections of entities (either as returned from an action, or as a parented collection), from which a link to download the spreadsheet can be accessed. Check for later releases by searching Maven Central Repo.
If you want to use the current
-SNAPSHOT, then the steps are the same as above, except:
- when updating the classpath, specify the appropriate -SNAPSHOT version:
- add the repository definition to pick up the most recent snapshot (we use the Cloudbees continuous integration service). We suggest defining the repository in a
<profile> <id>cloudbees-snapshots</id> <activation> <activeByDefault>true</activeByDefault> </activation> <repositories> <repository> <id>snapshots-repo</id> <url>http://repository-estatio.forge.cloudbees.com/snapshot/</url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> </profile>
Forking the repo
If instead you want to extend this component's functionality, then we recommend that you fork this repo. The repo is structured as follows:
pom.xml- parent pom
cpt- the component implementation
fixture- fixtures, containing sample domain object classes and fixture scripts
webapp- demo webapp (see above screenshots)
cpt project is released to Maven central. The versions of the other modules
are purposely left at
0.0.1-SNAPSHOT because they are not intended to be released.
See also the Excel module, which provides programmatic ability to export or import objects to/from an Excel spreadsheet.
1.8.0- released against Isis 1.8.0
1.7.0- released against Isis 1.7.0
1.6.1- (breaking change) changed package names for API to
1.6.0- re-released as part of isisaddons, changed package names for API to
Copyright 2013~2015 Dan Haywood Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
In addition to Apache Isis, this component depends on:
org.apache.poi:poi(ASL v2.0 License)
org.apache.poi:poi-ooxml(ASL v2.0 License)
org.apache.poi:poi-ooxml-schemas(ASL v2.0 License)
Maven deploy notes
cpt module is deployed, and is done so using Sonatype's OSS support (see
Release to Sonatype's Snapshot Repo
To deploy a snapshot, use:
pushd cpt mvn clean deploy popd
The artifacts should be available in Sonatype's Snapshot Repo.
Release to Maven Central
release.sh script automates the release process. It performs the following:
- performs a sanity check (
mvn clean install -o) that everything builds ok
- bumps the
pom.xmlto a specified release version, and tag
- performs a double check (
mvn clean install -o) that everything still builds ok
- releases the code using
mvn clean deploy
- bumps the
pom.xmlto a specified release version
sh release.sh 1.9.0 \ 1.10.0-SNAPSHOT \ email@example.com \ "this is not really my passphrase"
$1is the release version
$2is the snapshot version
$3is the email of the secret key (
~/.gnupg/secring.gpg) to use for signing
$4is the corresponding passphrase for that secret key.
Other ways of specifying the key and passphrase are available, see the
If the script completes successfully, then push changes:
git push origin master git push origin 1.9.0
If the script fails to complete, then identify the cause, perform a
git reset --hard to start over and fix the issue
before trying again. Note that in the
nexus-staging-maven-plugin has the
autoReleaseAfterClose setting set to
true (to automatically stage, close and the release the repo). You may want
to set this to
false if debugging an issue.
According to Sonatype's guide, it takes about 10 minutes to sync, but up to 2 hours to update search.