You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Konstantin Ignatyev (JIRA)" <ji...@apache.org> on 2013/02/11 23:03:12 UTC
[jira] [Created] (WICKET-5035) script tag with wicket:id does not
throw exception if it was not added in the code
Konstantin Ignatyev created WICKET-5035:
-------------------------------------------
Summary: script tag with wicket:id does not throw exception if it was not added in the code
Key: WICKET-5035
URL: https://issues.apache.org/jira/browse/WICKET-5035
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 6.5.0
Reporter: Konstantin Ignatyev
Have markup
<wicket:panel>
<b> this is my component</b>
<script language="JavaScript" wicket:id="my-script">
</script>
</wicket:panel>
and code
public MyComponent(String id) {
super(id);
setOutputMarkupId(true);
String script = getScript();
Label scriptLabel = new Label("my-script",script);
scriptLabel.setEscapeModelStrings(false);
//add( scriptLabel);
}
response simply contains empty CDATA for the script tag body without throwing exception that component is not added in the code
<?xml version="1.0" encoding="UTF-8"?><ajax-response><component id="container5" encoding="wicket1" ><![CDATA[<div wicket:id="container" id="container5">
<div wicket:id="replaceable" id="replaceable6"><wicket:panel>
<b> this is my component</b>
<script language="JavaScript" wicket:id="my-script">
/*<![CDATA[*/
/*]^]^>*/
</script>
</wicket:panel></div>
</div>]]></component></ajax-response>
adding label in the code adds script body as expected.
repro project attached
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira