Annotation Type UIRef

  • @Documented
    public @interface UIRef
    Annotation for UI references. It is used to as either a String-cast of an inline string or as a field or variable declaration of String type.

    Only 1 acceptable method pattern for this annotation.


       public class MyUIListener
         @UIRef private static final String myButton = "myButton";
         public MyUIListener()
         // Some method referencing a UI component in the scoped panel of the @Panel annotation. 
         public void onButtonAction(UIActionEvent event)
           UIButton button1=event.getFirstUIComponentNN((@UIRef String) "myButton",UIButton.class);
           UIButton button2=event.getFirstUIComponentNN(myButton,UIButton.class);
           button1.setText("His button");
    Christopher Mindus