Added pdf export support, export servlet support, renamed frontends
without s and made vasc config object.
This commit is contained in:
parent
efcbdbd519
commit
b3923bd2fb
160 changed files with 5001 additions and 2552 deletions
|
|
@ -14,5 +14,7 @@
|
|||
<module>vasc-frontend-swing</module>
|
||||
<module>vasc-frontend-swt</module>
|
||||
<module>vasc-frontend-web-jsf</module>
|
||||
<module>vasc-frontend-web-export</module>
|
||||
<module>vasc-frontend-cxf</module>
|
||||
</modules>
|
||||
</project>
|
||||
17
vasc-frontend/vasc-frontend-cxf/.project
Normal file
17
vasc-frontend/vasc-frontend-cxf/.project
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>vasc-frontend-cxf</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
17
vasc-frontend/vasc-frontend-cxf/pom.xml
Normal file
17
vasc-frontend/vasc-frontend-cxf/pom.xml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<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-frontend</artifactId>
|
||||
<groupId>net.forwardfire.vasc</groupId>
|
||||
<version>0.3.5-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
<artifactId>vasc-frontend-cxf</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>vasc-frontend-cxf</name>
|
||||
<description>vasc-frontend-cxf</description>
|
||||
<modules>
|
||||
<module>vasc-frontend-cxf-client</module>
|
||||
<module>vasc-frontend-cxf-server</module>
|
||||
</modules>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>vasc-frontend-cxf-client</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
|
@ -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-frontend-cxf</artifactId>
|
||||
<groupId>net.forwardfire.vasc</groupId>
|
||||
<version>0.3.5-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
<artifactId>vasc-frontend-cxf-client</artifactId>
|
||||
<name>vasc-frontend-cxf-client</name>
|
||||
<description>vasc-frontend-cxf-client</description>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>javax.jws</groupId>
|
||||
<artifactId>jsr181-api</artifactId>
|
||||
<version>1.0-MR1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package net.forwardfire.vasc.frontend.cxf.client;
|
||||
|
||||
import javax.jws.WebService;
|
||||
|
||||
|
||||
@WebService
|
||||
public interface VascEntryService {
|
||||
|
||||
public String testHi(String response);
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>vasc-frontend-cxf-server</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
<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-frontend-cxf</artifactId>
|
||||
<groupId>net.forwardfire.vasc</groupId>
|
||||
<version>0.3.5-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
<artifactId>vasc-frontend-cxf-server</artifactId>
|
||||
<name>vasc-frontend-cxf-server</name>
|
||||
<description>vasc-frontend-cxf-server</description>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>net.forwardfire.vasc</groupId>
|
||||
<artifactId>vasc-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.forwardfire.vasc</groupId>
|
||||
<artifactId>vasc-frontend-cxf-client</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-transports-http</artifactId>
|
||||
<version>2.6.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-databinding-jaxb</artifactId>
|
||||
<version>2.6.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-frontend-jaxws</artifactId>
|
||||
<version>2.6.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
|
||||
<version>2.6.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<version>2.5</version>
|
||||
<type>jar</type>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package net.forwardfire.vasc.frontend.cxf.server;
|
||||
|
||||
import net.forwardfire.vasc.frontend.cxf.client.VascEntryService;
|
||||
|
||||
public class VascEntryServiceImpl implements VascEntryService {
|
||||
|
||||
public String testHi(String response) {
|
||||
return "HOHO: "+response+" HAAHA..";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
/*
|
||||
* 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.frontend.cxf.server.web;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.servlet.ServletConfig;
|
||||
import javax.servlet.ServletException;
|
||||
|
||||
import net.forwardfire.vasc.core.VascControllerProvider;
|
||||
import net.forwardfire.vasc.frontend.cxf.server.VascEntryServiceImpl;
|
||||
|
||||
import javax.xml.ws.Endpoint;
|
||||
|
||||
import org.apache.cxf.Bus;
|
||||
import org.apache.cxf.BusFactory;
|
||||
import org.apache.cxf.transport.servlet.CXFNonSpringServlet;
|
||||
|
||||
/**
|
||||
* VascCXFServlet exports the entries via webservices
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 May 12, 2012
|
||||
*/
|
||||
public class VascCXFServlet extends CXFNonSpringServlet {
|
||||
|
||||
private Logger logger = Logger.getLogger(VascCXFServlet.class.getName());
|
||||
private static final long serialVersionUID = 8125039180724973858L;
|
||||
private VascControllerProvider vascControllerProvider = null;
|
||||
private boolean exportTree = false;
|
||||
|
||||
/**
|
||||
* @see org.apache.cxf.transport.servlet.CXFNonSpringServlet#init(javax.servlet.ServletConfig)
|
||||
*/
|
||||
@Override
|
||||
public void init(ServletConfig sc) throws ServletException {
|
||||
|
||||
String className = getInitParameter("vascControllerProvider");
|
||||
if (className==null) {
|
||||
throw new ServletException("Can't start with null vascControllerProvider init parameter.");
|
||||
}
|
||||
String exportTreeStr = getInitParameter("exportTree");
|
||||
if (exportTreeStr!=null && "true".equalsIgnoreCase(exportTreeStr)) {
|
||||
exportTree = true;
|
||||
}
|
||||
try {
|
||||
ClassLoader cl = Thread.currentThread().getContextClassLoader();
|
||||
if (cl == null) {
|
||||
cl = className.getClass().getClassLoader();
|
||||
}
|
||||
Class<?> clazz = cl.loadClass(className);
|
||||
vascControllerProvider = (VascControllerProvider)clazz.newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new ServletException("Could not create VascControllerProvider: "+e.getMessage(),e);
|
||||
}
|
||||
super.init(sc); // runs loadBus
|
||||
logger.info("CXF Servlet started. (exportTree: "+exportTree+")");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadBus(ServletConfig servletConfig) {
|
||||
super.loadBus(servletConfig);
|
||||
Bus bus = getBus();
|
||||
BusFactory.setDefaultBus(bus);
|
||||
|
||||
|
||||
Endpoint.publish("/foobar", new VascEntryServiceImpl());
|
||||
}
|
||||
}
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swing;
|
||||
package net.forwardfire.vasc.frontend.swing;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.awt.event.ActionEvent;
|
||||
|
|
@ -263,15 +263,8 @@ public class SwingActionPanel extends JPanel implements VascEntryFrontendEventLi
|
|||
empty.setName("...");
|
||||
gotoDownload.addItem(empty);
|
||||
|
||||
for (GlobalVascAction a:entry.getGlobalActions()) {
|
||||
if (a.getId().contains("xport")) {
|
||||
//s = new SelectItem();
|
||||
//s.setLabel(i18nMap.get(a.getName()));
|
||||
//s.setDescription(i18nMap.get(a.getDescription()));
|
||||
//s.setValue(a.getId());
|
||||
//result.add(s);
|
||||
gotoDownload.addItem(a);
|
||||
}
|
||||
for (GlobalVascAction a:entry.getExportActions()) {
|
||||
gotoDownload.addItem(a);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swing;
|
||||
package net.forwardfire.vasc.frontend.swing;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.awt.event.ActionEvent;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swing;
|
||||
package net.forwardfire.vasc.frontend.swing;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package net.forwardfire.vasc.frontends.swing;
|
||||
package net.forwardfire.vasc.frontend.swing;
|
||||
|
||||
import javax.swing.JPanel;
|
||||
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swing;
|
||||
package net.forwardfire.vasc.frontend.swing;
|
||||
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTabbedPane;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swing;
|
||||
package net.forwardfire.vasc.frontend.swing;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.FlowLayout;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swing;
|
||||
package net.forwardfire.vasc.frontend.swing;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Component;
|
||||
|
|
@ -71,14 +71,14 @@ import net.forwardfire.vasc.core.ui.VascValueModel;
|
|||
|
||||
import net.forwardfire.vasc.frontend.AbstractVascFrontend;
|
||||
import net.forwardfire.vasc.frontend.VascFrontendData;
|
||||
import net.forwardfire.vasc.frontends.swing.ui.SwingBoolean;
|
||||
import net.forwardfire.vasc.frontends.swing.ui.SwingButton;
|
||||
import net.forwardfire.vasc.frontends.swing.ui.SwingColorChooser;
|
||||
import net.forwardfire.vasc.frontends.swing.ui.SwingDate;
|
||||
import net.forwardfire.vasc.frontends.swing.ui.SwingLabel;
|
||||
import net.forwardfire.vasc.frontends.swing.ui.SwingList;
|
||||
import net.forwardfire.vasc.frontends.swing.ui.SwingText;
|
||||
import net.forwardfire.vasc.frontends.swing.ui.SwingTextArea;
|
||||
import net.forwardfire.vasc.frontend.swing.ui.SwingBoolean;
|
||||
import net.forwardfire.vasc.frontend.swing.ui.SwingButton;
|
||||
import net.forwardfire.vasc.frontend.swing.ui.SwingColorChooser;
|
||||
import net.forwardfire.vasc.frontend.swing.ui.SwingDate;
|
||||
import net.forwardfire.vasc.frontend.swing.ui.SwingLabel;
|
||||
import net.forwardfire.vasc.frontend.swing.ui.SwingList;
|
||||
import net.forwardfire.vasc.frontend.swing.ui.SwingText;
|
||||
import net.forwardfire.vasc.frontend.swing.ui.SwingTextArea;
|
||||
|
||||
/**
|
||||
* SwingVascFrontend renders vasc entries in a swing panel.
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swing;
|
||||
package net.forwardfire.vasc.frontend.swing;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swing.ui;
|
||||
package net.forwardfire.vasc.frontend.swing.ui;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.event.ActionEvent;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swing.ui;
|
||||
package net.forwardfire.vasc.frontend.swing.ui;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swing.ui;
|
||||
package net.forwardfire.vasc.frontend.swing.ui;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.event.ActionEvent;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swing.ui;
|
||||
package net.forwardfire.vasc.frontend.swing.ui;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.event.ActionEvent;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swing.ui;
|
||||
package net.forwardfire.vasc.frontend.swing.ui;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swing.ui;
|
||||
package net.forwardfire.vasc.frontend.swing.ui;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Component;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swing.ui;
|
||||
package net.forwardfire.vasc.frontend.swing.ui;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swing.ui;
|
||||
package net.forwardfire.vasc.frontend.swing.ui;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
|
|
@ -25,8 +25,8 @@ package net.forwardfire.vasc;
|
|||
import net.forwardfire.vasc.core.VascController;
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascEntryControllerLocal;
|
||||
import net.forwardfire.vasc.frontends.swing.SwingPanelFrame;
|
||||
import net.forwardfire.vasc.frontends.swing.SwingPanelIntegration;
|
||||
import net.forwardfire.vasc.frontend.swing.SwingPanelFrame;
|
||||
import net.forwardfire.vasc.frontend.swing.SwingPanelIntegration;
|
||||
import net.forwardfire.vasc.impl.DefaultVascFactory;
|
||||
import net.forwardfire.vasc.test.frontend.data.TestModelData;
|
||||
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ import javax.swing.JTabbedPane;
|
|||
import net.forwardfire.vasc.core.VascController;
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascEntryControllerLocal;
|
||||
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.test.frontend.data.TestModelData;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swt;
|
||||
package net.forwardfire.vasc.frontend.swt;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -102,10 +102,8 @@ public class SwtActionPanel implements VascEntryFrontendEventListener {
|
|||
l.setText("Download: ");
|
||||
downloadBox = new Combo(actionRow,SWT.SINGLE | SWT.BORDER);
|
||||
downloadBox.add("...");
|
||||
for (GlobalVascAction a:entry.getGlobalActions()) {
|
||||
if (a.getId().contains("xport")) {
|
||||
downloadBox.add(a.getName());
|
||||
}
|
||||
for (GlobalVascAction a:entry.getExportActions()) {
|
||||
downloadBox.add(a.getName());
|
||||
}
|
||||
downloadBox.addSelectionListener(new SelectionAdapter() {
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swt;
|
||||
package net.forwardfire.vasc.frontend.swt;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swt;
|
||||
package net.forwardfire.vasc.frontend.swt;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swt;
|
||||
package net.forwardfire.vasc.frontend.swt;
|
||||
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.OutputStream;
|
||||
|
|
@ -40,12 +40,12 @@ import net.forwardfire.vasc.core.ui.VascValueModel;
|
|||
import net.forwardfire.vasc.core.ui.VascValueModelListener;
|
||||
import net.forwardfire.vasc.frontend.AbstractVascFrontend;
|
||||
import net.forwardfire.vasc.frontend.VascFrontendData;
|
||||
import net.forwardfire.vasc.frontends.swt.ui.SwtBoolean;
|
||||
import net.forwardfire.vasc.frontends.swt.ui.SwtButton;
|
||||
import net.forwardfire.vasc.frontends.swt.ui.SwtLabel;
|
||||
import net.forwardfire.vasc.frontends.swt.ui.SwtList;
|
||||
import net.forwardfire.vasc.frontends.swt.ui.SwtText;
|
||||
import net.forwardfire.vasc.frontends.swt.ui.SwtTextArea;
|
||||
import net.forwardfire.vasc.frontend.swt.ui.SwtBoolean;
|
||||
import net.forwardfire.vasc.frontend.swt.ui.SwtButton;
|
||||
import net.forwardfire.vasc.frontend.swt.ui.SwtLabel;
|
||||
import net.forwardfire.vasc.frontend.swt.ui.SwtList;
|
||||
import net.forwardfire.vasc.frontend.swt.ui.SwtText;
|
||||
import net.forwardfire.vasc.frontend.swt.ui.SwtTextArea;
|
||||
|
||||
import org.eclipse.jface.viewers.ILabelProviderListener;
|
||||
import org.eclipse.jface.viewers.IStructuredContentProvider;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swt.ui;
|
||||
package net.forwardfire.vasc.frontend.swt.ui;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swt.ui;
|
||||
package net.forwardfire.vasc.frontend.swt.ui;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swt.ui;
|
||||
package net.forwardfire.vasc.frontend.swt.ui;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swt.ui;
|
||||
package net.forwardfire.vasc.frontend.swt.ui;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swt.ui;
|
||||
package net.forwardfire.vasc.frontend.swt.ui;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.swt.ui;
|
||||
package net.forwardfire.vasc.frontend.swt.ui;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
|
|
@ -26,7 +26,7 @@ package net.forwardfire.vasc;
|
|||
import net.forwardfire.vasc.core.VascController;
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascEntryControllerLocal;
|
||||
import net.forwardfire.vasc.frontends.swt.SwtVascFrontend;
|
||||
import net.forwardfire.vasc.frontend.swt.SwtVascFrontend;
|
||||
import net.forwardfire.vasc.impl.DefaultVascFactory;
|
||||
import net.forwardfire.vasc.test.frontend.data.TestModelData;
|
||||
|
||||
|
|
|
|||
23
vasc-frontend/vasc-frontend-web-export/.project
Normal file
23
vasc-frontend/vasc-frontend-web-export/.project
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>vasc-frontend-web-export</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
32
vasc-frontend/vasc-frontend-web-export/pom.xml
Normal file
32
vasc-frontend/vasc-frontend-web-export/pom.xml
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<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-frontend</artifactId>
|
||||
<groupId>net.forwardfire.vasc</groupId>
|
||||
<version>0.3.5-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
<artifactId>vasc-frontend-web-export</artifactId>
|
||||
<name>vasc-frontend-web-export</name>
|
||||
<description>vasc-frontend-web-export</description>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>net.forwardfire.vasc</groupId>
|
||||
<artifactId>vasc-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.forwardfire.vasc</groupId>
|
||||
<artifactId>vasc-ejb3</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<version>2.5</version>
|
||||
<type>jar</type>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,163 @@
|
|||
/*
|
||||
* 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.frontend.web.export;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.Locale;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import net.forwardfire.vasc.core.VascController;
|
||||
import net.forwardfire.vasc.core.VascControllerProvider;
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryExporter;
|
||||
|
||||
/**
|
||||
* VascExportServlet exports the data from the vasc exporters on fixed url.
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 May 12, 2012
|
||||
*/
|
||||
public class VascExportServlet extends HttpServlet {
|
||||
|
||||
private Logger logger = Logger.getLogger(VascExportServlet.class.getName());
|
||||
private static final long serialVersionUID = 6165530418422144322L;
|
||||
private VascControllerProvider vascControllerProvider = null;
|
||||
private boolean exportTree = false;
|
||||
|
||||
/**
|
||||
* @see javax.servlet.GenericServlet#init()
|
||||
*/
|
||||
@Override
|
||||
public void init() throws ServletException {
|
||||
super.init();
|
||||
String className = getInitParameter("vascControllerProvider");
|
||||
if (className==null) {
|
||||
throw new ServletException("Can't start with null vascControllerProvider init parameter.");
|
||||
}
|
||||
String exportTreeStr = getInitParameter("exportTree");
|
||||
if (exportTreeStr!=null && "true".equalsIgnoreCase(exportTreeStr)) {
|
||||
exportTree = true;
|
||||
}
|
||||
try {
|
||||
ClassLoader cl = Thread.currentThread().getContextClassLoader();
|
||||
if (cl == null) {
|
||||
cl = className.getClass().getClassLoader();
|
||||
}
|
||||
Class<?> clazz = cl.loadClass(className);
|
||||
vascControllerProvider = (VascControllerProvider)clazz.newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new ServletException("Could not create VascControllerProvider: "+e.getMessage(),e);
|
||||
}
|
||||
logger.info("Export servlet started. (exportTree: "+exportTree+")");
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.http.HttpServlet#service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
|
||||
*/
|
||||
@Override
|
||||
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
String method = request.getMethod();
|
||||
if (method.equals("GET")==false) {
|
||||
response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "Only GET allowed.");
|
||||
return;
|
||||
}
|
||||
// Remove prefixes
|
||||
String path = request.getRequestURI();
|
||||
String servlet = request.getServletPath();
|
||||
if (path.contains(servlet)) {
|
||||
path = path.substring(path.indexOf(servlet)+servlet.length());
|
||||
}
|
||||
if (path.startsWith("/")) {
|
||||
path = path.substring(1);
|
||||
}
|
||||
|
||||
// stuff to fill
|
||||
String entryId = null;
|
||||
String exportId = null;
|
||||
|
||||
if (exportTree) {
|
||||
int index = path.indexOf("/");
|
||||
String actionString = null;
|
||||
if (index>0) {
|
||||
actionString = path.substring(index+1);
|
||||
entryId = path.substring(0,index);
|
||||
} else {
|
||||
entryId = path;
|
||||
}
|
||||
|
||||
if (actionString!=null) {
|
||||
index = actionString.indexOf("/");
|
||||
String recordString = null;
|
||||
if (index>0) {
|
||||
recordString = actionString.substring(index+1);
|
||||
exportId = actionString.substring(0,index);
|
||||
} else {
|
||||
exportId = actionString;
|
||||
}
|
||||
if (recordString!=null) {
|
||||
// actionRecordId = recordString;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// tree overrules parameters.
|
||||
if (entryId==null) {
|
||||
entryId = request.getParameter("ve");
|
||||
}
|
||||
if (exportId==null) {
|
||||
exportId = request.getParameter("et");
|
||||
}
|
||||
|
||||
//out = new PrintWriter(new OutputStreamWriter(response.getOutputStream(), response.getCharacterEncoding()), true);
|
||||
OutputStream out = response.getOutputStream();
|
||||
try {
|
||||
VascController vc = vascControllerProvider.getVascController();
|
||||
VascEntry ve = vc.getVascEntryConfigController().configVascEntry(vc, entryId);
|
||||
vc.getVascEntryConfigController().configVascFrontendData(vc, ve, new Locale("en"));
|
||||
|
||||
// Update total every time first
|
||||
Long total = ve.getVascFrontendData().getVascEntryState().getVascBackend().fetchTotalExecuteSize(ve.getVascFrontendData().getVascEntryState().getVascBackendState());
|
||||
ve.getVascFrontendData().getVascEntryState().setTotalBackendRecords(total);
|
||||
VascEntryExporter ex = vc.getVascEntryConfigController().getVascEntryExporterById(exportId);
|
||||
|
||||
String filename = entryId+"-export."+ex.getFileType();
|
||||
response.setHeader("Content-disposition", "attachment; filename=" + filename);
|
||||
String contentType = ex.getMineType();
|
||||
response.setContentType(contentType);
|
||||
|
||||
ex.doExport(out, ve);
|
||||
} catch (VascException e) {
|
||||
response.setStatus(500);
|
||||
response.setContentType("text/html");
|
||||
}
|
||||
out.flush();
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
|
|
@ -5,9 +5,7 @@
|
|||
<groupId>net.forwardfire.vasc</groupId>
|
||||
<version>0.3.5-SNAPSHOT</version>
|
||||
</parent>
|
||||
<groupId>net.forwardfire.vasc</groupId>
|
||||
<artifactId>vasc-frontend-web-jsf</artifactId>
|
||||
<version>0.3.5-SNAPSHOT</version>
|
||||
<name>vasc-frontend-web-jsf</name>
|
||||
<description>vasc-frontend-web-jsf</description>
|
||||
<dependencies>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.web.jsf;
|
||||
package net.forwardfire.vasc.frontend.web.jsf;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -20,12 +20,11 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.web.jsf;
|
||||
package net.forwardfire.vasc.frontend.web.jsf;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
|
|
@ -47,13 +46,11 @@ 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.entry.VascEntryBackendEventListener;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFieldValue;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFrontendEventListener;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryRecordCreator;
|
||||
import net.forwardfire.vasc.ejb3.VascServiceManager;
|
||||
import net.forwardfire.vasc.frontend.VascFrontendData;
|
||||
import net.forwardfire.vasc.impl.DefaultVascBackedEntryFinalizer;
|
||||
import net.forwardfire.vasc.impl.DefaultVascFactory;
|
||||
import net.forwardfire.vasc.impl.entry.DefaultVascEntryResourceResolver;
|
||||
import net.forwardfire.vasc.impl.entry.SetParameterBackendListener;
|
||||
|
|
@ -386,18 +383,14 @@ abstract public class AbstractJSFVascFacesControllerEJB extends AbstractJSFVascF
|
|||
listener.setType(type);
|
||||
listener.setValue(paraTypeValue);
|
||||
|
||||
List<VascEntryBackendEventListener> listeners=new ArrayList<VascEntryBackendEventListener>(10);
|
||||
listeners.add(listener);
|
||||
vb = new VascBackendProxyEventExecutor(vb,ve,listeners);
|
||||
VascBackendProxyEventExecutor localUserProxy = new VascBackendProxyEventExecutor();
|
||||
localUserProxy.addVascEntryBackendEventListener(listener);
|
||||
vb = localUserProxy;
|
||||
}
|
||||
|
||||
|
||||
localBackendController.addVascBackend(vb);
|
||||
|
||||
DefaultVascBackedEntryFinalizer f = new DefaultVascBackedEntryFinalizer();
|
||||
ve = f.finalizeVascEntry(ve,c);
|
||||
|
||||
localEntryController.addVascEntry(ve, c);
|
||||
localEntryController.addVascEntry(ve);
|
||||
|
||||
c.getVascEntryConfigController().configVascEntry(c, ve);
|
||||
}
|
||||
vascController = c;
|
||||
return vascController;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.web.jsf;
|
||||
package net.forwardfire.vasc.frontend.web.jsf;
|
||||
|
||||
|
||||
import java.util.Collections;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.web.jsf;
|
||||
package net.forwardfire.vasc.frontend.web.jsf;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.web.jsf;
|
||||
package net.forwardfire.vasc.frontend.web.jsf;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -214,14 +214,12 @@ public class JSFVascEntrySupportBean implements Serializable {
|
|||
s.setValue("null");
|
||||
result.add(s);
|
||||
|
||||
for (GlobalVascAction a:entry.getGlobalActions()) {
|
||||
if (a.getId().contains("xport")) {
|
||||
s = new SelectItem();
|
||||
s.setLabel(i18nMap.get(a.getName()));
|
||||
s.setDescription(i18nMap.get(a.getDescription()));
|
||||
s.setValue(a.getId());
|
||||
result.add(s);
|
||||
}
|
||||
for (GlobalVascAction a:entry.getExportActions()) {
|
||||
s = new SelectItem();
|
||||
s.setLabel(i18nMap.get(a.getName()));
|
||||
s.setDescription(i18nMap.get(a.getDescription()));
|
||||
s.setValue(a.getId());
|
||||
result.add(s);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
@ -744,7 +742,7 @@ public class JSFVascEntrySupportBean implements Serializable {
|
|||
|
||||
logger.fine("exportDownloadAction id: "+id);
|
||||
|
||||
GlobalVascAction action = entry.getGlobalActionById(id);
|
||||
GlobalVascAction action = entry.getExportActionById(id);
|
||||
try {
|
||||
action.doGlobalAction(entry);
|
||||
} catch (Exception e) {
|
||||
|
|
@ -765,7 +763,7 @@ public class JSFVascEntrySupportBean implements Serializable {
|
|||
try {
|
||||
|
||||
HttpServletResponse response = (HttpServletResponse)fc.getExternalContext().getResponse();
|
||||
String filename = "export-list."+ex.getType();
|
||||
String filename = "export-list."+ex.getFileType();
|
||||
response.setHeader("Content-disposition", "attachment; filename=" + filename);
|
||||
String contentType = ex.getMineType();
|
||||
response.setContentType(contentType);
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.web.jsf;
|
||||
package net.forwardfire.vasc.frontend.web.jsf;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.logging.Logger;
|
||||
|
|
@ -31,11 +31,11 @@ import javax.faces.context.FacesContext;
|
|||
import net.forwardfire.vasc.core.entry.VascEntryExporter;
|
||||
import net.forwardfire.vasc.frontend.AbstractVascFrontend;
|
||||
import net.forwardfire.vasc.frontend.VascFrontendData;
|
||||
import net.forwardfire.vasc.frontends.web.jsf.ui.JSFBoolean;
|
||||
import net.forwardfire.vasc.frontends.web.jsf.ui.JSFLabel;
|
||||
import net.forwardfire.vasc.frontends.web.jsf.ui.JSFList;
|
||||
import net.forwardfire.vasc.frontends.web.jsf.ui.JSFText;
|
||||
import net.forwardfire.vasc.frontends.web.jsf.ui.JSFTextArea;
|
||||
import net.forwardfire.vasc.frontend.web.jsf.ui.JSFBoolean;
|
||||
import net.forwardfire.vasc.frontend.web.jsf.ui.JSFLabel;
|
||||
import net.forwardfire.vasc.frontend.web.jsf.ui.JSFList;
|
||||
import net.forwardfire.vasc.frontend.web.jsf.ui.JSFText;
|
||||
import net.forwardfire.vasc.frontend.web.jsf.ui.JSFTextArea;
|
||||
|
||||
|
||||
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.web.jsf;
|
||||
package net.forwardfire.vasc.frontend.web.jsf;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -33,7 +33,6 @@ import javax.faces.component.UIComponent;
|
|||
import javax.faces.component.UIComponentBase;
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import net.forwardfire.vasc.backend.VascBackend;
|
||||
import net.forwardfire.vasc.core.VascController;
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
|
|
@ -43,11 +42,9 @@ import net.forwardfire.vasc.core.VascLinkEntry;
|
|||
import net.forwardfire.vasc.core.entry.VascEntryFrontendEventListener;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFrontendEventListener.VascFrontendEventType;
|
||||
import net.forwardfire.vasc.frontend.VascFrontendData;
|
||||
import net.forwardfire.vasc.frontends.web.jsf.ui.JSFListModel;
|
||||
import net.forwardfire.vasc.frontend.web.jsf.ui.JSFListModel;
|
||||
import net.forwardfire.vasc.impl.DefaultVascFactory;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Renders an JSF vasc entry views.
|
||||
*
|
||||
|
|
@ -340,17 +337,13 @@ public class JSFVascUIComponent extends UIComponentBase {
|
|||
throw new NullPointerException("Could not locate '"+entryName+"' from : "+vascController);
|
||||
}
|
||||
frontendData.setVascFrontend(null); // reset data obj. todo rm this.
|
||||
DefaultVascFactory.fillVascEntryFrontend(entry, vascController, frontendData);
|
||||
|
||||
try {
|
||||
DefaultVascFactory.fillVascEntryFrontend(entry, vascController, frontendData);
|
||||
frontendData.initFrontendListeners(entry,"jsf");
|
||||
} catch (InstantiationException e1) {
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
} catch (IllegalAccessException e1) {
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
}
|
||||
} catch (Exception e1) {
|
||||
throw new RuntimeException(e1);
|
||||
}
|
||||
|
||||
if (state!=null) {
|
||||
// copy prevois parent
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.web.jsf;
|
||||
package net.forwardfire.vasc.frontend.web.jsf;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.web.jsf;
|
||||
package net.forwardfire.vasc.frontend.web.jsf;
|
||||
|
||||
|
||||
import javax.el.ValueExpression;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.web.jsf;
|
||||
package net.forwardfire.vasc.frontend.web.jsf;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
|
@ -37,7 +37,7 @@ import javax.faces.validator.Validator;
|
|||
import javax.faces.validator.ValidatorException;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.frontends.web.jsf.JSFVascUIComponentRenderer.VascJSFInputValidator2;
|
||||
import net.forwardfire.vasc.frontend.web.jsf.JSFVascUIComponentRenderer.VascJSFInputValidator2;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.web.jsf;
|
||||
package net.forwardfire.vasc.frontend.web.jsf;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.web.jsf;
|
||||
package net.forwardfire.vasc.frontend.web.jsf;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Locale;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.web.jsf;
|
||||
package net.forwardfire.vasc.frontend.web.jsf;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Locale;
|
||||
|
|
@ -20,13 +20,13 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.web.jsf.ui;
|
||||
package net.forwardfire.vasc.frontend.web.jsf.ui;
|
||||
|
||||
import javax.faces.component.UIComponent;
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import net.forwardfire.vasc.core.ui.VascUIComponent;
|
||||
import net.forwardfire.vasc.frontends.web.jsf.JSFVascUIComponent;
|
||||
import net.forwardfire.vasc.frontend.web.jsf.JSFVascUIComponent;
|
||||
|
||||
|
||||
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.web.jsf.ui;
|
||||
package net.forwardfire.vasc.frontend.web.jsf.ui;
|
||||
|
||||
import javax.faces.application.Application;
|
||||
import javax.faces.component.UIComponent;
|
||||
|
|
@ -32,7 +32,7 @@ import net.forwardfire.vasc.core.VascEntry;
|
|||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.ui.VascValueModel;
|
||||
import net.forwardfire.vasc.frontends.web.jsf.JSFVascUIComponent;
|
||||
import net.forwardfire.vasc.frontend.web.jsf.JSFVascUIComponent;
|
||||
|
||||
|
||||
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.web.jsf.ui;
|
||||
package net.forwardfire.vasc.frontend.web.jsf.ui;
|
||||
|
||||
import javax.faces.application.Application;
|
||||
import javax.faces.component.UIComponent;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.web.jsf.ui;
|
||||
package net.forwardfire.vasc.frontend.web.jsf.ui;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
|
@ -40,7 +40,7 @@ import net.forwardfire.vasc.core.VascEntryField;
|
|||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.ui.VascSelectItem;
|
||||
import net.forwardfire.vasc.core.ui.VascValueModel;
|
||||
import net.forwardfire.vasc.frontends.web.jsf.JSFVascUIComponent;
|
||||
import net.forwardfire.vasc.frontend.web.jsf.JSFVascUIComponent;
|
||||
|
||||
|
||||
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.web.jsf.ui;
|
||||
package net.forwardfire.vasc.frontend.web.jsf.ui;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.web.jsf.ui;
|
||||
package net.forwardfire.vasc.frontend.web.jsf.ui;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ import net.forwardfire.vasc.core.VascEntry;
|
|||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.ui.VascValueModel;
|
||||
import net.forwardfire.vasc.frontends.web.jsf.JSFVascUIComponent;
|
||||
import net.forwardfire.vasc.frontend.web.jsf.JSFVascUIComponent;
|
||||
|
||||
|
||||
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.frontends.web.jsf.ui;
|
||||
package net.forwardfire.vasc.frontend.web.jsf.ui;
|
||||
|
||||
import javax.faces.application.Application;
|
||||
import javax.faces.component.UIComponent;
|
||||
|
|
@ -32,7 +32,7 @@ import net.forwardfire.vasc.core.VascEntry;
|
|||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
import net.forwardfire.vasc.core.VascException;
|
||||
import net.forwardfire.vasc.core.ui.VascValueModel;
|
||||
import net.forwardfire.vasc.frontends.web.jsf.JSFVascUIComponent;
|
||||
import net.forwardfire.vasc.frontend.web.jsf.JSFVascUIComponent;
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -6,7 +6,7 @@
|
|||
<description><![CDATA[Renders a templated vasc entry]]></description>
|
||||
<display-name>Vasc JSF Component</display-name>
|
||||
<component-type>vasc.jsf.component</component-type>
|
||||
<component-class>net.forwardfire.vasc.frontends.web.jsf.JSFVascUIComponent</component-class>
|
||||
<component-class>net.forwardfire.vasc.frontend.web.jsf.JSFVascUIComponent</component-class>
|
||||
<component-extension>
|
||||
<renderer-type>vasc.jsf.component.renderer</renderer-type>
|
||||
</component-extension>
|
||||
|
|
@ -16,13 +16,13 @@
|
|||
<renderer>
|
||||
<component-family>vasc.jsf.component.family</component-family>
|
||||
<renderer-type>vasc.jsf.component.renderer</renderer-type>
|
||||
<renderer-class>net.forwardfire.vasc.frontends.web.jsf.JSFVascUIComponentRenderer</renderer-class>
|
||||
<renderer-class>net.forwardfire.vasc.frontend.web.jsf.JSFVascUIComponentRenderer</renderer-class>
|
||||
</renderer>
|
||||
</render-kit>
|
||||
|
||||
<application>
|
||||
<locale-config/>
|
||||
<view-handler>net.forwardfire.vasc.frontends.web.jsf.VascViewHandler</view-handler>
|
||||
<view-handler>net.forwardfire.vasc.frontend.web.jsf.VascViewHandler</view-handler>
|
||||
</application>
|
||||
|
||||
<factory/>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<tag>
|
||||
<description>Renders the vasc entry JSF Frontend Renderer</description>
|
||||
<name>vascEntry</name>
|
||||
<tag-class>net.forwardfire.vasc.frontends.web.jsf.JSFVascUIComponentTag</tag-class>
|
||||
<tag-class>net.forwardfire.vasc.frontend.web.jsf.JSFVascUIComponentTag</tag-class>
|
||||
<body-content>JSP</body-content>
|
||||
<attribute>
|
||||
<name>id</name>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue