2
0
Fork 0

set names and fixed user id bug

This commit is contained in:
willemc 2011-03-06 22:27:43 +01:00
parent d26d75b9fa
commit 797930a0e4
9 changed files with 21 additions and 8 deletions

View file

@ -8,6 +8,8 @@
<groupId>com.idcanet.vasc</groupId> <groupId>com.idcanet.vasc</groupId>
<artifactId>vasc-backend-jpa</artifactId> <artifactId>vasc-backend-jpa</artifactId>
<version>0.3.3-SNAPSHOT</version> <version>0.3.3-SNAPSHOT</version>
<name>vasc-backend-jpa</name>
<description>vasc-backend-jpa</description>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.idcanet.vasc</groupId> <groupId>com.idcanet.vasc</groupId>

View file

@ -8,7 +8,8 @@
<groupId>com.idcanet.vasc</groupId> <groupId>com.idcanet.vasc</groupId>
<artifactId>vasc-backend-ldap</artifactId> <artifactId>vasc-backend-ldap</artifactId>
<version>0.3.3-SNAPSHOT</version> <version>0.3.3-SNAPSHOT</version>
<name>vasc-backend-ldap</name>
<description>vasc-backend-ldap</description>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.idcanet.vasc</groupId> <groupId>com.idcanet.vasc</groupId>

View file

@ -8,6 +8,8 @@
<groupId>com.idcanet.vasc</groupId> <groupId>com.idcanet.vasc</groupId>
<artifactId>vasc-core</artifactId> <artifactId>vasc-core</artifactId>
<version>0.3.3-SNAPSHOT</version> <version>0.3.3-SNAPSHOT</version>
<name>vasc-core</name>
<description>vasc-core</description>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.idcanet.x4o</groupId> <groupId>com.idcanet.x4o</groupId>

View file

@ -50,6 +50,9 @@ public class SetParameterBackendListener implements VascEntryBackendEventListene
if (value==null) { if (value==null) {
value="id"; value="id";
} }
if (value.isEmpty()) {
value="id";
}
if ("id".equals(value)) { if ("id".equals(value)) {
if ("int".equals(type)) { if ("int".equals(type)) {
state.setDataParameter(name, userId.intValue()); state.setDataParameter(name, userId.intValue());

View file

@ -28,15 +28,12 @@ package com.idcanet.vasc.impl.x4o;
import java.util.logging.Logger; import java.util.logging.Logger;
import com.idcanet.vasc.core.VascController;
import com.idcanet.vasc.core.VascEntry; import com.idcanet.vasc.core.VascEntry;
import com.idcanet.x4o.element.AbstractElement; import com.idcanet.x4o.element.AbstractElement;
import com.idcanet.x4o.element.ElementException; import com.idcanet.x4o.element.ElementException;
/** /**
* * Handles the diffent EntryParameter xml tags
* *
* @author Willem Cazander * @author Willem Cazander
* @version 1.0 Mar 24, 2009 * @version 1.0 Mar 24, 2009
@ -54,19 +51,19 @@ public class SetParameterElement extends AbstractElement {
String value = getAttributes().get("value"); String value = getAttributes().get("value");
String type = getAttributes().get("type"); String type = getAttributes().get("type");
VascEntry entry = (VascEntry)getParent().getElementObject(); VascEntry entry = (VascEntry)getParent().getElementObject();
VascController cont = VascParser.getVascController(getElementContext());
logger.fine("Setting parameter name: "+name+" value: "+value+" type: "+type); logger.fine("Setting parameter name: "+name+" value: "+value+" type: "+type);
if ("setUserParameter".equals(getElementClass().getTag())) { if ("setUserParameter".equals(getElementClass().getTag())) {
if (value==null) {
value="id"; // default to ids
}
entry.setEntryParameter(name, "userPara:"+type+":"+value); entry.setEntryParameter(name, "userPara:"+type+":"+value);
return; return;
} }
if (type==null) { if (type==null) {
entry.setEntryParameter(name, value); entry.setEntryParameter(name, value);
return; return;
} }
if ("long".equalsIgnoreCase(type)) { if ("long".equalsIgnoreCase(type)) {
entry.setEntryParameter(name, new Long(value)); entry.setEntryParameter(name, new Long(value));
return; return;

View file

@ -8,6 +8,8 @@
<groupId>com.idcanet.vasc</groupId> <groupId>com.idcanet.vasc</groupId>
<artifactId>vasc-ejb3</artifactId> <artifactId>vasc-ejb3</artifactId>
<version>0.3.3-SNAPSHOT</version> <version>0.3.3-SNAPSHOT</version>
<name>vasc-ejb3</name>
<description>vasc-ejb3</description>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.idcanet.vasc</groupId> <groupId>com.idcanet.vasc</groupId>

View file

@ -8,6 +8,8 @@
<groupId>com.idcanet.vasc</groupId> <groupId>com.idcanet.vasc</groupId>
<artifactId>vasc-frontend-swing</artifactId> <artifactId>vasc-frontend-swing</artifactId>
<version>0.3.3-SNAPSHOT</version> <version>0.3.3-SNAPSHOT</version>
<name>vasc-frontend-swing</name>
<description>vasc-frontend-swing</description>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.idcanet.vasc</groupId> <groupId>com.idcanet.vasc</groupId>

View file

@ -8,6 +8,8 @@
<groupId>com.idcanet.vasc</groupId> <groupId>com.idcanet.vasc</groupId>
<artifactId>vasc-frontend-swt</artifactId> <artifactId>vasc-frontend-swt</artifactId>
<version>0.3.3-SNAPSHOT</version> <version>0.3.3-SNAPSHOT</version>
<name>vasc-frontend-swt</name>
<description>vasc-frontend-swt</description>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.idcanet.vasc</groupId> <groupId>com.idcanet.vasc</groupId>

View file

@ -8,6 +8,8 @@
<groupId>com.idcanet.vasc</groupId> <groupId>com.idcanet.vasc</groupId>
<artifactId>vasc-frontend-web-jsf</artifactId> <artifactId>vasc-frontend-web-jsf</artifactId>
<version>0.3.3-SNAPSHOT</version> <version>0.3.3-SNAPSHOT</version>
<name>vasc-frontend-web-jsf</name>
<description>vasc-frontend-web-jsf</description>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.idcanet.vasc</groupId> <groupId>com.idcanet.vasc</groupId>