ok, maybe I wasn't clear enough.
The simple question is, why the add(HeaderContributor.forCss...));
is not added to the output markup when I override getAssociatedMarkupStream?

Thanks

On Tue, May 6, 2008 at 4:08 PM, Eyal Golan <[EMAIL PROTECTED]> wrote:

> Hi all,
> We have this method:
>     @Override
>     public MarkupStream getAssociatedMarkupStream(final boolean
> throwException)
>     {
>         if(html != null) {
>             return GUIUtis.getMarkupStream(this, html);
>         }
>         return super.getAssociatedMarkupStream(throwException);
>     }
>
> and:
>     static public MarkupStream getMarkupStream(Page page,String htmlText){
>         try
>         {
>             StringResourceStream myhtml = new StringResourceStream(new
> StringBuilder(htmlText));
>             MarkupResourceStream m = new MarkupResourceStream(myhtml);
>             Markup myMarkup =
> page.getApplication().getMarkupSettings().getMarkupParserFactory().newMarkupParser(m).parse();
>             MarkupStream markupStream = new MarkupStream(myMarkup);
>             return markupStream;
>         }
>         catch (Exception ex)
>         {
>             throw new RuntimeException("Fail to parse
> markup:\n"+htmlText);
>         }
>     }
>
> The problem:
> When the html is not null (and we enter GUIUtis.getMarkupStream),
> css that where added using HeaderContributer are not added to the output
> HTML markup.
> I have something like this in a component:
> add(HeaderContributor.forCss(EurekifyButton.class, "EurekifyButton.css"));
> The css is missing.
>
> I can't change the usage of getAssociatedMarkupStream to use variation or
> something like this.
>
> any thought?
> --
> Eyal Golan
> [EMAIL PROTECTED]
>
> Visit: http://jvdrums.sourceforge.net/




-- 
Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/

Reply via email to