Return-Path: X-Original-To: apmail-wicket-users-archive@minotaur.apache.org Delivered-To: apmail-wicket-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0F6BFE846 for ; Thu, 14 Feb 2013 13:42:13 +0000 (UTC) Received: (qmail 85731 invoked by uid 500); 14 Feb 2013 13:42:12 -0000 Delivered-To: apmail-wicket-users-archive@wicket.apache.org Received: (qmail 85432 invoked by uid 500); 14 Feb 2013 13:42:11 -0000 Mailing-List: contact users-help@wicket.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@wicket.apache.org Delivered-To: mailing list users@wicket.apache.org Received: (qmail 85341 invoked by uid 99); 14 Feb 2013 13:42:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Feb 2013 13:42:10 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of a_wronski@gazeta.pl designates 209.85.212.173 as permitted sender) Received: from [209.85.212.173] (HELO mail-wi0-f173.google.com) (209.85.212.173) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Feb 2013 13:42:02 +0000 Received: by mail-wi0-f173.google.com with SMTP id hq4so7043074wib.12 for ; Thu, 14 Feb 2013 05:41:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding:x-gm-message-state; bh=LKnyfWOZk78eRjCWI2nTrWVEkLDadBx9+rM5PFd2EEo=; b=cwTwmgmaPVc8ptvNcb2r6w0eUSh1p2eIWebeeRpWGm67MgS98Nqqt2EgD64Osklucr UxhzfShOxJD8wOI1v1cLDhBvHjQd7j7kyHJbVl9D6UYeqbRp5GKO7cxHgjBqpoPIgPbW EC+cvlhnELXhJKCWPQCUOnzVdMsA+RH/IGyxIAEXWUByKtFMt8JFpfU+usgIhIDqknxG mMivPn1Dn7xEyDP/9QF1esNH9VwsEZcFp6pqRYHFcS/+W7nZgm+hR/LAIZhIc5FWr3qa qap3fm7c2yHVybx1NxlLhkkUgeroPZamrTUKziI2W/R+O+mue5F17qCwmQJOK1Fcnyon PD1g== X-Received: by 10.194.236.166 with SMTP id uv6mr45567472wjc.34.1360849300452; Thu, 14 Feb 2013 05:41:40 -0800 (PST) Received: from [10.0.0.107] (public-gprs509848.centertel.pl. [31.61.110.217]) by mx.google.com with ESMTPS id t7sm41556949wiy.2.2013.02.14.05.41.38 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 Feb 2013 05:41:39 -0800 (PST) Message-ID: <511CE98C.7020207@gazeta.pl> Date: Thu, 14 Feb 2013 14:41:32 +0100 From: Artur User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: users@wicket.apache.org Subject: Behavior.renderHead stopped working after migration from 1.4 to 6.5 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQnKs1SbmSm5wIG8S5tflQUAGm0Y5dvjPbu4EYHDtd1LN3+uQPsZ0zUarMjS6QO8cLXFEUsR X-Virus-Checked: Checked by ClamAV on apache.org 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 = "" + 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> Thanks for help in advance, Artur --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org For additional commands, e-mail: users-help@wicket.apache.org