Made unittest data backend for frontends and improved swing frontend.
Worked on metamodel backend and some other fixes.
This commit is contained in:
parent
1c308a684a
commit
a25e98f5d5
65 changed files with 2820 additions and 499 deletions
|
|
@ -1,9 +1,30 @@
|
|||
/*
|
||||
* 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.frontends.web.jsf;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.forwardfire.vasc.backend.VascBackend;
|
||||
import net.forwardfire.vasc.backend.VascBackendState;
|
||||
import net.forwardfire.vasc.core.VascController;
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
|
|
@ -11,6 +32,12 @@ import net.forwardfire.vasc.core.VascEntryField;
|
|||
import net.forwardfire.vasc.frontend.VascFrontendData;
|
||||
import net.forwardfire.vasc.impl.DefaultVascFactory;
|
||||
|
||||
/**
|
||||
* AbstractJSFVascFacesControllerBase for making jsf frontend.
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Dec 21, 2011
|
||||
*/
|
||||
public abstract class AbstractJSFVascFacesControllerBase {
|
||||
|
||||
abstract VascFrontendData getNewVascFrontendData();
|
||||
|
|
|
|||
|
|
@ -325,6 +325,10 @@ abstract public class AbstractJSFVascFacesControllerEJB extends AbstractJSFVascF
|
|||
Object result = vascManager.invokeBackendMethod(backendId, "isTotalSummary", args);
|
||||
return (Boolean)result;
|
||||
}
|
||||
|
||||
public boolean isReadOnly() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -29,15 +29,14 @@ import javax.el.ValueExpression;
|
|||
import javax.faces.context.FacesContext;
|
||||
|
||||
import net.forwardfire.vasc.core.VascEntry;
|
||||
import net.forwardfire.vasc.core.VascEntryField;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFieldValue;
|
||||
import net.forwardfire.vasc.core.entry.VascEntryFrontendEventListener;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author willemc
|
||||
*
|
||||
* JSFVascEntryEventListener fills data in support bean.
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Sep 11, 2009
|
||||
*/
|
||||
public class JSFVascEntryEventListener implements VascEntryFrontendEventListener {
|
||||
|
||||
|
|
@ -59,6 +58,7 @@ public class JSFVascEntryEventListener implements VascEntryFrontendEventListener
|
|||
|
||||
|
||||
public void vascEvent(VascEntry entry,Object dataNotUsed) {
|
||||
/* moved to fillVascEntryFrontend
|
||||
try {
|
||||
for (VascEntryField field:entry.getVascEntryFields()) {
|
||||
if (field.getVascEntryFieldValue()==null) {
|
||||
|
|
@ -73,6 +73,7 @@ public class JSFVascEntryEventListener implements VascEntryFrontendEventListener
|
|||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
*/
|
||||
List<Object> data = entry.getVascFrontendData().getVascEntryState().getEntryDataList();
|
||||
List<Object> result = new ArrayList<Object>(data.size());
|
||||
int index = 0;
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ import net.forwardfire.vasc.impl.actions.EditRowAction;
|
|||
|
||||
|
||||
/**
|
||||
*
|
||||
* JSFVascEntrySupportBean add EL support for renderer.
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Sep 10, 2009
|
||||
|
|
@ -1012,7 +1012,7 @@ class JSFVascSupportI18nMapController implements Map<String,String> {
|
|||
return null;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void putAll(Map m) {
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue