= Server Side Events Extension

:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR  CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

The SSE (Server Side Events) module integrates with the xref:vw:ROOT:about.adoc[Wicket Viewer], and provides the ability to dynamically update properties of type xref:valuetypes:markdown:about.adoc[Markdown] and xref:valuetypes:asciidoc:about.adoc[Asciidoc].
One use case could be to render a progress bar for a long-running action.


== Usage

[WARNING]
====
TODO: v2 - to write up...

need to annotate property using `@ServerSentEvents` annotation, and provide an implementation of the `SseSource` SPI.
====

== Configuration

Add the following dependency:

[source,xml]
.pom.xml
----
<dependency>
    <groupId>org.apache.causeway.extensions</groupId>
    <artifactId>causeway-extensions-sse-wicket</artifactId>
</dependency>
----

Also add the following module to your `AppManifest`:

[source,java]
.AppManifest.java
----
@Configuration
@Import({
        CausewayModuleExtSseWicket.class,  // <.>
        ...
})
public class AppManifest {
}
----



