Skip to content

Commit

Permalink
SAK-47764 Sitestats fix injection of Formattedtext in CHResourceModel (
Browse files Browse the repository at this point in the history
  • Loading branch information
ern authored Sep 27, 2022
1 parent e909b81 commit 2101d09
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
*/
package org.sakaiproject.sitestats.tool.wicket.models;

import org.apache.wicket.injection.Injector;
import org.apache.wicket.model.IModel;
import org.apache.wicket.spring.injection.annot.SpringBean;
import org.sakaiproject.util.api.FormattedText;
Expand All @@ -36,14 +37,15 @@ public class CHResourceModel implements IModel<Object> {
boolean isCollection = false;

public CHResourceModel(String resourceId, String resourceName) {
this.resourceId = resourceId;
this.resourceName = resourceName;
this(resourceId, resourceName, false);
}

public CHResourceModel(String resourceId, String resourceName, boolean isCollection) {
this.resourceId = resourceId;
this.resourceName = resourceName;
this.isCollection = isCollection;

Injector.get().inject(this);
}

public Object getObject() {
Expand Down Expand Up @@ -84,4 +86,4 @@ public void detach() {
resourceName = null;
}

}
}

0 comments on commit 2101d09

Please sign in to comment.