I am using this  @AuthorizeInstantiation   (wicket authetication annotation)
in my pages , the code for this annotation

@Retention(RetentionPolicy.RUNTIME)
@Target( { ElementType.PACKAGE, ElementType.TYPE })
@Documented
@Inherited
public @interface AuthorizeInstantiation {

        /**
         * Gets the roles that are allowed to take the action.
         * 
         * @return the roles that are allowed. Returns a zero length array by
default
         */
        String[] value() default {};
}


I created my enum with representing authorities

public enum  Authorities {
        
        LIASION_OFFICER,
        GRANTS_OFFICER,
        PROGRAM_ANALYST,
        ADMIN;

}

I am trying to use  AuthorizeInstantiation   in my page  here an example 

@AuthorizeInstantiation(value={Authorities.LIASION_OFFICER.name()})
public class HomePage extends BasePage {


this line does not compile, I get the error 

The value of annotation attribute AuthorizeInstantiation .value must be a
constant expression  .please help me resolve this .
-- 
View this message in context: 
http://www.nabble.com/using--annotation-%40AuthorizeInstantiation-tp20841729p20841729.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to