|
|
Using acegi-security-1.0, Spring-2.0RC3
I am trying to stick to using the authz taglib in my jsp (no scriplets) that displays the user's details (i.e. username, email, etc) and I am running into an issue trying to access the complex properties of my custom UserDetails object when using the authz tld.
For example,
lt;acegi:authentication operation=quot;firstNamequot;/gt;, works fine.
However since my UserDetails Impl class contains complex objects (i.e. an Address object), I need to display these values as well. But lt;acegi:authentication operation=quot;address.street1quot;/gt; causes an error.
Error:
java.lang.NoSuchMethodException: org.test.bean.Member.getAddress.street1()
Question: is there a way to reference complex members/properties of the UserDetails implementation class by just using the authz tld and NOT creating a getStreet1() method in the UserDetail impl class.
example UserDetail Impl class:Code:
public class Member implements UserDetails {
private int memberId; private String username; private Address address;
... private Address getAddress() { return address; }
...
}
Address class snipet:Code:
public class Address { private int addressId; private String street1; private String street2;
... public String getStreet1() { return street1; }
...
}
any information is appreciated.
Not sure how I missed this one, guess tired eyes from searching, but it appears I found my answer.
From: showthread.php?t=22620
From Ben Alex gt;gt;The authz tag doesn't support nesting. ...lt;lt;
guess I will have to use jstl for now...
Thanks anyway,
Phil |
|