You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by HHB <hu...@yahoo.ca> on 2009/04/02 13:23:28 UTC

NPE : Exception in rendering component

Hey,
I created this panel:
<html>
<head>
    <wicket:head>
        <wicket:link>

        </wicket:link>
    </wicket:head>
</head>
<body>
<wicket:panel>
    <div id="accordion">
            <h3><a href="#">First header</a></h3>

            <div>First content</div>
        <h3>
            <a href="#">Second header</a>
        </h3>
            <div>Second content</div>
    </div>
</wicket:panel>
</body>
</html>

This is supposed to be jQuery Accordion component.

public class NavigationPanel extends Panel {

    public NavigationPanel(String id) {
        super(id);
    }
    
}

And here is the main page:

<link href="jquery-ui-1.7.1.custom.css" 
rel="stylesheet" type="text/css"/>
<script href="jquery-1.3.2.min.js" 
type="text/javascript"/>
<script href="jquery-ui-1.7.1.custom.min.js"
 type="text/javascript"/>
<div class="yui-u first">
     <div wicket:id="navo">Content</div>
</div>

public Index() {
        add(new NavigationPanel("navo"));
}

But I'm getting the following exception:
WicketMessage: Exception in rendering component: 
[MarkupContainer [Component id
= _link3]]

Root cause:

java.lang.NullPointerException
at
org.apache.wicket.markup.resolver.
AutoLinkResolver$PathInfo.<init>(AutoLinkResolver.java:249)


Page

      [Page class = domain.Index, id = 0, version = 0]:
      # 	Path 	Size 	Type 	Model Object
      1    	navo    	641 bytes    	domain.NavigationPanel    	  



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


Re: NPE : Exception in rendering component

Posted by HHB <hu...@yahoo.ca>.
Issue solved,
I'm using href instead of src attribute of script tag


HHB wrote:
> 
> Hey,
> I created this panel:
> <html>
> <head>
>     <wicket:head>
>         <wicket:link>
> 
>         </wicket:link>
>     </wicket:head>
> </head>
> <body>
> <wicket:panel>
>     <div id="accordion">
>             <h3> # First header </h3>
> 
>             <div>First content</div>
>         <h3>
>              # Second header 
>         </h3>
>             <div>Second content</div>
>     </div>
> </wicket:panel>
> </body>
> </html>
> 
> This is supposed to be jQuery Accordion component.
> 
> public class NavigationPanel extends Panel {
> 
>     public NavigationPanel(String id) {
>         super(id);
>     }
>     
> }
> 
> And here is the main page:
> 
> <link href="jquery-ui-1.7.1.custom.css" 
> rel="stylesheet" type="text/css"/>
> <script href="jquery-1.3.2.min.js" 
> type="text/javascript"/>
> <script href="jquery-ui-1.7.1.custom.min.js"
>  type="text/javascript"/>
> <div class="yui-u first">
>      <div wicket:id="navo">Content</div>
> </div>
> 
> public Index() {
>         add(new NavigationPanel("navo"));
> }
> 
> But I'm getting the following exception:
> WicketMessage: Exception in rendering component: 
> [MarkupContainer [Component id
> = _link3]]
> 
> Root cause:
> 
> java.lang.NullPointerException
> at
> org.apache.wicket.markup.resolver.
> AutoLinkResolver$PathInfo.<init>(AutoLinkResolver.java:249)
> 
> 
> Page
> 
>       [Page class = domain.Index, id = 0, version = 0]:
>       # 	Path 	Size 	Type 	Model Object
>       1    	navo    	641 bytes    	domain.NavigationPanel    	  
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/NPE-%3A-Exception-in-rendering-component-tp22845707p22846458.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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