Permalink
Browse files

Merge pull request #208 from cast-/core-1.5.x

fixed spellcheck_rpc resource reference
  • Loading branch information...
2 parents 195cba9 + f983c02 commit 81b5edc50e912511ff5a1c96d396d013b32f9b45 @martin-g martin-g committed Apr 9, 2013
@@ -18,6 +18,8 @@
package wicket.contrib.tinymce.settings;
import org.apache.wicket.Application;
+import org.apache.wicket.request.cycle.RequestCycle;
+import org.apache.wicket.request.resource.SharedResourceReference;
import wicket.contrib.tinymce.TinyMceBehavior;
@@ -33,8 +35,6 @@
private static final long serialVersionUID = 1L;
private static final String resourceKey = "spellcheck_rpc";
- private static final String resourceUrl = "resources/" +
- TinyMceBehavior.class.getCanonicalName() + "/" + resourceKey;
private PluginButton spellCheckButton;
@@ -65,7 +65,7 @@ public PluginButton getSpellCheckButton()
protected void definePluginSettings(StringBuffer buffer)
{
define(buffer, "spellchecker_languages", "+English=en");
- define(buffer, "spellchecker_rpc_url", resourceUrl);
+ define(buffer, "spellchecker_rpc_url", RequestCycle.get().urlFor(new SharedResourceReference(TinyMceBehavior.class, resourceKey), null).toString());
}
}

0 comments on commit 81b5edc

Please sign in to comment.