2
0
Fork 0

Added pdf export support, export servlet support, renamed frontends

without s and made vasc config object.
This commit is contained in:
Willem Cazander 2012-05-12 17:26:21 +02:00
parent efcbdbd519
commit b3923bd2fb
160 changed files with 5001 additions and 2552 deletions

View file

@ -15,5 +15,6 @@
<module>vasc-demo-tech-editor</module>
<module>vasc-demo-tech-web</module>
<module>vasc-demo-tech-ui</module>
<module>vasc-demo-tech-core</module>
</modules>
</project>

View file

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>vasc-demo-tech-core</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,19 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>vasc-demo-tech</artifactId>
<groupId>net.forwardfire.vasc.demo</groupId>
<version>0.3.5-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>vasc-demo-tech-core</artifactId>
<name>vasc-demo-tech-core</name>
<description>vasc-demo-tech-core</description>
<dependencies>
<dependency>
<groupId>net.forwardfire.vasc</groupId>
<artifactId>vasc-core</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>

View file

@ -0,0 +1,42 @@
/*
* Copyright 2007-2012 forwardfire.net All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
* the following disclaimer in the documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.forwardfire.vasc.demo.tech.core;
import net.forwardfire.vasc.core.VascController;
import net.forwardfire.vasc.core.VascControllerProvider;
/**
* DemoVascControllerProvider gets the static local jvm vasc controller for this tech demo.
*
* @author Willem Cazander
* @version 1.0 May 12, 2012
*/
public class DemoVascControllerProvider implements VascControllerProvider {
/**
* @see net.forwardfire.vasc.core.VascControllerProvider#getVascController()
*/
public VascController getVascController() {
return DemoVascManager.getVascControllerStatic();
}
}

View file

@ -0,0 +1,128 @@
/*
* Copyright 2007-2012 forwardfire.net All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
* that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
* following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
* the following disclaimer in the documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.forwardfire.vasc.demo.tech.core;
import java.io.File;
import java.io.FileOutputStream;
import java.util.logging.Logger;
import net.forwardfire.vasc.core.VascController;
import net.forwardfire.vasc.core.VascEntryConfigController;
import net.forwardfire.vasc.core.VascEntryControllerLocal;
import net.forwardfire.vasc.core.VascException;
import net.forwardfire.vasc.impl.DefaultVascFactory;
import net.forwardfire.vasc.impl.entry.export.VascEntryExporterJR4O;
import net.forwardfire.vasc.impl.x4o.VascParser;
import net.forwardfire.vasc.lib.jr4o.JR4ODesignManager.JRExportType;
/**
* DemoVascManager manages the dynamic vasc controller for tech demo.
*
* @author Willem Cazander
* @version 1.0 May 12, 2012
*/
public class DemoVascManager {
private Logger logger = null;
static private VascController vascController = null;
public DemoVascManager() {
logger = Logger.getLogger(DemoVascManager.class.getName());
}
public void start() {
logger.finer("Starting vascmanager");
if (vascController!=null) {
throw new RuntimeException("VascManager is already started.");
}
try {
vascController = DefaultVascFactory.getDefaultVascController(2288L,"forwardfire.net","user","admin");
VascEntryConfigController vecc = vascController.getVascEntryConfigController();
// Config all report export engines for demo.
vecc.addVascEntryExporter(new VascEntryExporterJR4O("jrPdfLandscape",JRExportType.PDF,"generic-landscape","net/forwardfire/vasc/lib/jr4o/reports/dynamic-reports.xml"));
vecc.addVascEntryExporter(new VascEntryExporterJR4O("jrPdfPortrait",JRExportType.PDF,"generic-portrait","net/forwardfire/vasc/lib/jr4o/reports/dynamic-reports.xml"));
vecc.addVascEntryExporter(new VascEntryExporterJR4O("jrRtf",JRExportType.RTF,"generic-landscape","net/forwardfire/vasc/lib/jr4o/reports/dynamic-reports.xml"));
vecc.addVascEntryExporter(new VascEntryExporterJR4O("jrXls",JRExportType.XLS,"generic-landscape","net/forwardfire/vasc/lib/jr4o/reports/dynamic-reports.xml"));
vecc.addVascEntryExporter(new VascEntryExporterJR4O("jrXml",JRExportType.XML,"generic-landscape","net/forwardfire/vasc/lib/jr4o/reports/dynamic-reports.xml"));
vecc.addVascEntryExporter(new VascEntryExporterJR4O("jrCsv",JRExportType.CSV,"generic-landscape","net/forwardfire/vasc/lib/jr4o/reports/dynamic-reports.xml"));
// Config root bundle to load all resources.
vecc.setResourceBundle("net.forwardfire.vasc.lib.i18n.bundle.RootApplicationBundle");
// Config some defaults
vecc.setDefaultPageSize(200);
vecc.setDefaultPageSizeMax(1500);
initEditor();
} catch (VascException e) {
throw new RuntimeException(e);
}
}
public void stop() {
vascController = null;
logger.info("Stop manager, cleared all.");
}
private void initEditor() {
try {
VascParser parser = new VascParser(vascController);
parser.addGlobalELBean("vascController", vascController);
parser.parseResource("net/forwardfire/vasc/editor/vasc-edit.xml");
DefaultVascFactory.fillVascControllerLocalEntries((VascEntryControllerLocal) vascController.getVascEntryController(), vascController);
} catch (Exception e) {
e.printStackTrace();
}
}
public void openFile(File file) {
logger.info("Vasc open file: "+file.getAbsoluteFile());
try {
VascParser parser = new VascParser(vascController);
File f = File.createTempFile("test-vasc", ".xml");
parser.setDebugOutputStream(new FileOutputStream(f));
parser.parseFile(file);
DefaultVascFactory.fillVascControllerLocalEntries((VascEntryControllerLocal) vascController.getVascEntryController(), vascController);
} catch (Exception e) {
e.printStackTrace();
}
}
public VascController getVascController() {
return vascController;
}
/**
* Needed for the provider interface
* @return
*/
static protected VascController getVascControllerStatic() {
return vascController;
}
}

