Author: manaRH
Date: 2009-08-07 03:56:09 -0400 (Fri, 07 Aug 2009)
New Revision: 11353
Modified:
branches/enterprise/JBPAPP_5_0/examples/seamspace/resources/WEB-INF/pages.xml
branches/enterprise/JBPAPP_5_0/examples/seamspace/src/org/jboss/seam/example/seamspace/FriendAction.java
branches/enterprise/JBPAPP_5_0/examples/seamspace/view/profile.xhtml
Log:
JBPAPP-2375
Modified: branches/enterprise/JBPAPP_5_0/examples/seamspace/resources/WEB-INF/pages.xml
===================================================================
---
branches/enterprise/JBPAPP_5_0/examples/seamspace/resources/WEB-INF/pages.xml 2009-08-07
05:36:10 UTC (rev 11352)
+++
branches/enterprise/JBPAPP_5_0/examples/seamspace/resources/WEB-INF/pages.xml 2009-08-07
07:56:09 UTC (rev 11353)
@@ -98,7 +98,7 @@
<page view-id="/friendrequest.xhtml">
<restrict>#{identity.loggedIn}</restrict>
<param name="name"
value="#{selectedMember.memberName}"/>
- <navigation from-action="#{friend.saveRequest}">
+ <navigation from-action="#{friendAction.saveRequest}">
<redirect view-id="/profile.xhtml">
<param name="name"
value="#{friendRequest.member.memberName}"/>
</redirect>
Modified:
branches/enterprise/JBPAPP_5_0/examples/seamspace/src/org/jboss/seam/example/seamspace/FriendAction.java
===================================================================
---
branches/enterprise/JBPAPP_5_0/examples/seamspace/src/org/jboss/seam/example/seamspace/FriendAction.java 2009-08-07
05:36:10 UTC (rev 11352)
+++
branches/enterprise/JBPAPP_5_0/examples/seamspace/src/org/jboss/seam/example/seamspace/FriendAction.java 2009-08-07
07:56:09 UTC (rev 11353)
@@ -43,7 +43,7 @@
@In
private EntityManager entityManager;
- @Factory("friendComment") @Begin
+ @Begin
public void createComment()
{
try
@@ -100,7 +100,8 @@
public void saveRequest()
{
friendRequest.getMember().getFriends().add(friendRequest);
- entityManager.persist(friendRequest);
+ entityManager.persist(friendRequest);
+ FacesMessages.instance().add("Friend request sent");
}
@Remove @Destroy
Modified: branches/enterprise/JBPAPP_5_0/examples/seamspace/view/profile.xhtml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/seamspace/view/profile.xhtml 2009-08-07
05:36:10 UTC (rev 11352)
+++ branches/enterprise/JBPAPP_5_0/examples/seamspace/view/profile.xhtml 2009-08-07
07:56:09 UTC (rev 11353)
@@ -78,7 +78,9 @@
<br class="clear"/>
<s:span rendered="#{selectedMember.memberId !=
authenticatedMember.memberId and s:hasPermission(selectedMember,
'createFriendRequest')}">
- [<s:link view="/friendrequest.seam" value="Send a friend
request" propagation="none"/>]
+ [<s:link view="/friendrequest.seam"
action="#{friendAction.createRequest}" value="Send a friend
request">
+ <f:param name="name"
value="#{selectedMember.memberName}"/>
+ </s:link>]
</s:span>
</s:div>
Show replies by date