@OnEvent("scroll") Object scroll(EventContext context, @RequestParameter("pageNumber") int index) { this.pageNumber = index; this.eventContext = context; return nextPageBlock; }
@UnknownActivationContextCheck public class KnownActivationContextDemo { @PageActivationContext @Property private String activationContext; }
public class ShowCalendarHolder { @SessionState @Property private CalendarHolder holder; void onActionFromClear() { holder = null; } }
public class FormZoneDemo { @Property private Long longValue; @InjectComponent private Zone valueZone; Object onSuccess() { return valueZone.getBody(); } }
public class PACAnnotationDemo { @Property @PageActivationContext private Integer count; @Property private boolean countSet; void onActivate() { countSet = count != null; } }
@MixinAfter public class AltTitleDefault { @Parameter(required = true, defaultPrefix = BindingConstants.LITERAL, allowNull = false, value = "Default title") private String title; void beginRender(MarkupWriter writer) { writer.attributes("alt", title); } }
@SupportsInformalParameters public class OuterAny { // Also, leave a few parameters here and there in the old naming style, with a // leading underscore. @Component(inheritInformalParameters = true) private Any innerAny; }
public class BaseComponent { @SessionState @Property private IncidentData incidentData; }
public class HasBodyDemo { @InjectComponent @Property private Component nobody; @InjectComponent @Property private Component somebody; }
public class ValidateFormValidationExceptionDemo { @Property @Persist private String event; void onValidateFromForm() throws ValidationException { throw new ValidationException("From event handler method."); } void onSuccessFromForm() { event = "success"; } void onFailureFromForm() { event = "failure"; } }