What happens with "chart" in case of an error? You should add a fallback component in an error case.

Sven

On 01/08/2014 10:10 AM, Joost Verhagen wrote:
Hi Martin,

Thanks for your support!

This is the constructor/snippit of the relevant class. As I said, it works
when I run it from Eclipse. So I'm not sure it's codebase or deployment
where I should be looking.

public class DisplayPage extends Panel {
     public DisplayPage (String id, int trendId) {
         super(id);
         add(new Label("message", "Graph ["+trendId+"] requested"));

         try {
             pt = new PublicTrend(trendId);
             add(new Chart("chart", getChart()));
         } catch (SQLException e) {
             replace(new Label("message", "Could not render chart for
["+trendId+"] because of: " + e.getLocalizedMessage()));
         }
     }

// more stuff here
}

Joost


2014/1/8 Martin Grigorov <mgrigo...@apache.org>

Hi,

The error says that you have a component with id 'chart' in the markup but
you haven't added it in the Java.
Show us the code for DisplayPage.java.

Martin Grigorov
Wicket Training and Consulting


On Wed, Jan 8, 2014 at 10:49 AM, Joost Verhagen <joost.verha...@byjove.nl
wrote:
Hi Guys,

I'm a Wicket newby and still trying to figure out how things work, so
please forgive me if this question does nog belong here.

I've built a small wicket application from Eclipse and Maven/Jetty (based
on the JugTenda demo app) which I'm now trying to deploy to a
'stand-alone'
jetty container. Only, when I run it, I get the below error which I do
not
get from running the app from the Eclipse/jetty plugin (there is a
"chart"
component in the HTML only now Wicket expects a "contentComponent:chart"
name.

Unable to find component with id 'chart' in [DisplayPage [Component id =
contentComponent]]
     Expected: 'contentComponent:chart'.

I'm a bit at loss where to look for to fix this. Can you help me out?

thanks,

Joost

2014-01-08 09:35:36 ERROR MarkupContainer:1434 - Unable to find component
with id 'chart' in [DisplayPage [Component id = contentComponent]]
     Expected: 'contentComponent:chart'.
     Found with similar names: ''
2014-01-08 09:35:36 ERROR DefaultExceptionMapper:123 - Unexpected error
occurred
Unable to find component with id 'chart' in [DisplayPage [Component id =
contentComponent]]
     Expected: 'contentComponent:chart'.
     Found with similar names: ''
  MarkupStream: [markup =


file:/D:/java/Frontend/jetty/work/jetty-0.0.0.0-8081-MyFront.war-_MyFront-any-8137485967171853872.dir/webapp/WEB-INF/classes/nl/mydomain/frontend/DisplayPage.html
<wicket:panel>
         Display Page
         <span wicket:id="message">Hello, World!</span>
         <div wicket:id="chart"></div>
     </wicket:panel>, index = 6, current =  '<div wicket:id="chart">'
(line
0, column 0)]



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to