Hi Guys,

We just migrated our code to W6.5 and are very happy about it.
Unfortunately we don't know how to fix one of the errors.

We did a research but cannot find a solution :(

The code adds a link before a component with some javascript:

            private class ChangeDateBehavior extends Behavior {
  [...]
                @Override
public void renderHead(Component component, IHeaderResponse response) { if (RequestCycle.get().find(AjaxRequestTarget.class) != null) { String javascript = "var e = Wicket.$('" + getMarkupId() + "'); if (e != null && typeof(e.parentNode) != 'undefined') e.parentNode.removeChild(e);";
response.render(JavaScriptHeaderItem.forScript(javascript, null));
                    }
String tag = "<a id=\"" + getMarkupId() + "\"href=\"#\" onclick=\"changeDate('" + component.getMarkupId() + "', " + Integer.toString(days) + ")\">" + txt + "";
response.render(JavaScriptHeaderItem.forScript(tag, null));

                }

                @Override
                public void bind(Component component) {
                    this.component = component;
                }

                public String getMarkupId() {
                    return component.getMarkupId() + "--" + id;
                }

            }


And the error msg from the console:
ERROR: Wicket.Head.Contributor.processScript: SyntaxError: syntax error: eval -> <a id="from2059--lt"href="#" onclick="changeDate('from2059', -1)"><<\/a>


Thanks for help in advance,
Artur

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to