Skip to content
Browse files

Call BrandProvider earlier. This change lets given brand provider to …

…add new components or use visitors to modify component structure. Overriding is still possible through addOrReplace method

Signed-off-by: Lukasz Dywicki <luke@code-house.org>

git-svn-id: https://svn.apache.org/repos/asf/karaf/webconsole/trunk@1226435 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 357ef33 commit bf22ab91d81e6ecca8b5a4ebd109cfdbfbac70f4 @splatch splatch committed Jan 2, 2012
View
7 core/src/main/java/org/apache/karaf/webconsole/core/BasePage.java
@@ -66,9 +66,10 @@ public BasePage() {
}
@Override
- protected void onBeforeRender() {
- super.onBeforeRender();
-
+ protected void onConfigure() {
brandProvider.modify(this);
+
+ super.onConfigure();
}
+
}
View
3 core/src/main/java/org/apache/karaf/webconsole/core/brand/DefaultBrandProvider.java
@@ -21,6 +21,7 @@
import java.util.List;
import org.apache.karaf.webconsole.core.BasePage;
+import org.apache.karaf.webconsole.core.behavior.FormalizeBehavior;
import org.apache.wicket.Page;
import org.apache.wicket.ResourceReference;
import org.apache.wicket.behavior.IBehavior;
@@ -43,7 +44,7 @@ public Image getHeaderImage(String imageId) {
}
public void modify(Page page) {
- // we don't modify page by default
+ page.add(new FormalizeBehavior());
}
}

0 comments on commit bf22ab9

Please sign in to comment.
Something went wrong with that request. Please try again.