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

smallufo updated WICKET-2965:
-----------------------------

    Attachment: quickstart-0.0.1-SNAPSHOT.jar

quickstart jar


> Ajax displayed label not compatible with IE6/7/8 if the label contains <pre> 
> tag !                                             wicket X                    
>                             
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2965
>                 URL: https://issues.apache.org/jira/browse/WICKET-2965
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.9
>         Environment: Wicket 1.4.9
>            Reporter: smallufo
>         Attachments: quickstart-0.0.1-SNAPSHOT.jar
>
>
> If a label is default invisible and is setVisible(true) in an 
> AjaxButton.onSubmit() , and if that label containing <pre>xxx</pre> string, 
> it will fail to render in IE 6/8 .
> IE6/8 report wicket-ajax.js has something wrong ...
> I don't have IE7 , but I think the result is the same :
> HTML 
> <form wicket:id="form">
>     <input type="button" value="failButton" wicket:id="failButton" />
>     <span wicket:id="failLabel"></span>
> </form>
> Java Code :
> public class MainPage extends WebPage {
>   private MultiLineLabel failLabel = new MultiLineLabel("failLabel");
>   
>   public MainPage()   {
>     failLabel.setVisible(false);
>     failLabel.setOutputMarkupPlaceholderTag(true);
>     
>     Form<Void> form = new Form<Void>("form");
>     add(form);
>     form.add(failLabel);
>     
>     AjaxButton failButton = new AjaxButton("failButton")     {
>       @Override
>       protected void onSubmit(AjaxRequestTarget target, Form<?> form)       {
>         failLabel.setDefaultModel(new PropertyModel<String>(MainPage.this , 
> "failResult"));
>         failLabel.setEscapeModelStrings(false);
>         failLabel.setVisible(true);
>         target.addComponent(failLabel);
>       }
>     };
>     form.add(failButton);
>   }
>   /**
>    * Success in Firefox/Chrome , but fail in IE 6/8 (I don't have IE7)  
>    */  
>   public String getFailResult()  {
>     return "<pre><font color=\"#ff0000\">R</font></pre>";
>   }
> }
> In the code above , if I take away "<pre>" and "</pre>" in getFailResult() , 
> it works like a charm!
> I think it is a bug...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to