You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Meier (JIRA)" <ji...@apache.org> on 2013/02/12 22:25:13 UTC

[jira] [Resolved] (WICKET-5035) script tag with wicket:id does not throw exception if it was not added in the code

     [ https://issues.apache.org/jira/browse/WICKET-5035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sven Meier resolved WICKET-5035.
--------------------------------

    Resolution: Fixed
      Assignee: Sven Meier

a script or style tag with wicket:id will now fail if no component can be resolved
                
> 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
>            Assignee: Sven Meier
>         Attachments: wicket-extra-caret.tgz
>
>
> 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