Philip A. Chapman wrote:
Everyone,

This email will probably be a little difficult to read because I have
tried to put sample code in here, but please hang in there and see if
you can help me.

I am linking in a CSS page using a relative path.  On most pages it's
not working because of how paths are being created.  In a
Form.onSubmit(), the following code:

                                        
setResponsePage(getApplicationSettings().getDefaultPageFactory()
        .newPage(getApplicationPages().getHomePage(),
                (PageParameters) null));

btw.
it's enough to do
setResponsePage(HomePage.class);
no need for this long notation.

produces a url like :


http://server/app/?bookmarkablePage=package.web.Home


This is correct.  Everywhere else, I use static inner class
implementations of PageLink and BookmarkablePageLink:


public static PageLink link(final String name, final Integer id)
{
  return new PageLink(name, new IPageLink()
    {
      public Page getPage()
      {
        if (id == null) {
          return new EditReport(new Report());
        } else {
          return new            EditReport(Report.lookup(id));
        }
      }

      public Class getPageIdentity()
      {
        return EditReport.class;
      }
  });
}

produces a URL like


http://server/app?bookmarkablePage=package.web.ReportsListing
sorry, I don't understand this. How can this pagelink generate bookmarkable URL? It should be more something like
app?path=XXX&interface=ILinkListener... and after redirect
just
app?path=YYY

-Matej


The lack of a slash after the servlet application name "app" makes it so
that the browser cannot find the css style page.

Thanks,



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to