In the last few days I've been developing an app trying to learn Wicket
and I've noticed for some reason or another I'll occasionally get a
StackOverflowException (from java.util.regex.Pattern) and I am having a
heck of a time tracking down what is causing it.
I did a search in both users and dev lists and found this post:
http://sourceforge.net/mailarchive/message.php?msg_id=11223256
Which sounds similar to what I'm seeing, although the page it's dying on
isn't using any custom models just a ListView.
Java code below:
---------------------
public ManageContentPage(PageParameters pageParameters)
{
PageDAO pageDAO =
(PageDAO)WebApplicationContextUtils.getWebApplicationContext(getWebRequestCycle().getWebSession().getHttpSession().getServletContext()).getBean("pageDAO");
add(new Label("title", "Manage Pages"));
add(new Label("header", "Manage Pages"));
add(new ListView("pageList", pageDAO.getPages())
{
private static final long serialVersionUID = 1L;
@Override
protected void populateItem(ListItem listItem)
{
PageDTO page = (PageDTO)listItem.getModelObject();
System.out.println("Page: " + page);
listItem.add(new Label("id", page.getId().toString()));
listItem.add(new Label("name", page.getName()));
listItem.add(new Label("summary",
page.getContent().substring(0, 64)));
listItem.add(removeLink("removeButton", listItem));
}
});
}
---------------------
HTML page below:
---------------------
<tbody>
<tr wicket:id="pageList">
<td wicket:id="id">ID</td>
<td wicket:id="name">NAME</td>
<td wicket:id="summary">SUMMARY</td>
<td><button wicket:id="removeButton">Remove</button></td>
</tr>
</tbody>
---------------------
The strange part is that when the DB is empty, no page records, I get
the endless stack trace and overflow above. But if I just add one
record, viola, it works fine. Can someone point out what checks I am
suppose to implement that I missed and why this code is totally blowing
instead of just displaying an empty table with no rows?
Best,
Riyad
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Wicket-develop mailing list
Wicket-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-develop