Hi,

File a ticket please.

On Tue, Jul 24, 2012 at 12:14 PM, Dan Simko <[email protected]> wrote:
> Hi,
>
> I am not sure if it's a bug but in version 1.5 this code was working:
>
>
> public class HomePage extends WebPage {
>     private static final long serialVersionUID = 1L;
>
>
>     public HomePage(final PageParameters parameters) {
>         super(parameters);
>
>         final ModalWindow window = new ModalWindow("modal");
>         window.setContent(new MyFragment(ModalWindow.CONTENT_ID, this));
>         add(window);
>         add(new AjaxLink("link") {
>             @Override
>             public void onClick(AjaxRequestTarget target) {
>                 window.show(target);
>             }
>         });
>
>     }
> // FIXME: If you uncomment this, resources will be added to the page and
> carousel will be created,
> // but only first time when you click on "show modal" link. Second time
> carousel is not created.
> //    @Override
> //    public void renderHead(IHeaderResponse response) {
> //        response.render(JavaScriptHeaderItem.forReference(new
> PackageResourceReference(MyFragment.class, "jquery.jcarousel.js")));
> //        response.render(CssHeaderItem.forReference(new
> PackageResourceReference(MyFragment.class, "skin.css")));
> //    }
>
>     private static class MyFragment extends Fragment{
>
>         public MyFragment(String id, MarkupContainer container) {
>             super(id, "fragment", container);
>         }
>
>         //FIXME: resources are not added to the page head
>         @Override
>         public void renderHead(IHeaderResponse response) {
>             response.render(JavaScriptHeaderItem.forReference(new
> PackageResourceReference(MyFragment.class, "jquery.jcarousel.js")));
>             response.render(CssHeaderItem.forReference(new
> PackageResourceReference(MyFragment.class, "skin.css")));
>         }
>
>     }
> }
>
>
> Should I create a Jira? Quickstart is attached.
>
> Thanks in advance!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to