View file

@ -21,6 +21,11 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.forwardfire.vasc.demo</groupId>
<artifactId>vasc-demo-tech-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>net.forwardfire.vasc.demo</groupId>
<artifactId>vasc-demo-tech-editor</artifactId>
@ -30,7 +35,15 @@
<groupId>net.forwardfire.vasc.demo</groupId>
<artifactId>vasc-demo-tech-web</artifactId>
<version>${project.version}</version>
<!-- <type>war</type> -->
<type>war</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.forwardfire.vasc.demo</groupId>
<artifactId>vasc-demo-tech-web</artifactId>
<version>${project.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.forwardfire.vasc</groupId>
@ -47,6 +60,16 @@
<artifactId>vasc-frontend-web-jsf</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>net.forwardfire.vasc</groupId>
<artifactId>vasc-frontend-web-export</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>net.forwardfire.vasc</groupId>
<artifactId>vasc-frontend-cxf-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>net.forwardfire.vasc</groupId>
<artifactId>vasc-backend-ldap</artifactId>

View file

@ -42,13 +42,14 @@ import org.jdesktop.application.FrameView;
import org.jdesktop.application.SingleFrameApplication;
import net.forwardfire.vasc.core.VascController;
import net.forwardfire.vasc.demo.tech.core.DemoVascManager;
import net.forwardfire.vasc.demo.tech.ui.components.JMainPanel;
import net.forwardfire.vasc.demo.tech.ui.components.JMainPanelMenuBar;
public class TechUI extends SingleFrameApplication {
private Logger logger = null;
private VascManager vascManager = null;
private DemoVascManager vascManager = null;
private TomcatManager tomcatManager = null;
static public void main(String[] args) {
@ -129,7 +130,7 @@ public class TechUI extends SingleFrameApplication {
long startTime = System.currentTimeMillis();
setupLogging();
logger.info("Starting Vasc-Demo-Tech-UI.");
vascManager = new VascManager();
vascManager = new DemoVascManager();
vascManager.start();
autoLoadVasc();
@ -180,7 +181,7 @@ public class TechUI extends SingleFrameApplication {
return getInstance(TechUI.class);
}
public VascManager getVascManager() {
public DemoVascManager getVascManager() {
return vascManager;
}

View file

@ -1,8 +1,5 @@
package net.forwardfire.vasc.demo.tech.ui;
import java.io.File;
import java.io.FileOutputStream;
import java.lang.reflect.Method;
import java.util.logging.Logger;
import org.eobjects.metamodel.DataContext;
@ -17,118 +14,28 @@ import net.forwardfire.vasc.core.VascController;
import net.forwardfire.vasc.core.VascEntry;
import net.forwardfire.vasc.core.VascEntryControllerLocal;
import net.forwardfire.vasc.core.VascEntryField;
import net.forwardfire.vasc.core.VascException;
import net.forwardfire.vasc.core.VascLinkEntry;
import net.forwardfire.vasc.core.VascLinkEntryType;
import net.forwardfire.vasc.demo.tech.ui.components.JMainPanel;
import net.forwardfire.vasc.impl.DefaultVascEntry;
import net.forwardfire.vasc.impl.DefaultVascEntryField;
import net.forwardfire.vasc.impl.DefaultVascFactory;
import net.forwardfire.vasc.impl.DefaultVascLinkEntry;
import net.forwardfire.vasc.impl.ui.VascSelectItemModelEntry;
import net.forwardfire.vasc.impl.x4o.VascParser;
public class VascManager {
public class VascAutoSchemaMetaModel {
private Logger logger = null;
private VascController vascController = null;
public VascManager() {
logger = Logger.getLogger(VascManager.class.getName());
public VascAutoSchemaMetaModel(VascController vascController) {
logger = Logger.getLogger(VascAutoSchemaMetaModel.class.getName());
this.vascController=vascController;
}
public void start() {
logger.finer("Starting vascmanager");
try {
vascController = DefaultVascFactory.getDefaultVascController(2288L,"forwardfire.net","user","admin");
initEditor();
} catch (VascException e) {
throw new RuntimeException(e);
}
}
public void stop() {
vascController = null;
logger.info("Stop manager, cleared all.");
}
private void initEditor() {
try {
VascParser parser = new VascParser(vascController);
parser.addGlobalELBean("vascController", vascController);
parser.parseResource("net/forwardfire/vasc/editor/vasc-edit.xml");
DefaultVascFactory.fillVascControllerLocalEntries((VascEntryControllerLocal) vascController.getVascEntryController(), vascController);
} catch (Exception e) {
e.printStackTrace();
}
}
public void openFile(File file) {
logger.info("Vasc open file: "+file.getAbsoluteFile());
try {
VascParser parser = new VascParser(vascController);
File f = File.createTempFile("test-vasc", ".xml");
parser.setDebugOutputStream(new FileOutputStream(f));
parser.parseFile(file);
DefaultVascFactory.fillVascControllerLocalEntries((VascEntryControllerLocal) vascController.getVascEntryController(), vascController);
} catch (Exception e) {
e.printStackTrace();
}
}
public VascController getVascController() {
private VascController getVascController() {
return vascController;
}
public void printEntries() {
try {
for (String key:getVascController().getVascEntryController().getVascEntryIds()) {
VascEntry ve = getVascController().getVascEntryController().getVascEntryById(key);
printEntry(ve);
}
} catch (Exception e) {
e.printStackTrace();
}
}
private void printEntry(VascEntry e) throws Exception {
System.out.println("");
System.out.println("=== Printing entry ===");
System.out.println("");
for (Method m:e.getClass().getMethods()) {
if (m.getName().startsWith("get")==false) { //a bit dirty
continue;
}
if (m.getParameterTypes().length>0) {
continue;
}
System.out.println("prop: "+m.getName()+" -> "+m.invoke(e));
}
System.out.println("");
System.out.println("=== Fields ===");
for (VascEntryField vef:e.getVascEntryFields()) {
System.out.println("=== Field: "+vef.getId());
for (Method m:vef.getClass().getMethods()) {
if (m.getName().startsWith("get")==false) { //a bit dirty
continue;
}
if (m.getParameterTypes().length>0) {
continue;
}
System.out.println("prop: "+m.getName()+" -> "+m.invoke(vef));
}
}
}
public void createMetaEntry(MetaModelDataContextProvider ds,String id,String tableName) {
logger.info("Creating entry id: "+id+" of table: "+tableName);
@ -175,12 +82,10 @@ public class VascManager {
try {
((VascBackendControllerLocal)getVascController().getVascBackendController()).addVascBackend(backend);
((VascEntryControllerLocal)getVascController().getVascEntryController()).addVascEntry(ve, getVascController());
((VascEntryControllerLocal)getVascController().getVascEntryController()).addVascEntry(ve);
// mm TODO rm this fill which adds the global actions ... and show updated tree in editor
DefaultVascFactory.fillVascControllerLocalEntries((VascEntryControllerLocal) getVascController().getVascEntryController(), getVascController());
//rebuildTree();
((JMainPanel)TechUI.getInstance().getMainView().getComponent()).rebuildTree();
} catch (Exception ee) {
ee.printStackTrace();
}
@ -222,7 +127,7 @@ public class VascManager {
try {
((VascBackendControllerLocal)getVascController().getVascBackendController()).addVascBackend(backendLink);
((VascEntryControllerLocal)getVascController().getVascEntryController()).addVascEntry(veLink, getVascController());
((VascEntryControllerLocal)getVascController().getVascEntryController()).addVascEntry(veLink);
VascLinkEntry vle = new DefaultVascLinkEntry();
vle.setId(id+"Link");
@ -272,7 +177,7 @@ public class VascManager {
vef.getVascEntryFieldType().setDataObject(itemModel);
((VascBackendControllerLocal)getVascController().getVascBackendController()).addVascBackend(backendLink);
((VascEntryControllerLocal)getVascController().getVascEntryController()).addVascEntry(veLink, getVascController());
((VascEntryControllerLocal)getVascController().getVascEntryController()).addVascEntry(veLink);
} catch (Exception e) {
e.printStackTrace();
}

View file

@ -18,6 +18,8 @@ import javax.swing.JPanel;
import net.forwardfire.vasc.backend.metamodel.MetaModelDataContextCsv;
import net.forwardfire.vasc.demo.tech.ui.TechUI;
import net.forwardfire.vasc.demo.tech.ui.VascAutoSchemaMetaModel;
import net.forwardfire.vasc.demo.tech.ui.components.JMainPanel;
public class JDialogMetaCsv extends JDialog implements ActionListener {
@ -62,7 +64,9 @@ public class JDialogMetaCsv extends JDialog implements ActionListener {
File file = fc.getSelectedFile();
MetaModelDataContextCsv ds = new MetaModelDataContextCsv();
ds.setFile(file.getAbsolutePath());
TechUI.getInstance().getVascManager().createMetaEntry(ds,file.getName(),null);
VascAutoSchemaMetaModel schema = new VascAutoSchemaMetaModel(TechUI.getInstance().getVascManager().getVascController());
schema.createMetaEntry(ds,file.getName(),null);
((JMainPanel)TechUI.getInstance().getMainView().getComponent()).rebuildTree();
}
}
});

View file

@ -19,6 +19,8 @@ import javax.swing.SpringLayout;
import net.forwardfire.vasc.backend.metamodel.MetaModelDataContextJdbc;
import net.forwardfire.vasc.demo.tech.ui.TechUI;
import net.forwardfire.vasc.demo.tech.ui.VascAutoSchemaMetaModel;
import net.forwardfire.vasc.demo.tech.ui.components.JMainPanel;
import net.forwardfire.vasc.demo.tech.ui.components.SpringLayoutGrid;
import org.eobjects.metamodel.DataContext;
@ -89,9 +91,11 @@ public class JDialogMetaJdbc extends JDialog implements ActionListener {
ds.setPassword(passwordField.getText());
DataContext metaDs = ds.getDataContext();
String dbName = url.substring(url.lastIndexOf('/')+1,url.length());
VascAutoSchemaMetaModel schema = new VascAutoSchemaMetaModel(TechUI.getInstance().getVascManager().getVascController());
for (String table:metaDs.getDefaultSchema().getTableNames()) {
TechUI.getInstance().getVascManager().createMetaEntry(ds,dbName+"_"+table,table);
schema.createMetaEntry(ds,dbName+"_"+table,table);
}
((JMainPanel)TechUI.getInstance().getMainView().getComponent()).rebuildTree();
}
});
result.add(fileButton);

View file

@ -18,6 +18,8 @@ import javax.swing.SpringLayout;
import net.forwardfire.vasc.backend.metamodel.MetaModelDataContextMongodb;
import net.forwardfire.vasc.demo.tech.ui.TechUI;
import net.forwardfire.vasc.demo.tech.ui.VascAutoSchemaMetaModel;
import net.forwardfire.vasc.demo.tech.ui.components.JMainPanel;
import net.forwardfire.vasc.demo.tech.ui.components.SpringLayoutGrid;
import org.eobjects.metamodel.DataContext;
@ -78,9 +80,11 @@ public class JDialogMetaMongodb extends JDialog implements ActionListener {
ds.setPort(new Integer(hostPortField.getText()));
ds.setDatabase(databaseField.getText());
DataContext metaDs = ds.getDataContext();
VascAutoSchemaMetaModel schema = new VascAutoSchemaMetaModel(TechUI.getInstance().getVascManager().getVascController());
for (String table:metaDs.getDefaultSchema().getTableNames()) {
TechUI.getInstance().getVascManager().createMetaEntry(ds,ds.getDatabase()+"_"+table,table);
schema.createMetaEntry(ds,ds.getDatabase()+"_"+table,table);
}
((JMainPanel)TechUI.getInstance().getMainView().getComponent()).rebuildTree();
}
});
result.add(fileButton);

View file

@ -53,10 +53,10 @@ import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreeNode;
import net.forwardfire.vasc.core.VascEntry;
import net.forwardfire.vasc.demo.tech.core.DemoVascManager;
import net.forwardfire.vasc.demo.tech.ui.TechUI;
import net.forwardfire.vasc.demo.tech.ui.VascManager;
import net.forwardfire.vasc.frontends.swing.SwingPanelIntegration;
import net.forwardfire.vasc.frontends.swing.SwingPanelTabbed;
import net.forwardfire.vasc.frontend.swing.SwingPanelIntegration;
import net.forwardfire.vasc.frontend.swing.SwingPanelTabbed;
import net.forwardfire.vasc.impl.DefaultVascFactory;
import net.forwardfire.vasc.lib.i18n.bundle.RootApplicationBundle_en;
import net.forwardfire.vasc.test.i18n.VascBundleCheckEntryKeys;
@ -64,7 +64,7 @@ import net.forwardfire.vasc.test.i18n.VascBundleCheckEntryKeys;
public class JMainPanel extends JPanel {
private static final long serialVersionUID = 5834715323973411147L;
private VascManager vascManager = null;
private DemoVascManager vascManager = null;
private SwingPanelIntegration spi = null;
private JTabbedPane tabPane = null;
private JTree vascTree = null;

View file

@ -76,10 +76,6 @@ vasc.validator.VascStringZipCodeValidator=Value must be a valid post code.
# Vasc actions labels
vasc.action.addRowAction.description = add a new record
vasc.action.addRowAction.name = Add
vasc.action.csvExportAction.description = CSV
vasc.action.csvExportAction.name = CSV
vasc.action.xmlExportAction.description = XML
vasc.action.xmlExportAction.name = XML
vasc.action.deleteRowAction.description = delete
vasc.action.deleteRowAction.name = delete
vasc.action.downloadAction.description = Select this record.
@ -87,6 +83,26 @@ vasc.action.downloadAction.name = Select
vasc.action.editRowAction.description = edit
vasc.action.editRowAction.name = Edit
vasc.action.csvExportAction.description = CSV
vasc.action.csvExportAction.name = CSV
vasc.action.xmlExportAction.description = XML
vasc.action.xmlExportAction.name = XML
vasc.action.xmltreeExportAction.description = XMLTree
vasc.action.xmltreeExportAction.name = XMLTree
vasc.action.jrPdfLandscapeExportAction.description = jrPdfLandscape
vasc.action.jrPdfLandscapeExportAction.name = PDF-Landscape
vasc.action.jrPdfPortraitExportAction.description = jrPdfPortrait
vasc.action.jrPdfPortraitExportAction.name = PDF-Portrait
vasc.action.jrRtfExportAction.description = RTF
vasc.action.jrRtfExportAction.name = RTF
vasc.action.jrXlsExportAction.description = XLS
vasc.action.jrXlsExportAction.name = XLS
vasc.action.jrXmlExportAction.description = JR-XML
vasc.action.jrXmlExportAction.name = JR-XML
vasc.action.jrCsvExportAction.description = JR-CSV
vasc.action.jrCsvExportAction.name = JR-CSV
# Temp jsf
generic.vasc.jsf.listOption.header = Searchoptions
generic.vasc.jsf.listOption.search = Searh\:
@ -116,3 +132,6 @@ generic.vasc.jsf.action.cancel = Cancel
generic.vasc.jsf.action.back = Back
generic.vasc.jsf.parentSelected = Selected:
vasc.dialog.edit.message = Edit
vasc.dialog.save.name = Save
vasc.dialog.cancel.name = Cancel

View file

@ -18,6 +18,12 @@
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.forwardfire.vasc.demo</groupId>
<artifactId>vasc-demo-tech-core</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<!-- Web tech deps -->
<dependency>

View file

@ -31,12 +31,12 @@ import javax.faces.context.FacesContext;
import net.forwardfire.vasc.core.VascController;
import net.forwardfire.vasc.core.VascEntry;
import net.forwardfire.vasc.core.entry.VascEntryFrontendEventListener;
import net.forwardfire.vasc.demo.tech.core.DemoVascControllerProvider;
import net.forwardfire.vasc.frontend.VascFrontendData;
import net.forwardfire.vasc.frontends.web.jsf.AbstractJSFVascFacesControllerBase;
import net.forwardfire.vasc.frontend.web.jsf.AbstractJSFVascFacesControllerBase;
import net.forwardfire.vasc.impl.DefaultVascFactory;
/**
*
* @author Willem Cazander
@ -77,20 +77,8 @@ public class VascFacesController extends AbstractJSFVascFacesControllerBase {
@Override
public VascController getVascController() {
// TODO: rm this by making common tech vasc package ?
try {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
if (cl == null) {
cl = this.getClass().getClassLoader(); // fallback
}
Class<?> clazz = cl.loadClass("net.forwardfire.vasc.demo.tech.ui.TechUI");
Object instance = clazz.getMethod("getInstance").invoke(null);
Object vasc = clazz.getMethod("getVascController").invoke(instance);
return (VascController)vasc;
} catch (Exception e) {
throw new RuntimeException(e);
}
DemoVascControllerProvider provider = new DemoVascControllerProvider();
return provider.getVascController();
}
}

View file

@ -95,7 +95,7 @@
<filter>
<display-name>User Filter</display-name>
<filter-name>userFilter</filter-name>
<filter-class>net.forwardfire.logstats.web.filters.UserFilter</filter-class>
<filter-class>net.forwardfire.vasc.demo.tech.web.filters.UserFilter</filter-class>
</filter>
<filter-mapping>
@ -130,12 +130,7 @@
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<!--
<context-param>
<param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
<param-value>true</param-value>
</context-param>
-->
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
@ -184,7 +179,7 @@
<filter>
<display-name>VASC Filter</display-name>
<filter-name>vascFilter</filter-name>
<filter-class>net.forwardfire.vasc.frontends.web.jsf.VascRequestFacesFilter</filter-class>
<filter-class>net.forwardfire.vasc.frontend.web.jsf.VascRequestFacesFilter</filter-class>
<init-param>
<param-name>templateFile</param-name>
<param-value>/jsp/includes/vasc-template.jsf</param-value>
@ -201,4 +196,50 @@
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<servlet>
<servlet-name>vascExportServlet</servlet-name>
<servlet-class>net.forwardfire.vasc.frontend.web.export.VascExportServlet</servlet-class>
<init-param>
<param-name>vascControllerProvider</param-name>
<param-value>net.forwardfire.vasc.demo.tech.core.DemoVascControllerProvider</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>vascExportServlet</servlet-name>
<url-pattern>/export</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>vascExportServletTree</servlet-name>
<servlet-class>net.forwardfire.vasc.frontend.web.export.VascExportServlet</servlet-class>
<init-param>
<param-name>vascControllerProvider</param-name>
<param-value>net.forwardfire.vasc.demo.tech.core.DemoVascControllerProvider</param-value>
</init-param>
<init-param>
<param-name>exportTree</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>vascExportServletTree</servlet-name>
<url-pattern>/export-tree/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>vascCXFServlet</servlet-name>
<servlet-class>net.forwardfire.vasc.frontend.cxf.server.web.VascCXFServlet</servlet-class>
<init-param>
<param-name>vascControllerProvider</param-name>
<param-value>net.forwardfire.vasc.demo.tech.core.DemoVascControllerProvider</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>vascCXFServlet</servlet-name>
<url-pattern>/cxf/*</url-pattern>
</servlet-mapping>
</web-app>