I haven't used autolinks myself, but these guys:

    <wicket:link>
     <a href = "rechtbeheer/RechtOverzichtPage.html">Rechten</a><br/>
     <a href = "groepbeheer/GroepOverzichtPage.html">Groepen</a><br/>
     <a href = "gebruikerbeheer/GebruikerOverzichtPage.html">Gebruikers</a><br/>
    </wicket:link>

are the troublemakers.

So, if it works in pages without a border, my guess is that your border is in a 
different package than the page that does work, and that one of the autolinks 
(like rechtbeheer/RechtOverzichtPage.html) cannot be found as a relative page. 
Is that it?

Eelco


Peter Veentjer - Anchor Men wrote:

I`m trying to add borders to a trial application and I can`t get it working, 
but if I remove the borders everyting is ok (so no border tags in the html of 
the pages and no extending from a Page that adds the borders. The code to add 
the borders was based on the following tutorial:

http://wicket.sourceforge.net/wiki/index.php/Panels_and_borders

If I add the borders I get an:
Unexpected runtime exception [page = [Page class = 
anchormen.template.wicketweb.rechtbeheer.RechtOverzichtPage, id = 2]]
wicket.WicketRuntimeException: Unable to load class with name: 
anchormen.template.wicketweb.rechtbeheer.rechtbeheer.RechtOverzichtPage

Maybe I forgot something but I don`t understand how forgetting something can 
lead to a ClassNotFoundException. Maybe it has something to do with the fact I 
don`t use the normal PageFactory? (I have replaced it with a SpringPageFactory)
_____________________________________________________________
This is the Page that causes the trouble if I add the border:

public class RechtOverzichtPage extends AbstractBeheerPage {
private final static Logger logger = Logger.getLogger(RechtOverzichtPage.class);
private RechtDao _rechtDao;
public RechtOverzichtPage(RechtDao rechtDao){
 logger.info("RechtOverzichtPage constructor 1");
 if(rechtDao==null)
  throw new NullPointerException("rechtDao can`t be null");
 _rechtDao = rechtDao;
 PageableListView listview = new  RechtOverzichtListView();
 add(listview);
 add(new PageableListViewNavigator("pageTableNav", listview));
}
//todo: moet er weer uit
public RechtOverzichtPage(){
 logger.info("RechtOverzichtPage constructor 2");
}
public class RechtOverzichtListView extends PageableListView {
 public RechtOverzichtListView(){
  super("rows",_rechtDao.findAll(),10);
 }
 public void populateItem(ListItem listitem){
  logger.info("populateItem");
   Recht recht = (Recht)listitem.getModelObject();
   WebMarkupContainer row = new WebMarkupContainer("row");
   row.add(new Label("naam", recht.getNaam()));
   row.add(new Label("nummer", recht.getNummer().toString()));
   listitem.add(row);
  }
}
}

___________________________________________
This is the HTML that belongs to the RechtOverzichtPage.

<?xml version="1.0"?>
<html  xmlns="http://www.w3.org/1999/xhtml";
 xmlns:wicket="http://wicket.sourceforge.net/";
 xml:lang="en"
 lang="en">
<body>
<span wicket:id="beheerBorder">
<h1>Recht overzicht</h1>
<div id="uitleg">Hieronder ziet u alle rechten.</div>
<table>
 <tr wicket:id="rows">
  <span wicket:id="row">
   <td><span wicket:id="naam">Naam komt hier</span></td>
   <td><span wicket:id="nummer">Nummer komt hier</span></td>
  </span>
 </tr>
</table>
</span><!-- beheerborder -->
</body>
</html>
___________________________________________

This is the BeheerPage all beheerpages have to extend (copied from the 
turorial):

public class AbstractBeheerPage extends WebPage {
private Border border;
public MarkupContainer add(final Component child) {
 // Add children of the page to the page's border component
 if (border == null) {
  // Create border and add it to the page
  border = new BeheerBorder();
  super.add(border);
 }
 border.add(child);
 return this;
}
public void removeAll() {
 border.removeAll();
}
public MarkupContainer replace(final Component child) {
 return border.replace(child);
}
}

________________________________________________________

This is the Border html:
<?xml version="1.0"?>
<html  xmlns="http://www.w3.org/1999/xhtml";
 xmlns:wicket="http://wicket.sourceforge.net/";
 xml:lang="en"
 lang="en">
<body>
<wicket:border>
 <table>
  <tr>
   <td>
    <wicket:link>
     <a href = "rechtbeheer/RechtOverzichtPage.html">Rechten</a><br/>
     <a href = "groepbeheer/GroepOverzichtPage.html">Groepen</a><br/>
     <a href = "gebruikerbeheer/GebruikerOverzichtPage.html">Gebruikers</a><br/>
    </wicket:link>
   </td>
   <td><wicket:body/></td>
  </tr>
 </table>
</wicket:border>
</body>
</html>

_______________________________________


And this is the stacktrace.


15:00:03,015 INFO  [STDOUT] 15:00:03,015 INFO  [HibernateDao] findAll
//The RechtOverzichtPage is loaded and populated.. so the class is found.
15:00:06,437 INFO  [STDOUT] 15:00:06,437 INFO  [RechtOverzichtPage] populateItem
15:00:06,437 INFO  [STDOUT] 15:00:06,437 INFO  [RechtOverzichtPage] populateItem
15:00:06,437 INFO  [STDOUT] 15:00:06,437 INFO  [RechtOverzichtPage] populateItem
15:00:06,437 INFO  [STDOUT] 15:00:06,437 INFO  [RechtOverzichtPage] populateItem
15:00:06,437 INFO  [STDOUT] 15:00:06,437 INFO  [RechtOverzichtPage] populateItem
15:00:06,437 INFO  [STDOUT] 15:00:06,437 INFO  [RechtOverzichtPage] populateItem
15:00:06,437 INFO  [STDOUT] 15:00:06,437 INFO  [RechtOverzichtPage] populateItem
15:00:06,437 INFO  [STDOUT] 15:00:06,437 INFO  [RechtOverzichtPage] populateItem
15:00:06,453 INFO  [STDOUT] 15:00:06,453 INFO  [RechtOverzichtPage] populateItem
15:00:06,453 INFO  [STDOUT] 15:00:06,453 INFO  [RechtOverzichtPage] populateItem
15:00:06,453 INFO  [MarkupCache] Loading markup from 
file:/C:/java/servers/jboss-4.0.1/server/default/deploy/Template.war/WEB-INF/classes/anchormen/template/wicketweb/rechtbeheer/RechtOverzichtPage.html
15:00:06,546 ERROR [RequestCycle] Unexpected runtime exception [page = [Page 
class = anchormen.template.wicketweb.rechtbeheer.RechtOverzichtPage, id = 2]]
wicket.WicketRuntimeException: Unable to load class with name: 
anchormen.template.wicketweb.rechtbeheer.rechtbeheer.RechtOverzichtPage
       at wicket.DefaultClassResolver.resolveClass(DefaultClassResolver.java:40)
       at 
wicket.AutoLinkResolver.resolveAutomaticLink(AutoLinkResolver.java:137)
       at wicket.AutoLinkResolver.resolve(AutoLinkResolver.java:75)
       at wicket.MarkupContainer.renderNext(MarkupContainer.java:865)
       at 
wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:659)
       at 
wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:631)
       at wicket.markup.html.border.Border.onComponentTagBody(Border.java:229)
       at wicket.Component.renderComponent(Component.java:1639)
       at 
wicket.markup.html.WebMarkupContainer.onRender(WebMarkupContainer.java:63)
       at wicket.Component.render(Component.java:1021)
       at wicket.MarkupContainer.renderNext(MarkupContainer.java:855)
       at wicket.MarkupContainer.renderAll(MarkupContainer.java:759)
       at wicket.Page.onRender(Page.java:731)
       at wicket.Component.render(Component.java:1021)
       at wicket.Page.doRender(Page.java:470)
       at wicket.RequestCycle.respond(RequestCycle.java:650)
       at wicket.RequestCycle.request(RequestCycle.java:375)
       at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:221)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at 
org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:172)
       at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
       at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at 
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
       at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at 
org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
       at 
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
       at 
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
       at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
       at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
       at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at 
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
15:00:06,640 INFO  [MarkupCache] Loading markup from 
jar:file:/C:/java/servers/jboss-4.0.1/server/default/deploy/Template.war/WEB-INF/lib/wicket-1.0.jar!/wicket/markup/html/pages/ExceptionErrorPage.html
15:00:06,656 INFO  [MarkupCache] Loading markup from 
jar:file:/C:/java/servers/jboss-4.0.1/server/default/deploy/Template.war/WEB-INF/lib/wicket-1.0.jar!/wicket/markup/html/debug/WicketComponentTree.html



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to