[jboss-user] [JBoss Seam] - Re: Extended EL support (with parameters) - MethodNotFoundE

2008-01-07 Thread rizzojo
You are right, Pete: I did forget to declare the method with the parameter in 
the local EJB3 interface !

I feel stupid, but I'm happy you helped me to make it work.

Many thanks.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4117448#4117448

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4117448
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Extended EL support (with parameters) - MethodNotFoundExcep

2008-01-04 Thread rizzojo
Hi, I'm a Seam newbie trying to learn it.

I've an issue with the use of extended EL in datatables to pass parameters.

I can make the booking example (tutorial) work and it uses that feature.
But I cannot make it work for my project.

(fragment of) The xhtml code of the table:

  |  h:dataTable var=usr value=#{userList} 
rendered=#{userList.rowCount0}
  |h:column
  |  f:facet name=header
  |h:outputText value=User Name/
  |  /f:facet
  |  #{usr.userName}
  |/h:column
  |h:column
  |  f:facet name=header
  |h:outputText value=User ID/
  |  /f:facet
  |  s:link value=#{usr.id} 
action=#{userEdit.selectUser(usr)}/   
  |  s:link value=#{usr.id} action=#{userEdit.selectTest}/ 
User(usr)  
  |/h:column
  |
  |  /h:dataTable
  | 

This table contains 2 columns with:
- #{usr.userName}
- links with #{usr.id}

In the second column, the first link has a parameter
s:link value=#{usr.id} action=#{userEdit.selectUser(usr)}/
and the other link has no parameter (other method)
s:link value=#{usr.id} action=#{userEdit.selectTest}/ 

Here is the Java code of the userEdit seam bean, which is a SFSB.


  | @Stateful
  | @Scope(EVENT)
  | @Name(userEdit)
  | public class UserEditAction implements UserEdit {
  |   
  | public void selectUser(UserProfile selectedUser) {
  | System.out.println(EDITINGUSER Selected: + editingUser);
  | }
  | 
  | public void selectTest(){
  |  System.out.println(LINK WORKS);
  | }
  | }
  | 


The Problem:

The first link (with the parameter, extended EL) does not work, while the 
second link (no parameter, standard EL) works well.

In the browser, here are the urls of each links:
1ST:
http://localhost:8080/TestWeb/userlist.seam?dataModelSelection=usr%3AuserList%5B0%5DconversationId=4actionMethod=userlist.xhtml%3AuserEdit.selectUser%28usr%29
 

2ND:
http://localhost:8080/TestWeb/userlist.seam?dataModelSelection=usr%3AuserList%5B0%5DconversationId=4actionMethod=userlist.xhtml%3AuserEdit.selectTest

On the JBoss console, seam produces a stack trace when clicking the first link.


  | 15:30:54,735 ERROR [SeamPhaseListener] uncaught exception
  | javax.el.MethodNotFoundException: Method not found: 
UserEditAction:a2s3g6b-z96rab-fb0tnazx-1-fb0treof-s.selectUser(be.post.jr.domain.UserProfile)
  | at org.jboss.el.util.ReflectionUtil.findMethod(ReflectionUtil.java:215)
  | at 
org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:273)
  | at org.jboss.el.parser.AstMethodSuffix.getValue(AstMethodSuffix.java:59)
  | at org.jboss.el.parser.AstMethodSuffix.invoke(AstMethodSuffix.java:65)
  | at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
  | at 
org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
  | at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:174)
  | at org.jboss.seam.navigation.Pages.callAction(Pages.java:634)
  | 

Note in the stack trace, that some strange string has been added to the name of 
the method:
UserEditAction:a2s3g6b-z96rab-fb0tnazx-1-fb0treof-s.selectUser(be.post.jr.domain.UserProfile)

I must admit that I cannot find the cause by myself, even with comparing with 
the book (Yuan) and the examples.

Does anybody have an idea for me ?
Many thanks.

John Rizzo.


Environment:
Facelets
Seam 2.0.1.CR1.
JBoss-4.2.2.GA

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4117076#4117076

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4117076
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Usage of @Restrict annotation with method parameters

2007-11-30 Thread rizzojo
Thank you guys !

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4109182#4109182

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4109182
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Usage of @Restrict annotation with method parameters

2007-11-27 Thread rizzojo
Hi,

I'm investigating Seam and WebBeans authorization aspects.
I've a simple question witch answer is not in the Seam reference guide.

In the Seam v2 reference guide,
http://docs.jboss.com/seam/2.0.0.GA/reference/en/html/security.html#d0e7113
The following example is given:


  | @Name(account)
  | public class AccountAction {
  | @In Account selectedAccount;
  | @Restrict(#{s:hasPermission('account','modify',selectedAccount)})
  | public void modify() {
  | selectedAccount.modify();
  | }
  | }
  | 

The interesting part of this is the use of selectedAccount attribute injected 
by seam.
My question is: is it possible to use a method parameter instead of an 
attribute ?

Something like this:

  | @Name(account)
  | public class AccountService {
  | @Restrict(#{s:hasPermission('account','modify',selectedAccount)})
  | public void modifyAccount(Account selectedAccount) {
  | selectedAccount.modify();
  | }
  | }
  | 

Thank you.
John.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4108080#4108080

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4108080
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user