Hi Tom,

Is ArrowModel and the TTRR recreated for for every page ? I guess the
answer is YES but I need to ask.
Please create a quickstart and attach it to Jira so we can take a look.

On Wed, Apr 4, 2012 at 9:18 PM, Burton, Tom F (DOR)
<[email protected]> wrote:
> Hello,
>
>  I have a component(It displays a menu common across the pages of my
> application.)
>
> All the WebPages in my application inherit from BasePage which includes
> the menu.
>
>
>
> BasePage includes a component MainMenu, which creates a List of
> Lists(that contain page links)
>
> The Lists of lists are then wrapped inside of jQuerySlideMenu.
>
>
>
> jQuerySlideMenu has the following method defined
>
> renderHead(IHeaderResponse response)
>
> {
>
>    super.renderHead(response);
>
>    response
>
>                .renderCSSReference(new
> PackageResourceReference(AppBasePage.class,
>
>
> "includes/css/jqueryslidemenu.css"));
>
>    response
>
>                .renderCSSReference(new
> PackageResourceReference(AppBasePage.class,
>
>
> "includes/css/printjqueryslidemenu.css"), "print");
>
>
>
>    Map<String, Object> arrows = new HashMap<String, Object>(2);
>
>
>
>    /*
>
>     * TODO: look into Meta-inf staticing the resources (faster)
>
>     * uses MetaInfStaticResourceReference
>
>     * requires the files to be mounted under
>
>     * /META-INF/resources in the final jar
>
>     */
>
>    //TODO: look at finding a way to make sure it gets redone for every
> page
>
>    PackageResourceReference down =
>
>           new PackageResourceReference(AppBasePage.class,
>
>                                        "includes/menu_down.gif");
>
>    PackageResourceReference right =
>
>               new PackageResourceReference(AppBasePage.class,
>
>                                            "includes/menu_right.gif");
>
>
>
>   arrows.put("menu_down", urlFor(down, null));
>
>   arrows.put("menu_right",   urlFor(right, null));
>
>
>
>    /* this works
>
>    String prefix = getRequest().getContextPath() + "/";
>
>    arrows.put("menu_down", prefix + urlFor(down, null));
>
>    arrows.put("menu_right", prefix + urlFor(right, null));
>
>   */
>
>
>
>    //arrow model just implements IModel to pass arrows for getObject()
>
>    arrowModel model = new arrowModel(arrows);
>
>    response.renderJavaScriptReference(
>
>      new TextTemplateResourceReference(AppBasePage.class,
>
>
> "includes/javascript/jqueryslidemenu.js", model));
>
> }
>
>
>
> When I initially login it works great for /home,  or other
> /mountedPageName pages, but if I follow a link to
> /wicket/bookmarkable/full.class.name/?stuffhere  the images will not
> display.
>
>
>
> It works if I prefix contextPath/ infront of the url.  But some of my
> sites are behind a proxy, and I would like this to work there as well.
>
>
>
> Thank you for any help,
>
> Tom Burton
>
>
>
>
>



-- 
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