Seam SVN: r9012 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-09-18 04:42:10 -0400 (Thu, 18 Sep 2008)
New Revision: 9012
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Gettingstarted.xml
Log:
typo
Modified: trunk/doc/Seam_Reference_Guide/en-US/Gettingstarted.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Gettingstarted.xml 2008-09-18 06:17:11 UTC (rev 9011)
+++ trunk/doc/Seam_Reference_Guide/en-US/Gettingstarted.xml 2008-09-18 08:42:10 UTC (rev 9012)
@@ -375,7 +375,7 @@
</listitem>
<listitem>
- <para>entities can never be hot-deloyed</para>
+ <para>entities can never be hot-deployed</para>
</listitem>
<listitem>
16 years, 2 months
Seam SVN: r9011 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: nickarls
Date: 2008-09-18 02:17:11 -0400 (Thu, 18 Sep 2008)
New Revision: 9011
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Excel.xml
Log:
Minor. Pointing out the rowSpan/columnSpan for e:image are optional.
Modified: trunk/doc/Seam_Reference_Guide/en-US/Excel.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Excel.xml 2008-09-18 00:17:47 UTC (rev 9010)
+++ trunk/doc/Seam_Reference_Guide/en-US/Excel.xml 2008-09-18 06:17:11 UTC (rev 9011)
@@ -1512,8 +1512,8 @@
<para>
Images are nested within columns (for iteration) or inside worksheets
(for direct placement using the <literal>startColumn/startRow</literal>
- and <literal>endColumn/endRow</literal>
- attributes)
+ and <literal>rowSpan/columnSpan</literal> attributes). The spans are
+ optional and if omitted, the image will be inserted without resizing.
</para>
<informaltable>
<tgroup cols="2">
16 years, 2 months
Seam SVN: r9010 - in trunk/src/main/org/jboss/seam: mock and 1 other directory.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2008-09-17 20:17:47 -0400 (Wed, 17 Sep 2008)
New Revision: 9010
Modified:
trunk/src/main/org/jboss/seam/contexts/FacesLifecycle.java
trunk/src/main/org/jboss/seam/mock/MockExternalContext.java
Log:
JBSEAM-2921
Modified: trunk/src/main/org/jboss/seam/contexts/FacesLifecycle.java
===================================================================
--- trunk/src/main/org/jboss/seam/contexts/FacesLifecycle.java 2008-09-17 23:30:31 UTC (rev 9009)
+++ trunk/src/main/org/jboss/seam/contexts/FacesLifecycle.java 2008-09-18 00:17:47 UTC (rev 9010)
@@ -6,9 +6,12 @@
*/
package org.jboss.seam.contexts;
+import java.util.Map;
+
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseId;
+import javax.servlet.ServletRequest;
import org.jboss.seam.ScopeType;
import org.jboss.seam.log.LogProvider;
@@ -58,7 +61,22 @@
}
Contexts.conversationContext.set(null); //in case endRequest() was never called
//Events.instance(); //TODO: only for now, until we have a way to do EL outside of JSF!
+
+ saveRequestPath(externalContext);
}
+
+
+ /**
+ * with rewriting, the filter chain might not have access to the post-rewrite request information.
+ * we'll save some of the information that we may need.
+ */
+ private static void saveRequestPath(ExternalContext externalContext) {
+ Map<String, Object> map = externalContext.getRequestMap();
+
+ map.put("org.jboss.seam.web.requestServletPath", externalContext.getRequestServletPath());
+ map.put("org.jboss.seam.web.requestContextPath", externalContext.getRequestContextPath());
+ map.put("org.jboss.seam.web.requestPathInfo", externalContext.getRequestPathInfo());
+ }
public static void beginExceptionRecovery(ExternalContext externalContext)
{
Modified: trunk/src/main/org/jboss/seam/mock/MockExternalContext.java
===================================================================
--- trunk/src/main/org/jboss/seam/mock/MockExternalContext.java 2008-09-17 23:30:31 UTC (rev 9009)
+++ trunk/src/main/org/jboss/seam/mock/MockExternalContext.java 2008-09-18 00:17:47 UTC (rev 9010)
@@ -182,7 +182,8 @@
@Override
public String getRequestContextPath()
{
- return request.getContextPath();
+ String path = (String) request.getAttribute("org.jboss.seam.web.requestContextPath");
+ return path!=null ? path : request.getContextPath();
}
@Override
@@ -304,13 +305,15 @@
@Override
public String getRequestPathInfo()
{
- return request.getPathInfo();
+ String path = (String) request.getAttribute("org.jboss.seam.web.requestPathInfo");
+ return path!=null ? path : request.getPathInfo();
}
@Override
public String getRequestServletPath()
{
- return request.getServletPath();
+ String path = (String) request.getAttribute("org.jboss.seam.web.requestServletPath");
+ return path!=null ? path : request.getPathInfo();
}
@Override
16 years, 2 months
Seam SVN: r9009 - in trunk/examples/seamspace: resources/WEB-INF and 2 other directories.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-09-17 19:30:31 -0400 (Wed, 17 Sep 2008)
New Revision: 9009
Added:
trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/CommentAction.java
Modified:
trunk/examples/seamspace/resources/META-INF/security-rules.drl
trunk/examples/seamspace/resources/WEB-INF/components.xml
trunk/examples/seamspace/resources/WEB-INF/pages.xml
trunk/examples/seamspace/resources/WEB-INF/web.xml
trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/BlogAction.java
trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/RegisterAction.java
trunk/examples/seamspace/view/blogentry.xhtml
trunk/examples/seamspace/view/comment.xhtml
trunk/examples/seamspace/view/home.xhtml
trunk/examples/seamspace/view/register.xhtml
Log:
restructured better
Modified: trunk/examples/seamspace/resources/META-INF/security-rules.drl
===================================================================
--- trunk/examples/seamspace/resources/META-INF/security-rules.drl 2008-09-17 22:43:52 UTC (rev 9008)
+++ trunk/examples/seamspace/resources/META-INF/security-rules.drl 2008-09-17 23:30:31 UTC (rev 9009)
@@ -124,13 +124,12 @@
no-loop
activation-group "permissions"
when
- check: PermissionCheck(target == "blogComment", action == "create", granted == false)
+ check: PermissionCheck(target == "blogComment", action == "insert", granted == false)
Role(name == "user")
then
check.grant();
end
-
# This rule grants permission for users to create their own blog entries
rule CreateBlog
no-loop
Modified: trunk/examples/seamspace/resources/WEB-INF/components.xml
===================================================================
--- trunk/examples/seamspace/resources/WEB-INF/components.xml 2008-09-17 22:43:52 UTC (rev 9008)
+++ trunk/examples/seamspace/resources/WEB-INF/components.xml 2008-09-17 23:30:31 UTC (rev 9009)
@@ -29,21 +29,20 @@
<!--security:identity-manager identity-store="#{ldapIdentityStore}"/-->
- <!--security:ldap-identity-store
- server-address="60.241.32.50"
+ <security:ldap-identity-store name="ldapIdentityStore"
+ server-address="localhost"
bind-DN="cn=Manager,dc=bryzak,dc=com"
bind-credentials="secret"
user-DN-prefix="uid="
user-DN-suffix=",ou=Person,dc=bryzak,dc=com"
role-DN-prefix="cn="
- role-DN-suffix=",ou=Roles,dc=bryzak,dc=com"
+ role-DN-suffix=",ou=Role,dc=bryzak,dc=com"
user-context-DN="ou=Person,dc=bryzak,dc=com"
- role-context-DN="ou=Roles,dc=bryzak,dc=com"
+ role-context-DN="ou=Role,dc=bryzak,dc=com"
user-role-attribute="roles"
role-name-attribute="cn"
user-object-classes="person,uidObject"
- enabled-attribute="enabled"
- /-->
+ />
<security:jpa-permission-store user-permission-class="org.jboss.seam.example.seamspace.AccountPermission"/>
@@ -55,7 +54,7 @@
<web:multipart-filter create-temp-files="true"
max-request-size="1000000"
- url-pattern="*.seam"/>
+ url-pattern="*.seam"/>
<web:context-filter url-pattern="/content/*"/>
Modified: trunk/examples/seamspace/resources/WEB-INF/pages.xml
===================================================================
--- trunk/examples/seamspace/resources/WEB-INF/pages.xml 2008-09-17 22:43:52 UTC (rev 9008)
+++ trunk/examples/seamspace/resources/WEB-INF/pages.xml 2008-09-17 23:30:31 UTC (rev 9009)
@@ -18,10 +18,7 @@
<page view-id="/comment.xhtml" login-required="true">
<restrict/>
- <param name="name" value="#{blog.name}"/>
- <param name="blogId" value="#{blog.blogId}"/>
-
- <navigation from-action="#{blog.saveComment}">
+ <navigation from-action="#{commentAction.saveComment}">
<redirect view-id="/blogentry.xhtml"/>
</navigation>
</page>
@@ -41,7 +38,7 @@
<page view-id="/register2.xhtml">
<navigation from-action="#{register.uploadPicture}">
<redirect view-id="/profile.xhtml">
- <param name="name" value="#{newMember.memberName}"/>
+ <param name="name" value="#{register.member.memberName}"/>
</redirect>
</navigation>
</page>
@@ -60,6 +57,10 @@
<page view-id="/blogentry.xhtml">
<param name="name" value="#{blog.name}"/>
<param name="blogId" value="#{blog.blogId}"/>
+
+ <navigation from-action="#{commentAction.createComment}">
+ <redirect view-id="/comment.xhtml"/>
+ </navigation>
</page>
Modified: trunk/examples/seamspace/resources/WEB-INF/web.xml
===================================================================
--- trunk/examples/seamspace/resources/WEB-INF/web.xml 2008-09-17 22:43:52 UTC (rev 9008)
+++ trunk/examples/seamspace/resources/WEB-INF/web.xml 2008-09-17 23:30:31 UTC (rev 9009)
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <display-name>SeamSpace Example</display-name>
+
<!-- RichFaces -->
<context-param>
@@ -18,6 +19,16 @@
<listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
</listener>
+ <servlet>
+ <servlet-name>Seam Resource Servlet</servlet-name>
+ <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Seam Resource Servlet</servlet-name>
+ <url-pattern>/seam/resource/*</url-pattern>
+ </servlet-mapping>
+
<filter>
<filter-name>Seam Filter</filter-name>
<filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
@@ -28,16 +39,6 @@
<url-pattern>/*</url-pattern>
</filter-mapping>
- <servlet>
- <servlet-name>Seam Resource Servlet</servlet-name>
- <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>Seam Resource Servlet</servlet-name>
- <url-pattern>/seam/resource/*</url-pattern>
- </servlet-mapping>
-
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
Modified: trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/BlogAction.java
===================================================================
--- trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/BlogAction.java 2008-09-17 22:43:52 UTC (rev 9008)
+++ trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/BlogAction.java 2008-09-17 23:30:31 UTC (rev 9009)
@@ -15,7 +15,6 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.security.Insert;
@Scope(CONVERSATION)
@Name("blog")
@@ -30,9 +29,6 @@
@In(required = false) @Out(required = false)
private MemberBlog selectedBlog;
- @In(required = false) @Out(required = false, scope = CONVERSATION)
- private BlogComment comment;
-
@In(required = false)
private Member authenticatedMember;
@@ -52,31 +48,8 @@
.getSingleResult();
}
catch (NoResultException ex) { }
- }
+ }
- @Factory("comment") @Insert(BlogComment.class) @Begin(join = true)
- public void createComment()
- {
- comment = new BlogComment();
- comment.setCommentor(authenticatedMember);
-
- if (selectedBlog == null && name != null && blogId != null)
- getBlog();
-
- comment.setBlog(selectedBlog);
- }
-
- @End
- public void saveComment()
- {
- comment.setCommentDate(new Date());
- entityManager.persist(comment);
-
- // Reload the blog entry
- selectedBlog = (MemberBlog) entityManager.find(MemberBlog.class,
- comment.getBlog().getBlogId());
- }
-
@Begin
public void createEntry()
{
Added: trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/CommentAction.java
===================================================================
--- trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/CommentAction.java (rev 0)
+++ trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/CommentAction.java 2008-09-17 23:30:31 UTC (rev 9009)
@@ -0,0 +1,53 @@
+package org.jboss.seam.example.seamspace;
+
+import static org.jboss.seam.ScopeType.CONVERSATION;
+
+import java.util.Date;
+
+import javax.persistence.EntityManager;
+
+import org.jboss.seam.annotations.Begin;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.security.Insert;
+import org.jboss.seam.core.Conversation;
+
+@Scope(CONVERSATION)
+@Name("commentAction")
+public class CommentAction
+{
+ @In
+ private EntityManager entityManager;
+
+ private BlogComment comment;
+
+ @In(required = false)
+ private Member authenticatedMember;
+
+ @In(required = false)
+ private MemberBlog selectedBlog;
+
+ @Begin(nested = true) @Insert(BlogComment.class)
+ public void createComment()
+ {
+ comment = new BlogComment();
+ comment.setCommentor(authenticatedMember);
+ comment.setBlog(selectedBlog);
+ }
+
+ public void saveComment()
+ {
+ comment.setCommentDate(new Date());
+ entityManager.persist(comment);
+
+ entityManager.refresh(selectedBlog);
+
+ Conversation.instance().end();
+ }
+
+ public BlogComment getComment()
+ {
+ return comment;
+ }
+}
Modified: trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/RegisterAction.java
===================================================================
--- trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/RegisterAction.java 2008-09-17 22:43:52 UTC (rev 9008)
+++ trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/RegisterAction.java 2008-09-17 23:30:31 UTC (rev 9009)
@@ -10,11 +10,9 @@
import org.jboss.seam.annotations.Begin;
import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.End;
-import org.jboss.seam.annotations.Factory;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Observer;
-import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.faces.FacesMessages;
import org.jboss.seam.security.Identity;
@@ -26,8 +24,7 @@
@Name("register")
public class RegisterAction
{
- @In(required = false) @Out
- private Member newMember;
+ private Member member;
@In
private EntityManager entityManager;
@@ -55,15 +52,15 @@
private boolean verified;
- @Factory("newMember") @Begin(join = true)
+ @Begin
public void start()
{
- newMember = new Member();
+ member = new Member();
}
public void next()
{
- newMember.setGender(Member.Gender.valueOf(gender.toLowerCase()));
+ member.setGender(Member.Gender.valueOf(gender.toLowerCase()));
verified = (confirm != null && confirm.equals(password));
@@ -79,28 +76,28 @@
// The user *may* have been created from the user manager screen. In that
// case, create a dummy Member record just for the purpose of demonstrating the
// identity management API
- if (newMember == null)
+ if (member == null)
{
- newMember = new Member();
- newMember.setMemberName(account.getUsername());
- newMember.setGender(Member.Gender.male);
- newMember.setFirstName("John");
- newMember.setLastName("Doe");
- newMember.setEmail(account.getUsername() + "@nowhere.com");
- newMember.setDob(new Date());
- newMember.setMemberSince(new Date());
- entityManager.persist(newMember);
+ member = new Member();
+ member.setMemberName(account.getUsername());
+ member.setGender(Member.Gender.male);
+ member.setFirstName("John");
+ member.setLastName("Doe");
+ member.setEmail(account.getUsername() + "@nowhere.com");
+ member.setDob(new Date());
+ member.setMemberSince(new Date());
+ entityManager.persist(member);
}
- account.setMember(newMember);
+ account.setMember(member);
this.newAccount = account;
}
@End
public void uploadPicture()
{
- newMember.setMemberSince(new Date());
- entityManager.persist(newMember);
+ member.setMemberSince(new Date());
+ entityManager.persist(member);
new RunAsOperation() {
public void execute() {
@@ -110,27 +107,32 @@
}.addRole("admin")
.run();
- newAccount.setMember(newMember);
+ newAccount.setMember(member);
newAccount = entityManager.merge(newAccount);
if (picture != null && picture.length > 0)
{
MemberImage img = new MemberImage();
img.setData(picture);
- img.setMember(newMember);
+ img.setMember(member);
img.setContentType(pictureContentType);
entityManager.persist(img);
- newMember.setPicture(img);
+ member.setPicture(img);
- newMember = entityManager.merge(newMember);
+ member = entityManager.merge(member);
}
// Login the user
- identity.setUsername(username);
- identity.setPassword(password);
+ identity.getCredentials().setUsername(username);
+ identity.getCredentials().setPassword(password);
identity.login();
}
+ public Member getMember()
+ {
+ return member;
+ }
+
public String getUsername()
{
return username;
Modified: trunk/examples/seamspace/view/blogentry.xhtml
===================================================================
--- trunk/examples/seamspace/view/blogentry.xhtml 2008-09-17 22:43:52 UTC (rev 9008)
+++ trunk/examples/seamspace/view/blogentry.xhtml 2008-09-17 23:30:31 UTC (rev 9009)
@@ -32,10 +32,7 @@
<div class="blogText"><s:formattedText value="#{selectedBlog.text}"/></div>
<div class="blogFooter">
<s:span rendered="#{s:hasPermission(selectedBlog, 'create')}">
- [<s:link view="/comment.seam" value="Add Comment" propagation="none">
- <f:param name="name" value="#{selectedMember.memberName}"/>
- <f:param name="blogId" value="#{selectedBlog.blogId}"/>
- </s:link>]
+ [<s:link action="#{commentAction.createComment}" value="Add Comment"/>]
</s:span>
[<s:link view="/blog.seam" value="View all blog entries" propagation="none">
<f:param name="name" value="#{selectedMember.memberName}"/>
Modified: trunk/examples/seamspace/view/comment.xhtml
===================================================================
--- trunk/examples/seamspace/view/comment.xhtml 2008-09-17 22:43:52 UTC (rev 9008)
+++ trunk/examples/seamspace/view/comment.xhtml 2008-09-17 23:30:31 UTC (rev 9009)
@@ -10,7 +10,7 @@
<div class="errors"><h:messages globalOnly="true"/></div>
- <s:div rendered="#{comment == null}">
+ <s:div rendered="#{commentAction.comment == null}">
Could not create comment.
</s:div>
@@ -32,12 +32,12 @@
<div class="blogText"><s:formattedText value="#{selectedBlog.text}"/></div>
</div>
- <s:div rendered="#{comment.comment != null}">
+ <s:div rendered="#{commentAction.comment.comment != null}">
Preview:
<table class="blogComment">
<tr>
<td class="blogCommentText">
- <p><s:formattedText value="#{comment.comment}"/></p>
+ <p><s:formattedText value="#{commentAction.comment.comment}"/></p>
</td>
</tr>
</table>
@@ -47,10 +47,10 @@
<h:form>
<h:outputLabel for="comment">Please type your comment</h:outputLabel><br/>
- <h:inputTextarea id="comment" value="#{comment.comment}"/><br/>
+ <h:inputTextarea id="comment" value="#{commentAction.comment.comment}"/><br/>
<div class="buttons">
- <h:commandButton action="#{blog.saveComment}" value="Add comment" styleClass="action"/>
+ <h:commandButton action="#{commentAction.saveComment}" value="Add comment" styleClass="action"/>
<h:commandButton value="Preview" styleClass="action"/>
</div>
Modified: trunk/examples/seamspace/view/home.xhtml
===================================================================
--- trunk/examples/seamspace/view/home.xhtml 2008-09-17 22:43:52 UTC (rev 9008)
+++ trunk/examples/seamspace/view/home.xhtml 2008-09-17 23:30:31 UTC (rev 9009)
@@ -22,7 +22,7 @@
<div id="contentSide">
<div class="advertising"></div>
-
+
<h:form rendered="#{not identity.loggedIn}">
<div class="memberLogin">
<div class="loginHeader">Member Login</div>
Modified: trunk/examples/seamspace/view/register.xhtml
===================================================================
--- trunk/examples/seamspace/view/register.xhtml 2008-09-17 22:43:52 UTC (rev 9008)
+++ trunk/examples/seamspace/view/register.xhtml 2008-09-17 23:30:31 UTC (rev 9009)
@@ -24,25 +24,25 @@
<s:validateAll>
<div class="formRow">
<h:outputLabel for="email">Email address<em>*</em></h:outputLabel>
- <h:inputText id="email" value="#{newMember.email}" required="true" styleClass="wide"/>
+ <h:inputText id="email" value="#{register.member.email}" required="true" styleClass="wide"/>
<div class="validationError"><h:message for="email"/></div>
</div>
<div class="formRow">
<h:outputLabel for="firstName">First name<em>*</em></h:outputLabel>
- <h:inputText id="firstName" value="#{newMember.firstName}" required="true"/>
+ <h:inputText id="firstName" value="#{register.member.firstName}" required="true"/>
<div class="validationError"><h:message for="firstName"/></div>
</div>
<div class="formRow">
<h:outputLabel for="lastName">Last name<em>*</em></h:outputLabel>
- <h:inputText id="lastName" value="#{newMember.lastName}" required="true"/>
+ <h:inputText id="lastName" value="#{register.member.lastName}" required="true"/>
<div class="validationError"><h:message for="lastName"/></div>
</div>
<div class="formRow">
<h:outputLabel for="memberName">Nick name<em>*</em></h:outputLabel>
- <h:inputText id="memberName" value="#{newMember.memberName}" required="true"/>
+ <h:inputText id="memberName" value="#{register.member.memberName}" required="true"/>
<div class="validationError"><h:message for="memberName"/></div>
</div>
@@ -75,7 +75,7 @@
<div class="formRow">
<h:outputLabel for="dob">Date of birth<em>*</em></h:outputLabel>
- <rich:calendar id="dob" value="#{newMember.dob}" required="true" datePattern="MM/dd/yyyy" buttonIcon="images/ellipsis.png" />
+ <rich:calendar id="dob" value="#{register.member.dob}" required="true" datePattern="MM/dd/yyyy" buttonIcon="images/ellipsis.png" />
<div class="validationError"><h:message for="dob"/></div>
</div>
16 years, 2 months
Seam SVN: r9008 - in trunk/src/main/org/jboss/seam/security: permission/action and 1 other directory.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-09-17 18:43:52 -0400 (Wed, 17 Sep 2008)
New Revision: 9008
Modified:
trunk/src/main/org/jboss/seam/security/management/action/RoleAction.java
trunk/src/main/org/jboss/seam/security/management/action/RoleSearch.java
trunk/src/main/org/jboss/seam/security/management/action/UserAction.java
trunk/src/main/org/jboss/seam/security/management/action/UserSearch.java
trunk/src/main/org/jboss/seam/security/permission/action/PermissionSearch.java
Log:
JBSEAM-3427
Modified: trunk/src/main/org/jboss/seam/security/management/action/RoleAction.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/management/action/RoleAction.java 2008-09-17 11:01:32 UTC (rev 9007)
+++ trunk/src/main/org/jboss/seam/security/management/action/RoleAction.java 2008-09-17 22:43:52 UTC (rev 9008)
@@ -1,6 +1,7 @@
package org.jboss.seam.security.management.action;
import static org.jboss.seam.ScopeType.CONVERSATION;
+import static org.jboss.seam.annotations.Install.BUILT_IN;
import java.io.Serializable;
import java.util.ArrayList;
@@ -8,6 +9,7 @@
import org.jboss.seam.annotations.Begin;
import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Install;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.core.Conversation;
@@ -15,6 +17,7 @@
@Name("org.jboss.seam.security.management.roleAction")
@Scope(CONVERSATION)
+@Install(precedence = BUILT_IN)
public class RoleAction implements Serializable
{
private String role;
Modified: trunk/src/main/org/jboss/seam/security/management/action/RoleSearch.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/management/action/RoleSearch.java 2008-09-17 11:01:32 UTC (rev 9007)
+++ trunk/src/main/org/jboss/seam/security/management/action/RoleSearch.java 2008-09-17 22:43:52 UTC (rev 9008)
@@ -1,11 +1,13 @@
package org.jboss.seam.security.management.action;
import static org.jboss.seam.ScopeType.SESSION;
+import static org.jboss.seam.annotations.Install.BUILT_IN;
import java.io.Serializable;
import java.util.List;
import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Install;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.datamodel.DataModel;
@@ -14,6 +16,7 @@
@Name("org.jboss.seam.security.management.roleSearch")
@Scope(SESSION)
+@Install(precedence = BUILT_IN)
public class RoleSearch implements Serializable
{
@DataModel
Modified: trunk/src/main/org/jboss/seam/security/management/action/UserAction.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/management/action/UserAction.java 2008-09-17 11:01:32 UTC (rev 9007)
+++ trunk/src/main/org/jboss/seam/security/management/action/UserAction.java 2008-09-17 22:43:52 UTC (rev 9008)
@@ -1,6 +1,7 @@
package org.jboss.seam.security.management.action;
import static org.jboss.seam.ScopeType.CONVERSATION;
+import static org.jboss.seam.annotations.Install.BUILT_IN;
import java.io.Serializable;
import java.util.ArrayList;
@@ -8,6 +9,7 @@
import org.jboss.seam.annotations.Begin;
import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Install;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.core.Conversation;
@@ -21,6 +23,7 @@
*/
@Name("org.jboss.seam.security.management.userAction")
@Scope(CONVERSATION)
+@Install(precedence = BUILT_IN)
public class UserAction implements Serializable
{
private String firstname;
Modified: trunk/src/main/org/jboss/seam/security/management/action/UserSearch.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/management/action/UserSearch.java 2008-09-17 11:01:32 UTC (rev 9007)
+++ trunk/src/main/org/jboss/seam/security/management/action/UserSearch.java 2008-09-17 22:43:52 UTC (rev 9008)
@@ -1,11 +1,13 @@
package org.jboss.seam.security.management.action;
import static org.jboss.seam.ScopeType.SESSION;
+import static org.jboss.seam.annotations.Install.BUILT_IN;
import java.io.Serializable;
import java.util.List;
import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Install;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.datamodel.DataModel;
@@ -15,6 +17,7 @@
@Name("org.jboss.seam.security.management.userSearch")
@Scope(SESSION)
+@Install(precedence = BUILT_IN)
public class UserSearch implements Serializable
{
private static final long serialVersionUID = 8592034786339372510L;
Modified: trunk/src/main/org/jboss/seam/security/permission/action/PermissionSearch.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/permission/action/PermissionSearch.java 2008-09-17 11:01:32 UTC (rev 9007)
+++ trunk/src/main/org/jboss/seam/security/permission/action/PermissionSearch.java 2008-09-17 22:43:52 UTC (rev 9008)
@@ -1,6 +1,7 @@
package org.jboss.seam.security.permission.action;
import static org.jboss.seam.ScopeType.CONVERSATION;
+import static org.jboss.seam.annotations.Install.BUILT_IN;
import java.io.Serializable;
import java.security.Principal;
@@ -11,6 +12,7 @@
import org.jboss.seam.annotations.Begin;
import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Install;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.datamodel.DataModel;
@@ -21,6 +23,7 @@
@Scope(CONVERSATION)
@Name("org.jboss.seam.security.permission.permissionSearch")
+@Install(precedence = BUILT_IN)
public class PermissionSearch implements Serializable
{
private Map<Principal,List<Permission>> groupedPermissions = new HashMap<Principal,List<Permission>>();
16 years, 2 months
Seam SVN: r9007 - trunk/src/main/org/jboss/seam/navigation.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-09-17 07:01:32 -0400 (Wed, 17 Sep 2008)
New Revision: 9007
Modified:
trunk/src/main/org/jboss/seam/navigation/Pages.java
Log:
JBSEAM-3366
Modified: trunk/src/main/org/jboss/seam/navigation/Pages.java
===================================================================
--- trunk/src/main/org/jboss/seam/navigation/Pages.java 2008-09-17 10:52:49 UTC (rev 9006)
+++ trunk/src/main/org/jboss/seam/navigation/Pages.java 2008-09-17 11:01:32 UTC (rev 9007)
@@ -117,22 +117,23 @@
public void initialize()
{
- pagesByViewId = Collections.synchronizedMap(new HashMap<String, Page>());
- pageStacksByViewId = Collections.synchronizedMap(new HashMap<String, List<Page>>());
- conversations = Collections.synchronizedMap(new HashMap<String, ConversationIdParameter>());
+ pagesByViewId = Collections.synchronizedMap(new HashMap<String, Page>());
+ pageStacksByViewId = Collections.synchronizedMap(new HashMap<String, List<Page>>());
+ conversations = Collections.synchronizedMap(new HashMap<String, ConversationIdParameter>());
- for (String resource: resources) {
- InputStream stream = ResourceLoader.instance().getResourceAsStream(resource);
- if (stream==null) {
- log.info("no pages.xml file found: " + resource);
- } else {
- log.debug("reading pages.xml file: " + resource);
- parse(stream);
- }
- }
-
- parsePages(hotDotPageDotXmlFileNames, dotPageDotXmlFileNames);
-
+ for (String resource: resources)
+ {
+ InputStream stream = ResourceLoader.instance().getResourceAsStream(resource);
+ if (stream==null)
+ {
+ log.info("no pages.xml file found: " + resource);
+ } else {
+ log.debug("reading pages.xml file: " + resource);
+ parse(stream);
+ }
+ }
+
+ parsePages(hotDotPageDotXmlFileNames, dotPageDotXmlFileNames);
}
private void parsePages(Set<String> ...fileNames)
@@ -144,7 +145,11 @@
}
for (String fileName: mergedFileNames)
{
- String viewId = "/" + fileName.substring(0,fileName.length()-".page.xml".length()) + ".xhtml"; // needs more here
+ if (!fileName.startsWith("/"))
+ {
+ fileName = "/" + fileName;
+ }
+ String viewId = fileName.substring(0,fileName.length()-".page.xml".length()) + ".xhtml"; // needs more here
InputStream stream = ResourceLoader.instance().getResourceAsStream(fileName);
if (stream==null)
16 years, 2 months
Seam SVN: r9006 - trunk/src/main/org/jboss/seam/framework.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-09-17 06:52:49 -0400 (Wed, 17 Sep 2008)
New Revision: 9006
Modified:
trunk/src/main/org/jboss/seam/framework/Query.java
Log:
oops
Modified: trunk/src/main/org/jboss/seam/framework/Query.java
===================================================================
--- trunk/src/main/org/jboss/seam/framework/Query.java 2008-09-17 09:42:36 UTC (rev 9005)
+++ trunk/src/main/org/jboss/seam/framework/Query.java 2008-09-17 10:52:49 UTC (rev 9006)
@@ -264,7 +264,7 @@
protected boolean isRestrictionParameterSet(Object parameterValue)
{
- return parameterValue != null && !"".equals(parameterValue) && parameterValue instanceof Collection ? !((Collection) parameterValue).isEmpty() : true;
+ return parameterValue != null && !"".equals(parameterValue) && (parameterValue instanceof Collection ? !((Collection) parameterValue).isEmpty() : true);
}
/**
16 years, 2 months
Seam SVN: r9005 - trunk/src/main/org/jboss/seam/util.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-09-17 05:42:36 -0400 (Wed, 17 Sep 2008)
New Revision: 9005
Modified:
trunk/src/main/org/jboss/seam/util/Reflections.java
Log:
JBSEAM-3392
Modified: trunk/src/main/org/jboss/seam/util/Reflections.java
===================================================================
--- trunk/src/main/org/jboss/seam/util/Reflections.java 2008-09-17 09:42:08 UTC (rev 9004)
+++ trunk/src/main/org/jboss/seam/util/Reflections.java 2008-09-17 09:42:36 UTC (rev 9005)
@@ -247,12 +247,22 @@
for (Method method: methods)
{
String methodName = method.getName();
- if ( methodName.matches("^(get|is).*") && method.getParameterTypes().length==0 )
+ if ( method.getParameterTypes().length==0 )
{
- if ( Introspector.decapitalize( methodName.substring(3) ).equals(name) )
+ if ( methodName.startsWith("get") )
{
- return method;
+ if ( Introspector.decapitalize( methodName.substring(3) ).equals(name) )
+ {
+ return method;
+ }
}
+ else if ( methodName.startsWith("is") )
+ {
+ if ( Introspector.decapitalize( methodName.substring(2) ).equals(name) )
+ {
+ return method;
+ }
+ }
}
}
throw new IllegalArgumentException("no such getter method: " + clazz.getName() + '.' + name);
16 years, 2 months
Seam SVN: r9004 - trunk/src/main/org/jboss/seam/framework.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-09-17 05:42:08 -0400 (Wed, 17 Sep 2008)
New Revision: 9004
Modified:
trunk/src/main/org/jboss/seam/framework/Query.java
Log:
JBSEAM-3392
Modified: trunk/src/main/org/jboss/seam/framework/Query.java
===================================================================
--- trunk/src/main/org/jboss/seam/framework/Query.java 2008-09-17 09:21:39 UTC (rev 9003)
+++ trunk/src/main/org/jboss/seam/framework/Query.java 2008-09-17 09:42:08 UTC (rev 9004)
@@ -1,6 +1,7 @@
package org.jboss.seam.framework;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -263,7 +264,7 @@
protected boolean isRestrictionParameterSet(Object parameterValue)
{
- return parameterValue!=null && !"".equals(parameterValue);
+ return parameterValue != null && !"".equals(parameterValue) && parameterValue instanceof Collection ? !((Collection) parameterValue).isEmpty() : true;
}
/**
16 years, 2 months
Seam SVN: r9003 - in trunk: build and 1 other directories.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-09-17 05:21:39 -0400 (Wed, 17 Sep 2008)
New Revision: 9003
Modified:
trunk/build.xml
trunk/build/common.build.xml
trunk/seam-gen/build.xml
Log:
JBSEAM-3290
Modified: trunk/build/common.build.xml
===================================================================
--- trunk/build/common.build.xml 2008-09-17 09:21:20 UTC (rev 9002)
+++ trunk/build/common.build.xml 2008-09-17 09:21:39 UTC (rev 9003)
@@ -124,7 +124,7 @@
<copyDependencies id="remoting" pom="${remoting.pom}" todir="${lib.dir}" scope="runtime" />
<copyDependencies id="resteasy" pom="${resteasy.pom}" todir="${lib.dir}" scope="runtime" />
<copyDependencies id="ui" pom="${ui.pom}" todir="${lib.dir}" scope="runtime" />
- <copyDependencies id="gen" pom="${gen.pom}" todir="${lib.dir}" scope="runtime" />
+ <copyDependencies id="gen" pom="${gen.pom}" todir="${lib.dir}/gen" scope="runtime" />
<copyDependencies id="core" pom="${core.pom}" todir="${lib.dir}" scope="compile" />
<copyDependencies id="debug" pom="${debug.pom}" todir="${lib.dir}" scope="compile" />
<copyDependencies id="wicket" pom="${wicket.pom}" todir="${lib.dir}" scope="compile" />
@@ -135,7 +135,7 @@
<copyDependencies id="remoting" pom="${remoting.pom}" todir="${lib.dir}" scope="compile" />
<copyDependencies id="resteasy" pom="${resteasy.pom}" todir="${lib.dir}" scope="compile" />
<copyDependencies id="ui" pom="${ui.pom}" todir="${lib.dir}" scope="compile" />
- <copyDependencies id="gen" pom="${gen.pom}" todir="${lib.dir}" scope="compile" />
+ <copyDependencies id="gen" pom="${gen.pom}" todir="${lib.dir}/gen" scope="compile" />
<property name="copyseamdependenciesdone" value="true" />
</target>
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2008-09-17 09:21:20 UTC (rev 9002)
+++ trunk/build.xml 2008-09-17 09:21:39 UTC (rev 9003)
@@ -349,7 +349,7 @@
</target>
<target name="jargen" depends="compilegen" description="Build the distribution .jar file for the gen package">
- <archive classesdir="${classes.gen.dir}" module="jboss-seam-gen" pom="${gen.pom}" srcdir="${src.gen.dir}"/>
+ <archive classesdir="${classes.gen.dir}" module="jboss-seam-gen" pom="${gen.pom}" srcdir="${src.gen.dir}" outputdir="${lib.dir}/gen"/>
</target>
@@ -1081,7 +1081,7 @@
</target>
<target name="eclipseclasspath" depends="init, jargen" description="Update eclipse classpath">
- <path id="seam-gen.path" path="${seam.dir}/lib/jboss-seam-gen.jar" />
+ <path id="seam-gen.path" path="${seam.dir}/lib/gen/jboss-seam-gen.jar" />
<taskdef name="eclipseClasspath"
classname="org.jboss.seam.tool.EclipseClasspathTask"
Modified: trunk/seam-gen/build.xml
===================================================================
--- trunk/seam-gen/build.xml 2008-09-17 09:21:20 UTC (rev 9002)
+++ trunk/seam-gen/build.xml 2008-09-17 09:21:39 UTC (rev 9003)
@@ -9,7 +9,7 @@
<import file="${seam.dir}/build/common.build.xml" />
<target name="init">
- <path id="seam-gen.path" path="${seam.dir}/lib/jboss-seam-gen.jar" />
+ <path id="seam-gen.path" path="${seam.dir}/lib/gen/jboss-seam-gen.jar" />
<!-- taskdefs -->
<taskdef name="normalizeProjectName"
@@ -610,23 +610,23 @@
<copy todir="${project.home}/lib" overwrite="true">
<fileset dir="../lib">
- <exclude name="jsf-facelets.jar" if="icefaces.property"/>
- <exclude name="ajax4jsf*.jar" if="icefaces.property"/>
- <exclude name="richfaces*.jar" if="icefaces.property"/>
+ <exclude name="jsf-facelets.jar" if="icefaces.property"/>
+ <exclude name="ajax4jsf*.jar" if="icefaces.property"/>
+ <exclude name="richfaces*.jar" if="icefaces.property"/>
<exclude name="jboss-container.jar" />
<exclude name="jboss-seam-wicket.jar" />
<exclude name="jboss-seam-resteasy.jar" />
<exclude name="test/jboss-deplyers.jar" />
<exclude name="test/jboss-embedded-api.jar" />
- <exclude name="interop/**/*" />
+ <exclude name="interop/**/*" />
<exclude name="gen/**/*" />
</fileset>
<fileset file="${driver.jar}"/>
</copy>
<echo message="Copying JBoss Embedded configuration to the ${project.home}/bootstrap directory..." />
- <copy todir="${project.home}/bootstrap" overwrite="true">
- <fileset dir="../bootstrap" />
+ <copy todir="${project.home}/bootstrap" overwrite="true">
+ <fileset dir="../bootstrap" />
</copy>
</target>
@@ -1073,21 +1073,21 @@
</target>
<target name="init-generate">
- <path id="htools.classpath">
- <pathelement path="../lib/ant.jar"/>
- <pathelement path="../lib/hibernate-tools.jar"/>
- <pathelement path="../lib/freemarker.jar"/>
- <pathelement path="../lib/jboss-seam.jar"/>
- <pathelement path="../lib/runtime.jar"/>
- <pathelement path="../lib/common.jar"/>
- <pathelement path="../lib/text.jar"/>
+ <path id="htools.classpath">
+ <pathelement path="../lib/ant.jar"/>
+ <pathelement path="../lib/gen/hibernate-tools.jar"/>
+ <pathelement path="../lib/gen/freemarker.jar"/>
+ <pathelement path="../lib/jboss-seam.jar"/>
+ <pathelement path="../lib/gen/runtime.jar"/>
+ <pathelement path="../lib/gen/common.jar"/>
+ <pathelement path="../lib/gen/text.jar"/>
<pathelement path="../lib/dom4j.jar" />
<pathelement path="../lib/persistence-api.jar" />
<pathelement path="../lib/hibernate.jar" />
<pathelement path="../lib/hibernate-commons-annotations.jar" />
<pathelement path="../lib/hibernate-annotations.jar" />
<pathelement path="../lib/hibernate-entitymanager.jar" />
- <pathelement path="../lib/hibernate-validator.jar"/>
+ <pathelement path="../lib/hibernate-validator.jar"/>
<pathelement path="../lib/commons-collections.jar" />
<pathelement path="../lib/commons-logging.jar" />
<pathelement path="../lib/javassist.jar" />
@@ -1095,9 +1095,9 @@
<pathelement path="../lib/asm.jar" />
<pathelement path="../lib/core.jar" />
<pathelement path="../lib/jboss-common-core.jar" />
- <pathelement path="../lib/concurrent.jar"/>
- <pathelement path="${driver.jar}"/>
- <pathelement path="../lib/jboss-seam-gen.jar"/>
+ <pathelement path="../lib/concurrent.jar"/>
+ <pathelement path="${driver.jar}"/>
+ <pathelement path="../lib/gen/jboss-seam-gen.jar"/>
</path>
<taskdef name="hibernate" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="htools.classpath"/>
</target>
16 years, 2 months