Seam SVN: r9406 - in trunk/src/main/org/jboss/seam: util and 1 other directory.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-10-24 02:21:57 -0400 (Fri, 24 Oct 2008)
New Revision: 9406
Modified:
trunk/src/main/org/jboss/seam/security/management/JpaIdentityStore.java
trunk/src/main/org/jboss/seam/util/TypedBeanProperty.java
Log:
optimized
Modified: trunk/src/main/org/jboss/seam/security/management/JpaIdentityStore.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/management/JpaIdentityStore.java 2008-10-24 03:28:28 UTC (rev 9405)
+++ trunk/src/main/org/jboss/seam/security/management/JpaIdentityStore.java 2008-10-24 06:21:57 UTC (rev 9406)
@@ -520,18 +520,27 @@
throw new NoSuchRoleException("Could not delete role, role '" + role + "' does not exist");
}
- for (Principal principal : listMembers(role))
+ if (xrefClass != null)
{
- if (SimplePrincipal.class.equals(principal.getClass()))
+ lookupEntityManager().createQuery("delete " + xrefClass.getName() + " where role = :role")
+ .setParameter("role", roleToDelete)
+ .executeUpdate();
+ }
+ else
+ {
+ List<String> users = listUserMembers(role);
+ for (String user : users)
{
- revokeRole(principal.getName(), role);
+ revokeRole(user, role);
}
- else if (Role.class.equals(principal.getClass()))
- {
- removeRoleFromGroup(principal.getName(), role);
- }
}
+ List<String> roles = listRoleMembers(role);
+ for (String r : roles)
+ {
+ removeRoleFromGroup(r, role);
+ }
+
removeEntity(roleToDelete);
return true;
}
@@ -859,37 +868,65 @@
{
List<Principal> members = new ArrayList<Principal>();
+ for (String user : listUserMembers(role))
+ {
+ members.add(new SimplePrincipal(user));
+ }
+
+ for (String roleName : listRoleMembers(role))
+ {
+ members.add(new Role(roleName));
+ }
+
+ return members;
+ }
+
+ private List<String> listUserMembers(String role)
+ {
Object roleEntity = lookupRole(role);
if (xrefClass == null)
{
- List<String> users = lookupEntityManager().createQuery("select u." + userPrincipalProperty.getName() +
+ return lookupEntityManager().createQuery("select u." + userPrincipalProperty.getName() +
" from " + userClass.getName() + " u where :role member of u." + userRolesProperty.getName())
.setParameter("role", roleEntity)
.getResultList();
+ }
+ else
+ {
+ List xrefs = lookupEntityManager().createQuery("select x from " + xrefClass.getName() + " x where x." +
+ xrefRoleProperty.getName() + " = :role")
+ .setParameter("role", roleEntity)
+ .getResultList();
+
+ List<String> members = new ArrayList<String>();
- for (String user : users)
+ for (Object xref : xrefs)
{
- members.add(new SimplePrincipal(user));
+ Object user = xrefUserProperty.getValue(xref);
+ members.add(userPrincipalProperty.getValue(user).toString());
}
- if (roleGroupsProperty != null)
- {
- List<String> roles = lookupEntityManager().createQuery("select r." + roleNameProperty.getName() +
- " from " + roleClass.getName() + " r where :role member of r." + roleGroupsProperty.getName())
- .setParameter("role", roleEntity)
- .getResultList();
-
- for (String roleName : roles)
- {
- members.add(new Role(roleName));
- }
- }
+ return members;
}
-
- return members;
+
}
+ private List<String> listRoleMembers(String role)
+ {
+ if (roleGroupsProperty != null)
+ {
+ Object roleEntity = lookupRole(role);
+
+ return lookupEntityManager().createQuery("select r." + roleNameProperty.getName() +
+ " from " + roleClass.getName() + " r where :role member of r." + roleGroupsProperty.getName())
+ .setParameter("role", roleEntity)
+ .getResultList();
+ }
+
+ return null;
+ }
+
public List<String> listGrantableRoles()
{
StringBuilder roleQuery = new StringBuilder();
Modified: trunk/src/main/org/jboss/seam/util/TypedBeanProperty.java
===================================================================
--- trunk/src/main/org/jboss/seam/util/TypedBeanProperty.java 2008-10-24 03:28:28 UTC (rev 9405)
+++ trunk/src/main/org/jboss/seam/util/TypedBeanProperty.java 2008-10-24 06:21:57 UTC (rev 9406)
@@ -102,6 +102,11 @@
}
}
+ public String getName()
+ {
+ return name;
+ }
+
public boolean isSet()
{
return set;
16 years, 1 month
Seam SVN: r9405 - trunk.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-10-23 23:28:28 -0400 (Thu, 23 Oct 2008)
New Revision: 9405
Modified:
trunk/seam
trunk/seam.bat
Log:
JBSEAM-3585 (both issues)
Modified: trunk/seam
===================================================================
--- trunk/seam 2008-10-23 21:05:51 UTC (rev 9404)
+++ trunk/seam 2008-10-24 03:28:28 UTC (rev 9405)
@@ -1,16 +1,17 @@
#!/bin/sh
-############################################
-#
-# seam-gen - Seam project and code generator
-#
-############################################
+##############################################
+# #
+# seam-gen - Seam project and code generator #
+# #
+############################################ #
+
# Validate the JDK installation
if [ -z "$JAVA_HOME" ]; then
echo "The JAVA_HOME environment variable is not set"
echo "Please point it to a JDK installation"
exit 1
-elif [ ! -x "$JAVA_HOME"/bin/javac ]; then
+elif [ ! -x "$JAVA_HOME/bin/javac" ]; then
echo "The JAVA_HOME environment variable should point to a JDK, not a JRE"
exit 1
fi
@@ -32,12 +33,11 @@
fi
SEAM_GEN_DIR="$SEAM_HOME/seam-gen"
-SEAM_COMMAND="${1}"
+SEAM_COMMAND="$1"
-echo "Location of seam script: $SEAM_HOME"
-echo "seam-gen template folder: $SEAM_GEN_DIR"
+echo "SEAM_HOME: $SEAM_HOME"
+echo "Using seam-gen sources from: $SEAM_GEN_DIR"
-# OS specific support (must be 'true' or 'false').
cygwin=false;
case "`uname`" in
CYGWIN*)
@@ -50,7 +50,12 @@
elif [ "$SEAM_COMMAND" = help ]; then
cat "$SEAM_GEN_DIR/README"
elif $cygwin; then
- java -cp "${JAVA_HOME}\lib\tools.jar;${SEAM_HOME}\build\lib\ant-launcher.jar;${SEAM_HOME}\build\lib\ant-nodeps.jar;${SEAM_HOME}\build\lib\ant.jar" -Dant.home="${SEAM_HOME}\lib" org.apache.tools.ant.launch.Launcher -buildfile "${SEAM_GEN_DIR}\build.xml" -Dworking.dir="$WORKING_DIR" ${*}
+ # Must pass real Windows paths to Java (Java doesn't execute in the context of cgywin)
+ JAVA_HOME_WINPATH=`cygpath -aw "$JAVA_HOME"`
+ SEAM_HOME_WINPATH=`cygpath -aw "$SEAM_HOME"`
+ SEAM_GEN_DIR_WINPATH=`cygpath -aw "$SEAM_GEN_DIR"`
+ WORKING_DIR_WINPATH=`cygpath -aw "$WORKING_DIR"`
+ "$JAVA_HOME/bin/java" -cp "$JAVA_HOME_WINPATH\lib\tools.jar;$SEAM_HOME_WINPATH\build\lib\ant-launcher.jar;$SEAM_HOME_WINPATH\build\lib\ant-nodeps.jar;$SEAM_HOME_WINPATH\build\lib\ant.jar" -Dant.home="$SEAM_HOME_WINPATH\lib" org.apache.tools.ant.launch.Launcher -buildfile "$SEAM_GEN_DIR_WINPATH\build.xml" -Dworking.dir="$WORKING_DIR_WINPATH" "$@"
else
- java -cp "${JAVA_HOME}/lib/tools.jar:${SEAM_HOME}/build/lib/ant-launcher.jar:${SEAM_HOME}/build/lib/ant-nodeps.jar:${SEAM_HOME}/build/lib/ant.jar" -Dant.home="${SEAM_HOME}/lib" org.apache.tools.ant.launch.Launcher -buildfile "${SEAM_GEN_DIR}/build.xml" -Dworking.dir="$WORKING_DIR" ${*}
+ "$JAVA_HOME/bin/java" -cp "$JAVA_HOME/lib/tools.jar:$SEAM_HOME/build/lib/ant-launcher.jar:$SEAM_HOME/build/lib/ant-nodeps.jar:$SEAM_HOME/build/lib/ant.jar" -Dant.home="$SEAM_HOME/lib" org.apache.tools.ant.launch.Launcher -buildfile "$SEAM_GEN_DIR/build.xml" -Dworking.dir="$WORKING_DIR" "$@"
fi
Modified: trunk/seam.bat
===================================================================
--- trunk/seam.bat 2008-10-23 21:05:51 UTC (rev 9404)
+++ trunk/seam.bat 2008-10-24 03:28:28 UTC (rev 9405)
@@ -1,7 +1,12 @@
@echo off
-@if not "%ECHO%" == "" echo %ECHO%
@if "%OS%" == "Windows_NT" setlocal
+rem ##############################################
+rem # #
+rem # seam-gen - Seam project and code generator #
+rem # #
+rem ##############################################
+
set WORKING_DIR=%CD%
if "%WORKING_DIR:~-1%" == "\" (
set WORKING_DIR=%WORKING_DIR:~0,-1%
@@ -10,7 +15,7 @@
if ["%SEAM_HOME%"] == [""] (
set SEAM_HOME=%~dp0
) else (
- if not exist "%SEAM_HOME\seam" (goto noseam)
+ if not exist "%SEAM_HOME\seam.bat" (goto noseam)
)
if "%SEAM_HOME:~-1%" == "\" (
set SEAM_HOME=%SEAM_HOME:~0,-1%
@@ -19,9 +24,6 @@
set SEAM_GEN_DIR=%SEAM_HOME%\seam-gen
set COMMAND=%1%
-echo Location of seam script: %SEAM_HOME%
-echo seam-gen template folder: %SEAM_GEN_DIR%
-
if [%COMMAND%] == [] (goto usage)
if %COMMAND% == help (goto help)
@@ -30,8 +32,11 @@
if not exist "%JAVA_HOME%\bin\javac.exe" (goto nojdk)
-java -cp "%JAVA_HOME%\lib\tools.jar;%SEAM_HOME%\build\lib\ant-launcher.jar;%SEAM_HOME%\build\lib\ant-nodeps.jar;%SEAM_HOME%\build\lib\ant.jar" -Dant.home="%SEAM_HOME%\lib" org.apache.tools.ant.launch.Launcher -buildfile "%SEAM_GEN_DIR%\build.xml" -Dworking.dir="%WORKING_DIR%" %*
+echo SEAM_HOME: %SEAM_HOME%
+echo Using seam-gen sources from: %SEAM_GEN_DIR%
+"%JAVA_HOME%\bin\java" -cp "%JAVA_HOME%\lib\tools.jar;%SEAM_HOME%\build\lib\ant-launcher.jar;%SEAM_HOME%\build\lib\ant-nodeps.jar;%SEAM_HOME%\build\lib\ant.jar" -Dant.home="%SEAM_HOME%\lib" org.apache.tools.ant.launch.Launcher -buildfile "%SEAM_GEN_DIR%\build.xml" -Dworking.dir="%WORKING_DIR%" %*
+
goto END_NO_PAUSE
:nojava
@@ -48,11 +53,11 @@
goto END_NO_PAUSE
:usage
-more %SEAM_GEN_DIR%\USAGE
+more "%SEAM_GEN_DIR%\USAGE"
goto END_NO_PAUSE
:help
-more %SEAM_GEN_DIR%\README
+more "%SEAM_GEN_DIR%\README"
goto END_NO_PAUSE
:END_NO_PAUSE
16 years, 1 month
Seam SVN: r9404 - trunk/src/main/org/jboss/seam/deployment.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-10-23 17:05:51 -0400 (Thu, 23 Oct 2008)
New Revision: 9404
Modified:
trunk/src/main/org/jboss/seam/deployment/FileDescriptor.java
Log:
print out the classloader
Modified: trunk/src/main/org/jboss/seam/deployment/FileDescriptor.java
===================================================================
--- trunk/src/main/org/jboss/seam/deployment/FileDescriptor.java 2008-10-23 19:21:17 UTC (rev 9403)
+++ trunk/src/main/org/jboss/seam/deployment/FileDescriptor.java 2008-10-23 21:05:51 UTC (rev 9404)
@@ -19,12 +19,12 @@
this.name = name;
if (name == null)
{
- throw new NullPointerException("Name cannot be null");
+ throw new NullPointerException("Name cannot be null, loading from " + classLoader);
}
this.url = classLoader.getResource(name);
if (this.url == null)
{
- throw new NullPointerException("Cannot find URL from classLoader for " + name);
+ throw new NullPointerException("Cannot find URL from classLoader for " + name + ", loading from " + classLoader);
}
}
16 years, 1 month
Seam SVN: r9403 - branches/enterprise/JBPAPP_4_3_FP01/build.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2008-10-23 15:21:17 -0400 (Thu, 23 Oct 2008)
New Revision: 9403
Modified:
branches/enterprise/JBPAPP_4_3_FP01/build/gen.pom.xml
Log:
JBPAPP-1310
Modified: branches/enterprise/JBPAPP_4_3_FP01/build/gen.pom.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/build/gen.pom.xml 2008-10-23 18:53:40 UTC (rev 9402)
+++ branches/enterprise/JBPAPP_4_3_FP01/build/gen.pom.xml 2008-10-23 19:21:17 UTC (rev 9403)
@@ -22,8 +22,8 @@
</dependency>
<dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate</artifactId>
+ <groupId>hibernate</groupId>
+ <artifactId>hibernate3</artifactId>
<scope>compile</scope>
</dependency>
16 years, 1 month
Seam SVN: r9402 - in trunk/seam-gen: view and 1 other directory.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-10-23 14:53:40 -0400 (Thu, 23 Oct 2008)
New Revision: 9402
Modified:
trunk/seam-gen/icefaces/view/edit.xhtml.ftl
trunk/seam-gen/icefaces/view/view.xhtml.ftl
trunk/seam-gen/view/edit.xhtml.ftl
trunk/seam-gen/view/view.xhtml.ftl
Log:
use the variable name grandparent rather than parentParent
Modified: trunk/seam-gen/icefaces/view/edit.xhtml.ftl
===================================================================
--- trunk/seam-gen/icefaces/view/edit.xhtml.ftl 2008-10-23 18:53:05 UTC (rev 9401)
+++ trunk/seam-gen/icefaces/view/edit.xhtml.ftl 2008-10-23 18:53:40 UTC (rev 9402)
@@ -120,18 +120,18 @@
</#if>
</#if>
<#if isToOne(parentProperty)>
-<#assign parentParentPojo = c2j.getPOJOClass(cfg.getClassMapping(parentProperty.value.referencedEntityName))>
-<#if parentParentPojo.isComponent(parentParentPojo.identifierProperty)>
-<#foreach componentProperty in parentParentPojo.identifierProperty.value.propertyIterator>
+<#assign grandparentPojo = c2j.getPOJOClass(cfg.getClassMapping(parentProperty.value.referencedEntityName))>
+<#if grandparentPojo.isComponent(grandparentPojo.identifierProperty)>
+<#foreach componentProperty in grandparentPojo.identifierProperty.value.propertyIterator>
<ice:column id="$editColumn${parentProperty.name}Id">
<f:facet name="header">${label(parentProperty.name)} ${label(componentProperty.name)?uncap_first}</f:facet>
- ${'#'}{${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}.${componentProperty.name}}
+ ${'#'}{${parentName}.${parentProperty.name}.${grandparentPojo.identifierProperty.name}.${componentProperty.name}}
</ice:column>
</#foreach>
<#else>
<ice:column id="$editColumn${parentProperty.name}Id">
- <f:facet name="header">${label(parentProperty.name)} ${label(parentParentPojo.identifierProperty.name)?uncap_first}</f:facet>
- ${'#'}{${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}}
+ <f:facet name="header">${label(parentProperty.name)} ${label(grandparentPojo.identifierProperty.name)?uncap_first}</f:facet>
+ ${'#'}{${parentName}.${parentProperty.name}.${grandparentPojo.identifierProperty.name}}
</ice:column>
</#if>
</#if>
Modified: trunk/seam-gen/icefaces/view/view.xhtml.ftl
===================================================================
--- trunk/seam-gen/icefaces/view/view.xhtml.ftl 2008-10-23 18:53:05 UTC (rev 9401)
+++ trunk/seam-gen/icefaces/view/view.xhtml.ftl 2008-10-23 18:53:40 UTC (rev 9402)
@@ -98,18 +98,18 @@
</#if>
</#if>
<#if isToOne(parentProperty)>
-<#assign parentParentPojo = c2j.getPOJOClass(cfg.getClassMapping(parentProperty.value.referencedEntityName))>
-<#if parentParentPojo.isComponent(parentParentPojo.identifierProperty)>
-<#foreach componentProperty in parentParentPojo.identifierProperty.value.propertyIterator>
+<#assign grandparentPojo = c2j.getPOJOClass(cfg.getClassMapping(parentProperty.value.referencedEntityName))>
+<#if grandparentPojo.isComponent(grandparentPojo.identifierProperty)>
+<#foreach componentProperty in grandparentPojo.identifierProperty.value.propertyIterator>
<ice:column id="view${parentProperty.name}ColumnId">
<f:facet name="header">${label(parentProperty.name)} ${label(componentProperty.name)?uncap_first}</f:facet>
- ${'#'}{${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}.${componentProperty.name}}
+ ${'#'}{${parentName}.${parentProperty.name}.${grandparentPojo.identifierProperty.name}.${componentProperty.name}}
</ice:column>
</#foreach>
<#else>
- <ice:column id="view${parentParentPojo.identifierProperty.name}ColumnName">
- <f:facet name="header">${label(parentProperty.name)} ${label(parentParentPojo.identifierProperty.name)?uncap_first}</f:facet>
- ${'#'}{${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}}
+ <ice:column id="view${grandparentPojo.identifierProperty.name}ColumnName">
+ <f:facet name="header">${label(parentProperty.name)} ${label(grandparentPojo.identifierProperty.name)?uncap_first}</f:facet>
+ ${'#'}{${parentName}.${parentProperty.name}.${grandparentPojo.identifierProperty.name}}
</ice:column>
</#if>
</#if>
Modified: trunk/seam-gen/view/edit.xhtml.ftl
===================================================================
--- trunk/seam-gen/view/edit.xhtml.ftl 2008-10-23 18:53:05 UTC (rev 9401)
+++ trunk/seam-gen/view/edit.xhtml.ftl 2008-10-23 18:53:40 UTC (rev 9402)
@@ -113,18 +113,18 @@
</#if>
</#if>
<#if isToOne(parentProperty)>
-<#assign parentParentPojo = c2j.getPOJOClass(cfg.getClassMapping(parentProperty.value.referencedEntityName))>
-<#if parentParentPojo.isComponent(parentParentPojo.identifierProperty)>
-<#foreach componentProperty in parentParentPojo.identifierProperty.value.propertyIterator>
+<#assign grandparentPojo = c2j.getPOJOClass(cfg.getClassMapping(parentProperty.value.referencedEntityName))>
+<#if grandparentPojo.isComponent(grandparentPojo.identifierProperty)>
+<#foreach componentProperty in grandparentPojo.identifierProperty.value.propertyIterator>
<h:column>
<f:facet name="header">${label(parentProperty.name)} ${label(componentProperty.name)?uncap_first}</f:facet>
- <@outputValue property=componentProperty expression="${'#'}{_${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}.${componentProperty.name}}" indent=16/>
+ <@outputValue property=componentProperty expression="${'#'}{_${parentName}.${parentProperty.name}.${grandparentPojo.identifierProperty.name}.${componentProperty.name}}" indent=16/>
</h:column>
</#foreach>
<#else>
<h:column>
- <f:facet name="header">${label(parentProperty.name)} ${label(parentParentPojo.identifierProperty.name)?uncap_first}</f:facet>
- <@outputValue property=parentParentPojo.identifierProperty expression="${'#'}{_${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}}" indent=16/>
+ <f:facet name="header">${label(parentProperty.name)} ${label(grandparentPojo.identifierProperty.name)?uncap_first}</f:facet>
+ <@outputValue property=grandparentPojo.identifierProperty expression="${'#'}{_${parentName}.${parentProperty.name}.${grandparentPojo.identifierProperty.name}}" indent=16/>
</h:column>
</#if>
</#if>
Modified: trunk/seam-gen/view/view.xhtml.ftl
===================================================================
--- trunk/seam-gen/view/view.xhtml.ftl 2008-10-23 18:53:05 UTC (rev 9401)
+++ trunk/seam-gen/view/view.xhtml.ftl 2008-10-23 18:53:40 UTC (rev 9402)
@@ -86,18 +86,18 @@
</#if>
</#if>
<#if isToOne(parentProperty)>
-<#assign parentParentPojo = c2j.getPOJOClass(cfg.getClassMapping(parentProperty.value.referencedEntityName))>
-<#if parentParentPojo.isComponent(parentParentPojo.identifierProperty)>
-<#foreach componentProperty in parentParentPojo.identifierProperty.value.propertyIterator>
+<#assign grandparentPojo = c2j.getPOJOClass(cfg.getClassMapping(parentProperty.value.referencedEntityName))>
+<#if grandparentPojo.isComponent(grandparentPojo.identifierProperty)>
+<#foreach componentProperty in grandparentPojo.identifierProperty.value.propertyIterator>
<h:column>
<f:facet name="header">${label(parentProperty.name)} ${label(componentProperty.name)?uncap_first}</f:facet>
- <@outputValue property=componentProperty expression="${'#'}{_${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}.${componentProperty.name}}" indent=16/>
+ <@outputValue property=componentProperty expression="${'#'}{_${parentName}.${parentProperty.name}.${grandparentPojo.identifierProperty.name}.${componentProperty.name}}" indent=16/>
</h:column>
</#foreach>
<#else>
<h:column>
- <f:facet name="header">${label(parentProperty.name)} ${label(parentParentPojo.identifierProperty.name)?uncap_first}</f:facet>
- <@outputValue property=parentParentPojo.identifierProperty expression="${'#'}{_${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}}" indent=16/>
+ <f:facet name="header">${label(parentProperty.name)} ${label(grandparentPojo.identifierProperty.name)?uncap_first}</f:facet>
+ <@outputValue property=grandparentPojo.identifierProperty expression="${'#'}{_${parentName}.${parentProperty.name}.${grandparentPojo.identifierProperty.name}}" indent=16/>
</h:column>
</#if>
</#if>
16 years, 1 month
Seam SVN: r9401 - trunk.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-10-23 14:53:05 -0400 (Thu, 23 Oct 2008)
New Revision: 9401
Modified:
trunk/seam.bat
Log:
JBSEAM-3585 (sub-issue 2)
Modified: trunk/seam.bat
===================================================================
--- trunk/seam.bat 2008-10-23 18:50:06 UTC (rev 9400)
+++ trunk/seam.bat 2008-10-23 18:53:05 UTC (rev 9401)
@@ -1,35 +1,52 @@
@echo off
@if not "%ECHO%" == "" echo %ECHO%
-@if "%OS%" == "Windows_NT" setlocal
+@if "%OS%" == "Windows_NT" setlocal
set WORKING_DIR=%CD%
-set SEAM_DIR=%~dp0
-if "%SEAM_DIR:~-1%" == "\" set SEAM_DIR=%SEAM_DIR:~0,-1%
-set SEAM_GEN_DIR=%SEAM_DIR%\seam-gen
+if "%WORKING_DIR:~-1%" == "\" (
+ set WORKING_DIR=%WORKING_DIR:~0,-1%
+)
+
+if ["%SEAM_HOME%"] == [""] (
+ set SEAM_HOME=%~dp0
+) else (
+ if not exist "%SEAM_HOME\seam" (goto noseam)
+)
+if "%SEAM_HOME:~-1%" == "\" (
+ set SEAM_HOME=%SEAM_HOME:~0,-1%
+)
+
+set SEAM_GEN_DIR=%SEAM_HOME%\seam-gen
set COMMAND=%1%
-set ARGS=%*
+echo Location of seam script: %SEAM_HOME%
+echo seam-gen template folder: %SEAM_GEN_DIR%
+
if [%COMMAND%] == [] (goto usage)
if %COMMAND% == help (goto help)
-if ["%JAVA_HOME%"] == [] (goto nojava)
+if ["%JAVA_HOME%"] == [""] (goto nojava)
if not exist "%JAVA_HOME%\bin\javac.exe" (goto nojdk)
-java -cp "%JAVA_HOME%\lib\tools.jar;%SEAM_DIR%\build\lib\ant-launcher.jar;%SEAM_DIR%\build\lib\ant-nodeps.jar;%SEAM_DIR%\build\lib\ant.jar" -Dant.home="%SEAM_DIR%\lib" org.apache.tools.ant.launch.Launcher -buildfile "%SEAM_GEN_DIR%\build.xml" -Dworking.dir=%WORKING_DIR% %ARGS%
+java -cp "%JAVA_HOME%\lib\tools.jar;%SEAM_HOME%\build\lib\ant-launcher.jar;%SEAM_HOME%\build\lib\ant-nodeps.jar;%SEAM_HOME%\build\lib\ant.jar" -Dant.home="%SEAM_HOME%\lib" org.apache.tools.ant.launch.Launcher -buildfile "%SEAM_GEN_DIR%\build.xml" -Dworking.dir="%WORKING_DIR%" %*
goto END_NO_PAUSE
:nojava
echo The JAVA_HOME environment variable is not set
-echo Please point it to a valid JDK installation
+echo Please point it to a JDK installation
goto END_NO_PAUSE
:nojdk
echo The JAVA_HOME environment variable should point to a JDK, not a JRE
goto END_NO_PAUSE
+:noseam
+echo The SEAM_HOME environment variable should point to a Seam distribution
+goto END_NO_PAUSE
+
:usage
more %SEAM_GEN_DIR%\USAGE
goto END_NO_PAUSE
@@ -38,4 +55,4 @@
more %SEAM_GEN_DIR%\README
goto END_NO_PAUSE
-:END_NO_PAUSE
\ No newline at end of file
+:END_NO_PAUSE
16 years, 1 month
Seam SVN: r9400 - trunk.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-10-23 14:50:06 -0400 (Thu, 23 Oct 2008)
New Revision: 9400
Modified:
trunk/seam
Log:
cleanup whitespace and wording
Modified: trunk/seam
===================================================================
--- trunk/seam 2008-10-23 17:47:02 UTC (rev 9399)
+++ trunk/seam 2008-10-23 18:50:06 UTC (rev 9400)
@@ -8,7 +8,7 @@
# Validate the JDK installation
if [ -z "$JAVA_HOME" ]; then
echo "The JAVA_HOME environment variable is not set"
- echo "Please point it to a valid JDK installation"
+ echo "Please point it to a JDK installation"
exit 1
elif [ ! -x "$JAVA_HOME"/bin/javac ]; then
echo "The JAVA_HOME environment variable should point to a JDK, not a JRE"
@@ -50,7 +50,7 @@
elif [ "$SEAM_COMMAND" = help ]; then
cat "$SEAM_GEN_DIR/README"
elif $cygwin; then
- java -cp "${JAVA_HOME}\lib\tools.jar;${SEAM_HOME}\build\lib\ant-launcher.jar;${SEAM_HOME}\build\lib\ant-nodeps.jar;${SEAM_HOME}\build\lib\ant.jar" -Dant.home="${SEAM_HOME}\lib" org.apache.tools.ant.launch.Launcher -buildfile "${SEAM_GEN_DIR}\build.xml" -Dworking.dir="$WORKING_DIR" ${*}
+ java -cp "${JAVA_HOME}\lib\tools.jar;${SEAM_HOME}\build\lib\ant-launcher.jar;${SEAM_HOME}\build\lib\ant-nodeps.jar;${SEAM_HOME}\build\lib\ant.jar" -Dant.home="${SEAM_HOME}\lib" org.apache.tools.ant.launch.Launcher -buildfile "${SEAM_GEN_DIR}\build.xml" -Dworking.dir="$WORKING_DIR" ${*}
else
- java -cp "${JAVA_HOME}/lib/tools.jar:${SEAM_HOME}/build/lib/ant-launcher.jar:${SEAM_HOME}/build/lib/ant-nodeps.jar:${SEAM_HOME}/build/lib/ant.jar" -Dant.home="${SEAM_HOME}/lib" org.apache.tools.ant.launch.Launcher -buildfile "${SEAM_GEN_DIR}/build.xml" -Dworking.dir="$WORKING_DIR" ${*}
+ java -cp "${JAVA_HOME}/lib/tools.jar:${SEAM_HOME}/build/lib/ant-launcher.jar:${SEAM_HOME}/build/lib/ant-nodeps.jar:${SEAM_HOME}/build/lib/ant.jar" -Dant.home="${SEAM_HOME}/lib" org.apache.tools.ant.launch.Launcher -buildfile "${SEAM_GEN_DIR}/build.xml" -Dworking.dir="$WORKING_DIR" ${*}
fi
16 years, 1 month
Seam SVN: r9399 - trunk/src/excel/META-INF.
by seam-commits@lists.jboss.org
Author: danielc.roth
Date: 2008-10-23 13:47:02 -0400 (Thu, 23 Oct 2008)
New Revision: 9399
Modified:
trunk/src/excel/META-INF/faces-config.xml
trunk/src/excel/META-INF/seam-excel.taglib.xml
Log:
JBSEAM-3620
Modified: trunk/src/excel/META-INF/faces-config.xml
===================================================================
--- trunk/src/excel/META-INF/faces-config.xml 2008-10-23 17:41:31 UTC (rev 9398)
+++ trunk/src/excel/META-INF/faces-config.xml 2008-10-23 17:47:02 UTC (rev 9399)
@@ -84,10 +84,6 @@
<component-type>org.jboss.seam.excel.ui.command.UIRowPageBreak</component-type>
<component-class>org.jboss.seam.excel.ui.command.UIRowPageBreak</component-class>
</component>
- <component>
- <component-type>org.jboss.seam.excel.ui.UIExcelExport</component-type>
- <component-class>org.jboss.seam.excel.ui.UIExcelExport</component-class>
- </component>
<component>
<component-type>org.jboss.seam.excel.ui.UILink</component-type>
<component-class>org.jboss.seam.excel.ui.UILink</component-class>
Modified: trunk/src/excel/META-INF/seam-excel.taglib.xml
===================================================================
--- trunk/src/excel/META-INF/seam-excel.taglib.xml 2008-10-23 17:41:31 UTC (rev 9398)
+++ trunk/src/excel/META-INF/seam-excel.taglib.xml 2008-10-23 17:47:02 UTC (rev 9399)
@@ -146,13 +146,6 @@
</component>
</tag>
- <tag>
- <tag-name>excelExport</tag-name>
- <component>
- <component-type>org.jboss.seam.excel.ui.UIExcelExport</component-type>
- </component>
- </tag>
-
<tag>
<tag-name>debug</tag-name>
<component>
16 years, 1 month
Seam SVN: r9398 - in branches/enterprise/JBPAPP_4_3_FP01: seam-gen/icefaces/view and 3 other directories.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2008-10-23 13:41:31 -0400 (Thu, 23 Oct 2008)
New Revision: 9398
Modified:
branches/enterprise/JBPAPP_4_3_FP01/build/gen.pom.xml
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/edit.xhtml.ftl
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/editproperty.xhtml.ftl
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/list.page.xml.ftl
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/list.xhtml.ftl
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/param.xml.ftl
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/view.xhtml.ftl
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/src/EntityHome.java.ftl
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/src/EntityList.java.ftl
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/edit.xhtml.ftl
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/editproperty.xhtml.ftl
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/list.page.xml.ftl
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/list.xhtml.ftl
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/param.xml.ftl
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/view.xhtml.ftl
branches/enterprise/JBPAPP_4_3_FP01/src/gen/org/jboss/seam/tool/Util.java
Log:
JBPAPP-1310
Modified: branches/enterprise/JBPAPP_4_3_FP01/build/gen.pom.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/build/gen.pom.xml 2008-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/build/gen.pom.xml 2008-10-23 17:41:31 UTC (rev 9398)
@@ -23,6 +23,12 @@
<dependency>
<groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.hibernate</groupId>
<artifactId>hibernate-tools</artifactId>
<scope>runtime</scope>
</dependency>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/edit.xhtml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/edit.xhtml.ftl 2008-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/edit.xhtml.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -75,7 +75,7 @@
</ice:form>
<#assign hasAssociations=false>
<#foreach property in pojo.allPropertiesIterator>
-<#if c2h.isManyToOne(property) || c2h.isOneToManyCollection(property)>
+<#if util.isToOne(property) || c2h.isOneToManyCollection(property)>
<#assign hasAssociations=true>
</#if>
</#foreach>
@@ -85,7 +85,7 @@
<ice:panelTabSet id="editPanelTab${homeName}Id" styleClass="componentPanelTabSetLayout" style="margin-bottom:5px;margin-top:10px;">
</#if>
<#foreach property in pojo.allPropertiesIterator>
-<#if c2h.isManyToOne(property)>
+<#if util.isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#assign parentPageName = parentPojo.shortName>
<#assign parentName = util.lower(parentPojo.shortName)>
@@ -106,7 +106,7 @@
columnClasses="allCols"
id="edit${property.name}TableId">
<#foreach parentProperty in parentPojo.allPropertiesIterator>
-<#if !c2h.isCollection(parentProperty) && !c2h.isManyToOne(parentProperty) && parentProperty != parentPojo.versionProperty!>
+<#if !c2h.isCollection(parentProperty) && !util.isToOne(parentProperty) && parentProperty != parentPojo.versionProperty!>
<#if parentPojo.isComponent(parentProperty)>
<#foreach componentProperty in parentProperty.value.propertyIterator>
<ice:column id="editColumn${componentProperty.name}Id">
@@ -121,7 +121,7 @@
</ice:column>
</#if>
</#if>
-<#if c2h.isManyToOne(parentProperty)>
+<#if util.isToOne(parentProperty)>
<#assign parentParentPojo = c2j.getPOJOClass(cfg.getClassMapping(parentProperty.value.referencedEntityName))>
<#if parentParentPojo.isComponent(parentParentPojo.identifierProperty)>
<#foreach componentProperty in parentParentPojo.identifierProperty.value.propertyIterator>
@@ -187,7 +187,7 @@
columnClasses="allCols"
id="edit${property.name}Table">
<#foreach childProperty in childPojo.allPropertiesIterator>
-<#if !c2h.isCollection(childProperty) && !c2h.isManyToOne(childProperty) && childProperty != childPojo.versionProperty!>
+<#if !c2h.isCollection(childProperty) && !util.isToOne(childProperty) && childProperty != childPojo.versionProperty!>
<#if childPojo.isComponent(childProperty)>
<#foreach componentProperty in childProperty.value.propertyIterator>
<ice:column id="edit${componentProperty.name}Id">
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/editproperty.xhtml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/editproperty.xhtml.ftl 2008-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/editproperty.xhtml.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -1,6 +1,6 @@
<#include "../util/TypeInfo.ftl">
-<#if !c2h.isCollection(property) && !c2h.isManyToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
<#assign propertyIsId = property.equals(pojo.identifierProperty)>
<#if !propertyIsId || property.value.identifierGeneratorStrategy == "assigned">
<#if pojo.isComponent(property)>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/list.page.xml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/list.page.xml.ftl 2008-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/list.page.xml.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -17,7 +17,7 @@
<param name="order" value="${'#'}{${listName}.order}"/>
<param name="from"/>
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !c2h.isManyToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
<#if c2j.isComponent(property)>
<#foreach componentProperty in property.value.propertyIterator>
<#if isString(componentProperty)>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/list.xhtml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/list.xhtml.ftl 2008-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/list.xhtml.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -33,7 +33,7 @@
<ice:panelGroup id="listPanelGroup${entityName}Id" styleClass="edit">
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !c2h.isManyToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
<#if c2j.isComponent(property)>
<#foreach componentProperty in property.value.propertyIterator>
<#if isString(componentProperty)>
@@ -85,7 +85,7 @@
columnClasses="allCols"
rendered="${'#'}{not empty ${listName}.resultList}">
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !c2h.isManyToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
<#if pojo.isComponent(property)>
<#foreach componentProperty in property.value.propertyIterator>
<ice:column id="list${componentProperty.name}Id">
@@ -106,7 +106,7 @@
</ice:column>
</#if>
</#if>
-<#if c2h.isManyToOne(property)>
+<#if util.isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#if parentPojo.isComponent(parentPojo.identifierProperty)>
<#foreach componentProperty in parentPojo.identifierProperty.value.propertyIterator>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/param.xml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/param.xml.ftl 2008-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/param.xml.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -1,5 +1,5 @@
<#foreach property in pojo.allPropertiesIterator>
-<#if c2h.isManyToOne(property)>
+<#if util.isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#if entities.add(parentPojo.shortName)>
<#assign parentComponentName = util.lower(parentPojo.shortName)>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/view.xhtml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/view.xhtml.ftl 2008-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/view.xhtml.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -28,7 +28,7 @@
</table>
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !c2h.isManyToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
<#include "viewproperty.xhtml.ftl">
</#if>
</#foreach>
@@ -51,7 +51,7 @@
<#assign hasAssociations=false>
<#foreach property in pojo.allPropertiesIterator>
-<#if c2h.isManyToOne(property) || c2h.isOneToManyCollection(property)>
+<#if util.isToOne(property) || c2h.isOneToManyCollection(property)>
<#assign hasAssociations=true>
</#if>
</#foreach>
@@ -63,7 +63,7 @@
style="margin-bottom:5px;margin-top:10px;">
</#if>
<#foreach property in pojo.allPropertiesIterator>
-<#if c2h.isManyToOne(property)>
+<#if util.isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#assign parentPageName = parentPojo.shortName>
<#assign parentName = util.lower(parentPojo.shortName)>
@@ -82,7 +82,7 @@
columnClasses="allCols"
id="view${property.name}TableId">
<#foreach parentProperty in parentPojo.allPropertiesIterator>
-<#if !c2h.isCollection(parentProperty) && !c2h.isManyToOne(parentProperty) && parentProperty != parentPojo.versionProperty!>
+<#if !c2h.isCollection(parentProperty) && !util.isToOne(parentProperty) && parentProperty != parentPojo.versionProperty!>
<#if parentPojo.isComponent(parentProperty)>
<#foreach componentProperty in parentProperty.value.propertyIterator>
<ice:column id="viewColumn${componentProperty.name}Id">
@@ -97,7 +97,7 @@
</ice:column>
</#if>
</#if>
-<#if c2h.isManyToOne(parentProperty)>
+<#if util.isToOne(parentProperty)>
<#assign parentParentPojo = c2j.getPOJOClass(cfg.getClassMapping(parentProperty.value.referencedEntityName))>
<#if parentParentPojo.isComponent(parentParentPojo.identifierProperty)>
<#foreach componentProperty in parentParentPojo.identifierProperty.value.propertyIterator>
@@ -156,7 +156,7 @@
columnClasses="allCols"
id="view${property.name}TableId">
<#foreach childProperty in childPojo.allPropertiesIterator>
-<#if !c2h.isCollection(childProperty) && !c2h.isManyToOne(childProperty) && childProperty != childPojo.versionProperty!>
+<#if !c2h.isCollection(childProperty) && !util.isToOne(childProperty) && childProperty != childPojo.versionProperty!>
<#if childPojo.isComponent(childProperty)>
<#foreach componentProperty in childProperty.value.propertyIterator>
<ice:column id="view${componentProperty.name}Id">
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/src/EntityHome.java.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/src/EntityHome.java.ftl 2008-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/src/EntityHome.java.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -8,7 +8,7 @@
{
<#foreach property in pojo.allPropertiesIterator>
-<#if c2h.isManyToOne(property)>
+<#if util.isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#assign parentHomeName = util.lower(parentPojo.shortName) + "Home">
@${pojo.importType("org.jboss.seam.annotations.In")}(create=true)
@@ -70,7 +70,7 @@
{
getInstance();
<#foreach property in pojo.allPropertiesIterator>
-<#if c2h.isManyToOne(property)>
+<#if util.isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#if parentPojo.shortName!=pojo.shortName>
<#assign parentHomeName = util.lower(parentPojo.shortName) + "Home">
@@ -88,7 +88,7 @@
public boolean isWired()
{
<#foreach property in pojo.allPropertiesIterator>
-<#if (c2h.isManyToOne(property) && !property.optional)>
+<#if (util.isToOne(property) && !property.optional)>
<#assign getter = pojo.getGetterSignature(property)>
if ( getInstance().${getter}()==null ) return false;
</#if>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/src/EntityList.java.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/src/EntityList.java.ftl 2008-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/src/EntityList.java.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -18,7 +18,7 @@
private static final String[] RESTRICTIONS = {
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !c2h.isManyToOne(property)>
+<#if !c2h.isCollection(property) && !util.isToOne(property)>
<#if c2j.isComponent(property)>
<#foreach componentProperty in property.value.propertyIterator>
<#if isString(componentProperty)>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/edit.xhtml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/edit.xhtml.ftl 2008-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/edit.xhtml.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -69,7 +69,7 @@
</h:form>
<#assign hasAssociations=false>
<#foreach property in pojo.allPropertiesIterator>
-<#if c2h.isManyToOne(property) || c2h.isOneToManyCollection(property)>
+<#if util.isToOne(property) || c2h.isOneToManyCollection(property)>
<#assign hasAssociations=true>
</#if>
</#foreach>
@@ -78,7 +78,7 @@
<rich:tabPanel switchType="ajax">
</#if>
<#foreach property in pojo.allPropertiesIterator>
-<#if c2h.isManyToOne(property)>
+<#if util.isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#assign parentPageName = parentPojo.shortName>
<#assign parentName = util.lower(parentPojo.shortName)>
@@ -99,7 +99,7 @@
rowClasses="rvgRowOne,rvgRowTwo"
id="${property.name}Table">
<#foreach parentProperty in parentPojo.allPropertiesIterator>
-<#if !c2h.isCollection(parentProperty) && !c2h.isManyToOne(parentProperty) && parentProperty != parentPojo.versionProperty!>
+<#if !c2h.isCollection(parentProperty) && !util.isToOne(parentProperty) && parentProperty != parentPojo.versionProperty!>
<#if parentPojo.isComponent(parentProperty)>
<#foreach componentProperty in parentProperty.value.propertyIterator>
<h:column>
@@ -114,7 +114,7 @@
</h:column>
</#if>
</#if>
-<#if c2h.isManyToOne(parentProperty)>
+<#if util.isToOne(parentProperty)>
<#assign parentParentPojo = c2j.getPOJOClass(cfg.getClassMapping(parentProperty.value.referencedEntityName))>
<#if parentParentPojo.isComponent(parentParentPojo.identifierProperty)>
<#foreach componentProperty in parentParentPojo.identifierProperty.value.propertyIterator>
@@ -180,7 +180,7 @@
rowClasses="rvgRowOne,rvgRowTwo"
id="${property.name}Table">
<#foreach childProperty in childPojo.allPropertiesIterator>
-<#if !c2h.isCollection(childProperty) && !c2h.isManyToOne(childProperty) && childProperty != childPojo.versionProperty!>
+<#if !c2h.isCollection(childProperty) && !util.isToOne(childProperty) && childProperty != childPojo.versionProperty!>
<#if childPojo.isComponent(childProperty)>
<#foreach componentProperty in childProperty.value.propertyIterator>
<h:column>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/editproperty.xhtml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/editproperty.xhtml.ftl 2008-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/editproperty.xhtml.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -1,6 +1,6 @@
<#include "../util/TypeInfo.ftl">
-<#if !c2h.isCollection(property) && !c2h.isManyToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
<#assign propertyIsId = property.equals(pojo.identifierProperty)>
<#if !propertyIsId || property.value.identifierGeneratorStrategy == "assigned">
<#if pojo.isComponent(property)>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/list.page.xml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/list.page.xml.ftl 2008-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/list.page.xml.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -11,7 +11,7 @@
<param name="order" value="${'#'}{${listName}.order}"/>
<param name="from"/>
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !c2h.isManyToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
<#if c2j.isComponent(property)>
<#foreach componentProperty in property.value.propertyIterator>
<#if isString(componentProperty)>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/list.xhtml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/list.xhtml.ftl 2008-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/list.xhtml.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -26,7 +26,7 @@
<rich:simpleTogglePanel label="${entityName} search parameters" switchType="ajax">
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !c2h.isManyToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
<#if c2j.isComponent(property)>
<#foreach componentProperty in property.value.propertyIterator>
<#if isString(componentProperty)>
@@ -69,7 +69,7 @@
value="${'#'}{${listName}.resultList}"
rendered="${'#'}{not empty ${listName}.resultList}">
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !c2h.isManyToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
<#if pojo.isComponent(property)>
<#foreach componentProperty in property.value.propertyIterator>
<h:column>
@@ -89,7 +89,7 @@
</h:column>
</#if>
</#if>
-<#if c2h.isManyToOne(property)>
+<#if util.isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#if parentPojo.isComponent(parentPojo.identifierProperty)>
<#foreach componentProperty in parentPojo.identifierProperty.value.propertyIterator>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/param.xml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/param.xml.ftl 2008-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/param.xml.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -1,5 +1,5 @@
<#foreach property in pojo.allPropertiesIterator>
-<#if c2h.isManyToOne(property)>
+<#if util.isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#if entities.add(parentPojo.shortName)>
<#assign parentComponentName = util.lower(parentPojo.shortName)>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/view.xhtml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/view.xhtml.ftl 2008-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/view.xhtml.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -21,7 +21,7 @@
<rich:panel>
<f:facet name="header">${entityName}</f:facet>
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !c2h.isManyToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
<#include "viewproperty.xhtml.ftl">
</#if>
</#foreach>
@@ -43,7 +43,7 @@
</div>
<#assign hasAssociations=false>
<#foreach property in pojo.allPropertiesIterator>
-<#if c2h.isManyToOne(property) || c2h.isOneToManyCollection(property)>
+<#if util.isToOne(property) || c2h.isOneToManyCollection(property)>
<#assign hasAssociations=true>
</#if>
</#foreach>
@@ -52,7 +52,7 @@
<rich:tabPanel switchType="ajax">
</#if>
<#foreach property in pojo.allPropertiesIterator>
-<#if c2h.isManyToOne(property)>
+<#if util.isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#assign parentPageName = parentPojo.shortName>
<#assign parentName = util.lower(parentPojo.shortName)>
@@ -69,7 +69,7 @@
rowClasses="rvgRowOne,rvgRowTwo"
id="${property.name}Table">
<#foreach parentProperty in parentPojo.allPropertiesIterator>
-<#if !c2h.isCollection(parentProperty) && !c2h.isManyToOne(parentProperty) && parentProperty != parentPojo.versionProperty!>
+<#if !c2h.isCollection(parentProperty) && !util.isToOne(parentProperty) && parentProperty != parentPojo.versionProperty!>
<#if parentPojo.isComponent(parentProperty)>
<#foreach componentProperty in parentProperty.value.propertyIterator>
<h:column>
@@ -84,7 +84,7 @@
</h:column>
</#if>
</#if>
-<#if c2h.isManyToOne(parentProperty)>
+<#if util.isToOne(parentProperty)>
<#assign parentParentPojo = c2j.getPOJOClass(cfg.getClassMapping(parentProperty.value.referencedEntityName))>
<#if parentParentPojo.isComponent(parentParentPojo.identifierProperty)>
<#foreach componentProperty in parentParentPojo.identifierProperty.value.propertyIterator>
@@ -141,7 +141,7 @@
rowClasses="rvgRowOne,rvgRowTwo"
id="${property.name}Table">
<#foreach childProperty in childPojo.allPropertiesIterator>
-<#if !c2h.isCollection(childProperty) && !c2h.isManyToOne(childProperty) && childProperty != childPojo.versionProperty!>
+<#if !c2h.isCollection(childProperty) && !util.isToOne(childProperty) && childProperty != childPojo.versionProperty!>
<#if childPojo.isComponent(childProperty)>
<#foreach componentProperty in childProperty.value.propertyIterator>
<h:column>
Modified: branches/enterprise/JBPAPP_4_3_FP01/src/gen/org/jboss/seam/tool/Util.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/gen/org/jboss/seam/tool/Util.java 2008-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/gen/org/jboss/seam/tool/Util.java 2008-10-23 17:41:31 UTC (rev 9398)
@@ -3,12 +3,19 @@
import java.util.HashSet;
import java.util.Set;
+import org.hibernate.mapping.Property;
+import org.hibernate.mapping.ToOne;
+
public class Util
{
public String lower(String name)
{
return name.substring(0, 1).toLowerCase() + name.substring(1);
}
+ public boolean isToOne(Property property)
+ {
+ return (property.getValue() != null) && (property.getValue() instanceof ToOne);
+ }
public String upper(String name)
{
return name.substring(0, 1).toUpperCase() + name.substring(1);
16 years, 1 month
Seam SVN: r9397 - trunk/src/main/org/jboss/seam/persistence.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-10-23 13:21:16 -0400 (Thu, 23 Oct 2008)
New Revision: 9397
Modified:
trunk/src/main/org/jboss/seam/persistence/HibernateSessionProxyInterceptor.java
Log:
JBSEAM-3618
Modified: trunk/src/main/org/jboss/seam/persistence/HibernateSessionProxyInterceptor.java
===================================================================
--- trunk/src/main/org/jboss/seam/persistence/HibernateSessionProxyInterceptor.java 2008-10-23 16:41:57 UTC (rev 9396)
+++ trunk/src/main/org/jboss/seam/persistence/HibernateSessionProxyInterceptor.java 2008-10-23 17:21:16 UTC (rev 9397)
@@ -4,12 +4,12 @@
import static org.jboss.seam.ComponentType.STATELESS_SESSION_BEAN;
import javax.annotation.PostConstruct;
-import javax.ejb.PostActivate;
import org.hibernate.Session;
import org.jboss.seam.Component.BijectedAttribute;
import org.jboss.seam.annotations.intercept.AroundInvoke;
import org.jboss.seam.annotations.intercept.Interceptor;
+import org.jboss.seam.annotations.intercept.PostActivate;
import org.jboss.seam.intercept.AbstractInterceptor;
import org.jboss.seam.intercept.InvocationContext;
import org.jboss.seam.util.Reflections;
16 years, 1 month