You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "smallufo (JIRA)" <ji...@apache.org> on 2010/11/12 13:55:13 UTC

[jira] Created: (WICKET-3162) NPE when the underlaying model changed and ajax re-appear.

NPE when the underlaying model changed and ajax re-appear. 
-----------------------------------------------------------

                 Key: WICKET-3162
                 URL: https://issues.apache.org/jira/browse/WICKET-3162
             Project: Wicket
          Issue Type: Bug
    Affects Versions: 1.4.13
         Environment: wicket 1.4.13
            Reporter: smallufo


<span wicket:id="border">
  <wicket:container wicket:id="commentsView">
    <div>
      //comment layout
    </div>
  </wicket:container>
</span>

And the code :

add(border);
ListView<Comment> commentsView = new ListView<Comment>("commentsView" , new LoadableDetachableModel<List<Comment>>()
{
  @Override
  protected List<Comment> load() {
    return commentDao.getComments(0 , 10);
  }
})
{
  @Override
  protected void populateItem(ListItem<Comment> item) {
    //comment layout
  }
};
border.add(commentsView);
commentsView.setReuseItems(false);

The Panel has a border , with a clickable button , can be used to collapse/expand the content of the border with AJAX.
Here is my steps :

1. I first collapse the panel .
2. Then open another browser panel , add a comment. (the underlaying data model is changed)
3. Back to the original panel , expand the panel ...

And I got a NPE :

2010-11-12 05:19:12,661 ERROR wicket.RequestCycle - Exception in rendering component: [MarkupContainer [Component id = _body]]
org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _body]]
        at org.apache.wicket.Component.renderComponent(Component.java:2725)
        at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
        at org.apache.wicket.Component.render(Component.java:2517)
        at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
        at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
        at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
        at org.apache.wicket.Component.renderComponent(Component.java:2686)
        at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)

...

Caused by: java.lang.NullPointerException
        at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:375)
        at org.apache.wicket.Component.renderComponent(Component.java:2686)
        ... 45 more
        
        

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3162) NPE when the underlaying model changed and ajax re-appear.

Posted by "smallufo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

smallufo updated WICKET-3162:
-----------------------------

    Attachment: HomePage.java

> NPE when the underlaying model changed and ajax re-appear. 
> -----------------------------------------------------------
>
>                 Key: WICKET-3162
>                 URL: https://issues.apache.org/jira/browse/WICKET-3162
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.4.13
>         Environment: wicket 1.4.13
>            Reporter: smallufo
>         Attachments: CommentsPanel.html, CommentsPanel.java, Dao.java, DaoImpl.java, HomePage.html, HomePage.java, PulldownBorder.html, PulldownBorder.java, WicketApplication.java
>
>
> <span wicket:id="border">
>   <wicket:container wicket:id="commentsView">
>     <div>
>       //comment layout
>     </div>
>   </wicket:container>
> </span>
> And the code :
> add(border);
> ListView<Comment> commentsView = new ListView<Comment>("commentsView" , new LoadableDetachableModel<List<Comment>>()
> {
>   @Override
>   protected List<Comment> load() {
>     return commentDao.getComments(0 , 10);
>   }
> })
> {
>   @Override
>   protected void populateItem(ListItem<Comment> item) {
>     //comment layout
>   }
> };
> border.add(commentsView);
> commentsView.setReuseItems(false);
> The Panel has a border , with a clickable button , can be used to collapse/expand the content of the border with AJAX.
> Here is my steps :
> 1. I first collapse the panel .
> 2. Then open another browser panel , add a comment. (the underlaying data model is changed)
> 3. Back to the original panel , expand the panel ...
> And I got a NPE :
> 2010-11-12 05:19:12,661 ERROR wicket.RequestCycle - Exception in rendering component: [MarkupContainer [Component id = _body]]
> org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _body]]
>         at org.apache.wicket.Component.renderComponent(Component.java:2725)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
>         at org.apache.wicket.Component.render(Component.java:2517)
>         at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
>         at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
>         at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
> ...
> Caused by: java.lang.NullPointerException
>         at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:375)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         ... 45 more
>         
>         

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3162) NPE when the underlaying model changed and ajax re-appear.

Posted by "smallufo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

smallufo updated WICKET-3162:
-----------------------------

    Attachment: CommentsPanel.html

> NPE when the underlaying model changed and ajax re-appear. 
> -----------------------------------------------------------
>
>                 Key: WICKET-3162
>                 URL: https://issues.apache.org/jira/browse/WICKET-3162
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.4.13
>         Environment: wicket 1.4.13
>            Reporter: smallufo
>         Attachments: CommentsPanel.html
>
>
> <span wicket:id="border">
>   <wicket:container wicket:id="commentsView">
>     <div>
>       //comment layout
>     </div>
>   </wicket:container>
> </span>
> And the code :
> add(border);
> ListView<Comment> commentsView = new ListView<Comment>("commentsView" , new LoadableDetachableModel<List<Comment>>()
> {
>   @Override
>   protected List<Comment> load() {
>     return commentDao.getComments(0 , 10);
>   }
> })
> {
>   @Override
>   protected void populateItem(ListItem<Comment> item) {
>     //comment layout
>   }
> };
> border.add(commentsView);
> commentsView.setReuseItems(false);
> The Panel has a border , with a clickable button , can be used to collapse/expand the content of the border with AJAX.
> Here is my steps :
> 1. I first collapse the panel .
> 2. Then open another browser panel , add a comment. (the underlaying data model is changed)
> 3. Back to the original panel , expand the panel ...
> And I got a NPE :
> 2010-11-12 05:19:12,661 ERROR wicket.RequestCycle - Exception in rendering component: [MarkupContainer [Component id = _body]]
> org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _body]]
>         at org.apache.wicket.Component.renderComponent(Component.java:2725)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
>         at org.apache.wicket.Component.render(Component.java:2517)
>         at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
>         at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
>         at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
> ...
> Caused by: java.lang.NullPointerException
>         at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:375)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         ... 45 more
>         
>         

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3162) NPE when the underlaying model changed and ajax re-appear.

Posted by "smallufo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

smallufo updated WICKET-3162:
-----------------------------

    Attachment: PulldownBorder.java

> NPE when the underlaying model changed and ajax re-appear. 
> -----------------------------------------------------------
>
>                 Key: WICKET-3162
>                 URL: https://issues.apache.org/jira/browse/WICKET-3162
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.4.13
>         Environment: wicket 1.4.13
>            Reporter: smallufo
>         Attachments: CommentsPanel.html, CommentsPanel.java, Dao.java, DaoImpl.java, HomePage.html, HomePage.java, PulldownBorder.html, PulldownBorder.java, WicketApplication.java
>
>
> <span wicket:id="border">
>   <wicket:container wicket:id="commentsView">
>     <div>
>       //comment layout
>     </div>
>   </wicket:container>
> </span>
> And the code :
> add(border);
> ListView<Comment> commentsView = new ListView<Comment>("commentsView" , new LoadableDetachableModel<List<Comment>>()
> {
>   @Override
>   protected List<Comment> load() {
>     return commentDao.getComments(0 , 10);
>   }
> })
> {
>   @Override
>   protected void populateItem(ListItem<Comment> item) {
>     //comment layout
>   }
> };
> border.add(commentsView);
> commentsView.setReuseItems(false);
> The Panel has a border , with a clickable button , can be used to collapse/expand the content of the border with AJAX.
> Here is my steps :
> 1. I first collapse the panel .
> 2. Then open another browser panel , add a comment. (the underlaying data model is changed)
> 3. Back to the original panel , expand the panel ...
> And I got a NPE :
> 2010-11-12 05:19:12,661 ERROR wicket.RequestCycle - Exception in rendering component: [MarkupContainer [Component id = _body]]
> org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _body]]
>         at org.apache.wicket.Component.renderComponent(Component.java:2725)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
>         at org.apache.wicket.Component.render(Component.java:2517)
>         at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
>         at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
>         at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
> ...
> Caused by: java.lang.NullPointerException
>         at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:375)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         ... 45 more
>         
>         

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3162) NPE when the underlaying model changed and ajax re-appear.

Posted by "smallufo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

smallufo updated WICKET-3162:
-----------------------------

    Attachment: PulldownBorder.html

> NPE when the underlaying model changed and ajax re-appear. 
> -----------------------------------------------------------
>
>                 Key: WICKET-3162
>                 URL: https://issues.apache.org/jira/browse/WICKET-3162
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.4.13
>         Environment: wicket 1.4.13
>            Reporter: smallufo
>         Attachments: CommentsPanel.html, CommentsPanel.java, Dao.java, DaoImpl.java, HomePage.html, HomePage.java, PulldownBorder.html, PulldownBorder.java, WicketApplication.java
>
>
> <span wicket:id="border">
>   <wicket:container wicket:id="commentsView">
>     <div>
>       //comment layout
>     </div>
>   </wicket:container>
> </span>
> And the code :
> add(border);
> ListView<Comment> commentsView = new ListView<Comment>("commentsView" , new LoadableDetachableModel<List<Comment>>()
> {
>   @Override
>   protected List<Comment> load() {
>     return commentDao.getComments(0 , 10);
>   }
> })
> {
>   @Override
>   protected void populateItem(ListItem<Comment> item) {
>     //comment layout
>   }
> };
> border.add(commentsView);
> commentsView.setReuseItems(false);
> The Panel has a border , with a clickable button , can be used to collapse/expand the content of the border with AJAX.
> Here is my steps :
> 1. I first collapse the panel .
> 2. Then open another browser panel , add a comment. (the underlaying data model is changed)
> 3. Back to the original panel , expand the panel ...
> And I got a NPE :
> 2010-11-12 05:19:12,661 ERROR wicket.RequestCycle - Exception in rendering component: [MarkupContainer [Component id = _body]]
> org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _body]]
>         at org.apache.wicket.Component.renderComponent(Component.java:2725)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
>         at org.apache.wicket.Component.render(Component.java:2517)
>         at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
>         at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
>         at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
> ...
> Caused by: java.lang.NullPointerException
>         at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:375)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         ... 45 more
>         
>         

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3162) NPE when the underlaying model changed and ajax re-appear.

Posted by "smallufo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

smallufo updated WICKET-3162:
-----------------------------

    Attachment: CommentsPanel.java

> NPE when the underlaying model changed and ajax re-appear. 
> -----------------------------------------------------------
>
>                 Key: WICKET-3162
>                 URL: https://issues.apache.org/jira/browse/WICKET-3162
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.4.13
>         Environment: wicket 1.4.13
>            Reporter: smallufo
>         Attachments: CommentsPanel.html, CommentsPanel.java, Dao.java, DaoImpl.java, HomePage.html, HomePage.java, PulldownBorder.html, PulldownBorder.java, WicketApplication.java
>
>
> <span wicket:id="border">
>   <wicket:container wicket:id="commentsView">
>     <div>
>       //comment layout
>     </div>
>   </wicket:container>
> </span>
> And the code :
> add(border);
> ListView<Comment> commentsView = new ListView<Comment>("commentsView" , new LoadableDetachableModel<List<Comment>>()
> {
>   @Override
>   protected List<Comment> load() {
>     return commentDao.getComments(0 , 10);
>   }
> })
> {
>   @Override
>   protected void populateItem(ListItem<Comment> item) {
>     //comment layout
>   }
> };
> border.add(commentsView);
> commentsView.setReuseItems(false);
> The Panel has a border , with a clickable button , can be used to collapse/expand the content of the border with AJAX.
> Here is my steps :
> 1. I first collapse the panel .
> 2. Then open another browser panel , add a comment. (the underlaying data model is changed)
> 3. Back to the original panel , expand the panel ...
> And I got a NPE :
> 2010-11-12 05:19:12,661 ERROR wicket.RequestCycle - Exception in rendering component: [MarkupContainer [Component id = _body]]
> org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _body]]
>         at org.apache.wicket.Component.renderComponent(Component.java:2725)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
>         at org.apache.wicket.Component.render(Component.java:2517)
>         at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
>         at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
>         at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
> ...
> Caused by: java.lang.NullPointerException
>         at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:375)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         ... 45 more
>         
>         

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3162) NPE when the underlaying model changed and ajax re-appear.

Posted by "smallufo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

smallufo updated WICKET-3162:
-----------------------------

           Description: 
Hi , I have a simple panel , with a border and a listView :

<span wicket:id="border">
  <wicket:container wicket:id="commentsView">
    <div>
      //comment layout
    </div>
  </wicket:container>
</span>

And the code :

add(border);
ListView<Comment> commentsView = new ListView<Comment>("commentsView" , new LoadableDetachableModel<List<Comment>>()
{
  @Override
  protected List<Comment> load() {
    return commentDao.getComments(0 , 10);
  }
})
{
  @Override
  protected void populateItem(ListItem<Comment> item) {
    //comment layout
  }
};
border.add(commentsView);
commentsView.setReuseItems(false);

The Panel has a border , with a clickable button , can be used to collapse/expand the content of the border with AJAX.
Here is my steps :

1. I first collapse the panel .
2. Then open another browser panel , add a comment. (the underlaying data model is changed)
3. Back to the original panel , expand the panel ...

And I got a NPE :

2010-11-12 05:19:12,661 ERROR wicket.RequestCycle - Exception in rendering component: [MarkupContainer [Component id = _body]]
org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _body]]
        at org.apache.wicket.Component.renderComponent(Component.java:2725)
        at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
        at org.apache.wicket.Component.render(Component.java:2517)
        at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
        at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
        at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
        at org.apache.wicket.Component.renderComponent(Component.java:2686)
        at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)

...

Caused by: java.lang.NullPointerException
        at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:375)
        at org.apache.wicket.Component.renderComponent(Component.java:2686)
        ... 45 more
        
        

  was:
<span wicket:id="border">
  <wicket:container wicket:id="commentsView">
    <div>
      //comment layout
    </div>
  </wicket:container>
</span>

And the code :

add(border);
ListView<Comment> commentsView = new ListView<Comment>("commentsView" , new LoadableDetachableModel<List<Comment>>()
{
  @Override
  protected List<Comment> load() {
    return commentDao.getComments(0 , 10);
  }
})
{
  @Override
  protected void populateItem(ListItem<Comment> item) {
    //comment layout
  }
};
border.add(commentsView);
commentsView.setReuseItems(false);

The Panel has a border , with a clickable button , can be used to collapse/expand the content of the border with AJAX.
Here is my steps :

1. I first collapse the panel .
2. Then open another browser panel , add a comment. (the underlaying data model is changed)
3. Back to the original panel , expand the panel ...

And I got a NPE :

2010-11-12 05:19:12,661 ERROR wicket.RequestCycle - Exception in rendering component: [MarkupContainer [Component id = _body]]
org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _body]]
        at org.apache.wicket.Component.renderComponent(Component.java:2725)
        at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
        at org.apache.wicket.Component.render(Component.java:2517)
        at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
        at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
        at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
        at org.apache.wicket.Component.renderComponent(Component.java:2686)
        at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)

...

Caused by: java.lang.NullPointerException
        at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:375)
        at org.apache.wicket.Component.renderComponent(Component.java:2686)
        ... 45 more
        
        

    Remaining Estimate: 0h
     Original Estimate: 0h

> NPE when the underlaying model changed and ajax re-appear. 
> -----------------------------------------------------------
>
>                 Key: WICKET-3162
>                 URL: https://issues.apache.org/jira/browse/WICKET-3162
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.4.13
>         Environment: wicket 1.4.13
>            Reporter: smallufo
>         Attachments: CommentsPanel.html, CommentsPanel.java, Dao.java, DaoImpl.java, HomePage.html, HomePage.java, PulldownBorder.html, PulldownBorder.java, quickstart.zip, WicketApplication.java
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Hi , I have a simple panel , with a border and a listView :
> <span wicket:id="border">
>   <wicket:container wicket:id="commentsView">
>     <div>
>       //comment layout
>     </div>
>   </wicket:container>
> </span>
> And the code :
> add(border);
> ListView<Comment> commentsView = new ListView<Comment>("commentsView" , new LoadableDetachableModel<List<Comment>>()
> {
>   @Override
>   protected List<Comment> load() {
>     return commentDao.getComments(0 , 10);
>   }
> })
> {
>   @Override
>   protected void populateItem(ListItem<Comment> item) {
>     //comment layout
>   }
> };
> border.add(commentsView);
> commentsView.setReuseItems(false);
> The Panel has a border , with a clickable button , can be used to collapse/expand the content of the border with AJAX.
> Here is my steps :
> 1. I first collapse the panel .
> 2. Then open another browser panel , add a comment. (the underlaying data model is changed)
> 3. Back to the original panel , expand the panel ...
> And I got a NPE :
> 2010-11-12 05:19:12,661 ERROR wicket.RequestCycle - Exception in rendering component: [MarkupContainer [Component id = _body]]
> org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _body]]
>         at org.apache.wicket.Component.renderComponent(Component.java:2725)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
>         at org.apache.wicket.Component.render(Component.java:2517)
>         at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
>         at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
>         at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
> ...
> Caused by: java.lang.NullPointerException
>         at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:375)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         ... 45 more
>         
>         

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3162) NPE when the underlaying model changed and ajax re-appear.

Posted by "smallufo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

smallufo updated WICKET-3162:
-----------------------------

    Attachment: DaoImpl.java

> NPE when the underlaying model changed and ajax re-appear. 
> -----------------------------------------------------------
>
>                 Key: WICKET-3162
>                 URL: https://issues.apache.org/jira/browse/WICKET-3162
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.4.13
>         Environment: wicket 1.4.13
>            Reporter: smallufo
>         Attachments: CommentsPanel.html, CommentsPanel.java, Dao.java, DaoImpl.java, HomePage.html, HomePage.java, PulldownBorder.html, PulldownBorder.java, WicketApplication.java
>
>
> <span wicket:id="border">
>   <wicket:container wicket:id="commentsView">
>     <div>
>       //comment layout
>     </div>
>   </wicket:container>
> </span>
> And the code :
> add(border);
> ListView<Comment> commentsView = new ListView<Comment>("commentsView" , new LoadableDetachableModel<List<Comment>>()
> {
>   @Override
>   protected List<Comment> load() {
>     return commentDao.getComments(0 , 10);
>   }
> })
> {
>   @Override
>   protected void populateItem(ListItem<Comment> item) {
>     //comment layout
>   }
> };
> border.add(commentsView);
> commentsView.setReuseItems(false);
> The Panel has a border , with a clickable button , can be used to collapse/expand the content of the border with AJAX.
> Here is my steps :
> 1. I first collapse the panel .
> 2. Then open another browser panel , add a comment. (the underlaying data model is changed)
> 3. Back to the original panel , expand the panel ...
> And I got a NPE :
> 2010-11-12 05:19:12,661 ERROR wicket.RequestCycle - Exception in rendering component: [MarkupContainer [Component id = _body]]
> org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _body]]
>         at org.apache.wicket.Component.renderComponent(Component.java:2725)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
>         at org.apache.wicket.Component.render(Component.java:2517)
>         at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
>         at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
>         at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
> ...
> Caused by: java.lang.NullPointerException
>         at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:375)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         ... 45 more
>         
>         

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3162) NPE when the underlaying model changed and ajax re-appear.

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12931881#action_12931881 ] 

Igor Vaynberg commented on WICKET-3162:
---------------------------------------

the same problem applies. its a fallback link, therefore you have to handle the case when the target is null. the NPE is in your code, not in wicket.

> NPE when the underlaying model changed and ajax re-appear. 
> -----------------------------------------------------------
>
>                 Key: WICKET-3162
>                 URL: https://issues.apache.org/jira/browse/WICKET-3162
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.4.13
>         Environment: wicket 1.4.13
>            Reporter: smallufo
>            Assignee: Igor Vaynberg
>         Attachments: CommentsPanel.html, CommentsPanel.java, Dao.java, DaoImpl.java, HomePage.html, HomePage.java, PulldownBorder.html, PulldownBorder.java, quickstart.zip, WicketApplication.java
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Hi , I have a simple panel , with a border and a listView :
> <span wicket:id="border">
>   <wicket:container wicket:id="commentsView">
>     <div>
>       //comment layout
>     </div>
>   </wicket:container>
> </span>
> And the code :
> add(border);
> ListView<Comment> commentsView = new ListView<Comment>("commentsView" , new LoadableDetachableModel<List<Comment>>()
> {
>   @Override
>   protected List<Comment> load() {
>     return commentDao.getComments(0 , 10);
>   }
> })
> {
>   @Override
>   protected void populateItem(ListItem<Comment> item) {
>     //comment layout
>   }
> };
> border.add(commentsView);
> commentsView.setReuseItems(false);
> The Panel has a border , with a clickable button , can be used to collapse/expand the content of the border with AJAX.
> Here is my steps :
> 1. I first collapse the panel .
> 2. Then open another browser panel , add a comment. (the underlaying data model is changed)
> 3. Back to the original panel , expand the panel ...
> And I got a NPE :
> 2010-11-12 05:19:12,661 ERROR wicket.RequestCycle - Exception in rendering component: [MarkupContainer [Component id = _body]]
> org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _body]]
>         at org.apache.wicket.Component.renderComponent(Component.java:2725)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
>         at org.apache.wicket.Component.render(Component.java:2517)
>         at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
>         at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
>         at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
> ...
> Caused by: java.lang.NullPointerException
>         at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:375)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         ... 45 more
>         
>         
> Igor replied :
> s/border.add(commentsView);/border.getbodycontainer().add(commentsView);/
> I replied :
> I tried , but NPE is still thrown , with the same stacktrace...
> Is there anything I missed ?
> Here is my border's HTML :
> <div wicket:id="content">
>   <wicket:body/>
> </div>
> border's java code :
>     content = new WebMarkupContainer("content");
>     
>     content.setOutputMarkupPlaceholderTag(true);
>     content.setVisible(defaultExpanded); 
>     content.setRenderBodyOnly(false);
>     add(content);
>     content.add(getBodyContainer());
> and the ajax link's onClick() :
> Link<Void> collapseExpandLink = new AjaxFallbackLink<Void>("collapseExpandLink")
> {
>   @Override
>   public void onClick(AjaxRequestTarget target)
>   {
>     expanded=!expanded;
>     content.setVisible(expanded);
>     target.addComponent(content);
>   }
> };
> add(collapseExpandLink);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3162) NPE when the underlaying model changed and ajax re-appear.

Posted by "smallufo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

smallufo updated WICKET-3162:
-----------------------------

    Attachment: Dao.java

> NPE when the underlaying model changed and ajax re-appear. 
> -----------------------------------------------------------
>
>                 Key: WICKET-3162
>                 URL: https://issues.apache.org/jira/browse/WICKET-3162
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.4.13
>         Environment: wicket 1.4.13
>            Reporter: smallufo
>         Attachments: CommentsPanel.html, CommentsPanel.java, Dao.java, DaoImpl.java, HomePage.html, HomePage.java, PulldownBorder.html, PulldownBorder.java, WicketApplication.java
>
>
> <span wicket:id="border">
>   <wicket:container wicket:id="commentsView">
>     <div>
>       //comment layout
>     </div>
>   </wicket:container>
> </span>
> And the code :
> add(border);
> ListView<Comment> commentsView = new ListView<Comment>("commentsView" , new LoadableDetachableModel<List<Comment>>()
> {
>   @Override
>   protected List<Comment> load() {
>     return commentDao.getComments(0 , 10);
>   }
> })
> {
>   @Override
>   protected void populateItem(ListItem<Comment> item) {
>     //comment layout
>   }
> };
> border.add(commentsView);
> commentsView.setReuseItems(false);
> The Panel has a border , with a clickable button , can be used to collapse/expand the content of the border with AJAX.
> Here is my steps :
> 1. I first collapse the panel .
> 2. Then open another browser panel , add a comment. (the underlaying data model is changed)
> 3. Back to the original panel , expand the panel ...
> And I got a NPE :
> 2010-11-12 05:19:12,661 ERROR wicket.RequestCycle - Exception in rendering component: [MarkupContainer [Component id = _body]]
> org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _body]]
>         at org.apache.wicket.Component.renderComponent(Component.java:2725)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
>         at org.apache.wicket.Component.render(Component.java:2517)
>         at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
>         at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
>         at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
> ...
> Caused by: java.lang.NullPointerException
>         at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:375)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         ... 45 more
>         
>         

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3162) NPE when the underlaying model changed and ajax re-appear.

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12931381#action_12931381 ] 

Martin Grigorov commented on WICKET-3162:
-----------------------------------------

Can you please create a quickstart that reproduce the problem ?
http://wicket.apache.org/start/quickstart.html

> NPE when the underlaying model changed and ajax re-appear. 
> -----------------------------------------------------------
>
>                 Key: WICKET-3162
>                 URL: https://issues.apache.org/jira/browse/WICKET-3162
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.4.13
>         Environment: wicket 1.4.13
>            Reporter: smallufo
>         Attachments: CommentsPanel.html, CommentsPanel.java, Dao.java, DaoImpl.java, HomePage.html, HomePage.java, PulldownBorder.html, PulldownBorder.java, WicketApplication.java
>
>
> <span wicket:id="border">
>   <wicket:container wicket:id="commentsView">
>     <div>
>       //comment layout
>     </div>
>   </wicket:container>
> </span>
> And the code :
> add(border);
> ListView<Comment> commentsView = new ListView<Comment>("commentsView" , new LoadableDetachableModel<List<Comment>>()
> {
>   @Override
>   protected List<Comment> load() {
>     return commentDao.getComments(0 , 10);
>   }
> })
> {
>   @Override
>   protected void populateItem(ListItem<Comment> item) {
>     //comment layout
>   }
> };
> border.add(commentsView);
> commentsView.setReuseItems(false);
> The Panel has a border , with a clickable button , can be used to collapse/expand the content of the border with AJAX.
> Here is my steps :
> 1. I first collapse the panel .
> 2. Then open another browser panel , add a comment. (the underlaying data model is changed)
> 3. Back to the original panel , expand the panel ...
> And I got a NPE :
> 2010-11-12 05:19:12,661 ERROR wicket.RequestCycle - Exception in rendering component: [MarkupContainer [Component id = _body]]
> org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _body]]
>         at org.apache.wicket.Component.renderComponent(Component.java:2725)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
>         at org.apache.wicket.Component.render(Component.java:2517)
>         at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
>         at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
>         at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
> ...
> Caused by: java.lang.NullPointerException
>         at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:375)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         ... 45 more
>         
>         

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3162) NPE when the underlaying model changed and ajax re-appear.

Posted by "smallufo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932209#action_12932209 ] 

smallufo commented on WICKET-3162:
----------------------------------

Hi , I printed the "target" object of onClick(AjaxRequestTarget target).
But each request ,  is always "not" null ...
It always prints :
target = [AjaxRequestTarget@1368398530 markupIdToComponent [{}], prependJavascript [[]], appendJavascript [[]]

I tried to change AjaxFallbackLink to AjaxLink but still throws NPE , (target is always non-null)...
Can you tell me how to solve this problem ?

Thanks a lot.

> NPE when the underlaying model changed and ajax re-appear. 
> -----------------------------------------------------------
>
>                 Key: WICKET-3162
>                 URL: https://issues.apache.org/jira/browse/WICKET-3162
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.4.13
>         Environment: wicket 1.4.13
>            Reporter: smallufo
>            Assignee: Igor Vaynberg
>         Attachments: CommentsPanel.html, CommentsPanel.java, Dao.java, DaoImpl.java, HomePage.html, HomePage.java, PulldownBorder.html, PulldownBorder.java, quickstart.zip, WicketApplication.java
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Hi , I have a simple panel , with a border and a listView :
> <span wicket:id="border">
>   <wicket:container wicket:id="commentsView">
>     <div>
>       //comment layout
>     </div>
>   </wicket:container>
> </span>
> And the code :
> add(border);
> ListView<Comment> commentsView = new ListView<Comment>("commentsView" , new LoadableDetachableModel<List<Comment>>()
> {
>   @Override
>   protected List<Comment> load() {
>     return commentDao.getComments(0 , 10);
>   }
> })
> {
>   @Override
>   protected void populateItem(ListItem<Comment> item) {
>     //comment layout
>   }
> };
> border.add(commentsView);
> commentsView.setReuseItems(false);
> The Panel has a border , with a clickable button , can be used to collapse/expand the content of the border with AJAX.
> Here is my steps :
> 1. I first collapse the panel .
> 2. Then open another browser panel , add a comment. (the underlaying data model is changed)
> 3. Back to the original panel , expand the panel ...
> And I got a NPE :
> 2010-11-12 05:19:12,661 ERROR wicket.RequestCycle - Exception in rendering component: [MarkupContainer [Component id = _body]]
> org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _body]]
>         at org.apache.wicket.Component.renderComponent(Component.java:2725)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
>         at org.apache.wicket.Component.render(Component.java:2517)
>         at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
>         at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
>         at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
> ...
> Caused by: java.lang.NullPointerException
>         at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:375)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         ... 45 more
>         
>         
> Igor replied :
> s/border.add(commentsView);/border.getbodycontainer().add(commentsView);/
> I replied :
> I tried , but NPE is still thrown , with the same stacktrace...
> Is there anything I missed ?
> Here is my border's HTML :
> <div wicket:id="content">
>   <wicket:body/>
> </div>
> border's java code :
>     content = new WebMarkupContainer("content");
>     
>     content.setOutputMarkupPlaceholderTag(true);
>     content.setVisible(defaultExpanded); 
>     content.setRenderBodyOnly(false);
>     add(content);
>     content.add(getBodyContainer());
> and the ajax link's onClick() :
> Link<Void> collapseExpandLink = new AjaxFallbackLink<Void>("collapseExpandLink")
> {
>   @Override
>   public void onClick(AjaxRequestTarget target)
>   {
>     expanded=!expanded;
>     content.setVisible(expanded);
>     target.addComponent(content);
>   }
> };
> add(collapseExpandLink);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3162) NPE when the underlaying model changed and ajax re-appear.

Posted by "smallufo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12931867#action_12931867 ] 

smallufo commented on WICKET-3162:
----------------------------------

No , I didn't right click the link and "open in new tab". I just open two tabs , showing the same page .
When the model in the first tab changed , and if I collapse/expand the panel in the second tab , it will throw NPE .

You can run the quickstart to verify it.

> NPE when the underlaying model changed and ajax re-appear. 
> -----------------------------------------------------------
>
>                 Key: WICKET-3162
>                 URL: https://issues.apache.org/jira/browse/WICKET-3162
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.4.13
>         Environment: wicket 1.4.13
>            Reporter: smallufo
>            Assignee: Igor Vaynberg
>         Attachments: CommentsPanel.html, CommentsPanel.java, Dao.java, DaoImpl.java, HomePage.html, HomePage.java, PulldownBorder.html, PulldownBorder.java, quickstart.zip, WicketApplication.java
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Hi , I have a simple panel , with a border and a listView :
> <span wicket:id="border">
>   <wicket:container wicket:id="commentsView">
>     <div>
>       //comment layout
>     </div>
>   </wicket:container>
> </span>
> And the code :
> add(border);
> ListView<Comment> commentsView = new ListView<Comment>("commentsView" , new LoadableDetachableModel<List<Comment>>()
> {
>   @Override
>   protected List<Comment> load() {
>     return commentDao.getComments(0 , 10);
>   }
> })
> {
>   @Override
>   protected void populateItem(ListItem<Comment> item) {
>     //comment layout
>   }
> };
> border.add(commentsView);
> commentsView.setReuseItems(false);
> The Panel has a border , with a clickable button , can be used to collapse/expand the content of the border with AJAX.
> Here is my steps :
> 1. I first collapse the panel .
> 2. Then open another browser panel , add a comment. (the underlaying data model is changed)
> 3. Back to the original panel , expand the panel ...
> And I got a NPE :
> 2010-11-12 05:19:12,661 ERROR wicket.RequestCycle - Exception in rendering component: [MarkupContainer [Component id = _body]]
> org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _body]]
>         at org.apache.wicket.Component.renderComponent(Component.java:2725)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
>         at org.apache.wicket.Component.render(Component.java:2517)
>         at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
>         at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
>         at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
> ...
> Caused by: java.lang.NullPointerException
>         at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:375)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         ... 45 more
>         
>         
> Igor replied :
> s/border.add(commentsView);/border.getbodycontainer().add(commentsView);/
> I replied :
> I tried , but NPE is still thrown , with the same stacktrace...
> Is there anything I missed ?
> Here is my border's HTML :
> <div wicket:id="content">
>   <wicket:body/>
> </div>
> border's java code :
>     content = new WebMarkupContainer("content");
>     
>     content.setOutputMarkupPlaceholderTag(true);
>     content.setVisible(defaultExpanded); 
>     content.setRenderBodyOnly(false);
>     add(content);
>     content.add(getBodyContainer());
> and the ajax link's onClick() :
> Link<Void> collapseExpandLink = new AjaxFallbackLink<Void>("collapseExpandLink")
> {
>   @Override
>   public void onClick(AjaxRequestTarget target)
>   {
>     expanded=!expanded;
>     content.setVisible(expanded);
>     target.addComponent(content);
>   }
> };
> add(collapseExpandLink);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3162) NPE when the underlaying model changed and ajax re-appear.

Posted by "smallufo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

smallufo updated WICKET-3162:
-----------------------------

    Description: 
Hi , I have a simple panel , with a border and a listView :

<span wicket:id="border">
  <wicket:container wicket:id="commentsView">
    <div>
      //comment layout
    </div>
  </wicket:container>
</span>

And the code :

add(border);
ListView<Comment> commentsView = new ListView<Comment>("commentsView" , new LoadableDetachableModel<List<Comment>>()
{
  @Override
  protected List<Comment> load() {
    return commentDao.getComments(0 , 10);
  }
})
{
  @Override
  protected void populateItem(ListItem<Comment> item) {
    //comment layout
  }
};
border.add(commentsView);
commentsView.setReuseItems(false);

The Panel has a border , with a clickable button , can be used to collapse/expand the content of the border with AJAX.
Here is my steps :

1. I first collapse the panel .
2. Then open another browser panel , add a comment. (the underlaying data model is changed)
3. Back to the original panel , expand the panel ...

And I got a NPE :

2010-11-12 05:19:12,661 ERROR wicket.RequestCycle - Exception in rendering component: [MarkupContainer [Component id = _body]]
org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _body]]
        at org.apache.wicket.Component.renderComponent(Component.java:2725)
        at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
        at org.apache.wicket.Component.render(Component.java:2517)
        at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
        at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
        at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
        at org.apache.wicket.Component.renderComponent(Component.java:2686)
        at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)

...

Caused by: java.lang.NullPointerException
        at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:375)
        at org.apache.wicket.Component.renderComponent(Component.java:2686)
        ... 45 more
        
        
Igor replied :
s/border.add(commentsView);/border.getbodycontainer().add(commentsView);/


I replied :
I tried , but NPE is still thrown , with the same stacktrace...
Is there anything I missed ?

Here is my border's HTML :

<div wicket:id="content">
  <wicket:body/>
</div>

border's java code :

    content = new WebMarkupContainer("content");
    
    content.setOutputMarkupPlaceholderTag(true);
    content.setVisible(defaultExpanded); 
    content.setRenderBodyOnly(false);
    add(content);
    content.add(getBodyContainer());

and the ajax link's onClick() :

Link<Void> collapseExpandLink = new AjaxFallbackLink<Void>("collapseExpandLink")
{
  @Override
  public void onClick(AjaxRequestTarget target)
  {
    expanded=!expanded;
    content.setVisible(expanded);
    target.addComponent(content);
  }
};
add(collapseExpandLink);


  was:
Hi , I have a simple panel , with a border and a listView :

<span wicket:id="border">
  <wicket:container wicket:id="commentsView">
    <div>
      //comment layout
    </div>
  </wicket:container>
</span>

And the code :

add(border);
ListView<Comment> commentsView = new ListView<Comment>("commentsView" , new LoadableDetachableModel<List<Comment>>()
{
  @Override
  protected List<Comment> load() {
    return commentDao.getComments(0 , 10);
  }
})
{
  @Override
  protected void populateItem(ListItem<Comment> item) {
    //comment layout
  }
};
border.add(commentsView);
commentsView.setReuseItems(false);

The Panel has a border , with a clickable button , can be used to collapse/expand the content of the border with AJAX.
Here is my steps :

1. I first collapse the panel .
2. Then open another browser panel , add a comment. (the underlaying data model is changed)
3. Back to the original panel , expand the panel ...

And I got a NPE :

2010-11-12 05:19:12,661 ERROR wicket.RequestCycle - Exception in rendering component: [MarkupContainer [Component id = _body]]
org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _body]]
        at org.apache.wicket.Component.renderComponent(Component.java:2725)
        at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
        at org.apache.wicket.Component.render(Component.java:2517)
        at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
        at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
        at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
        at org.apache.wicket.Component.renderComponent(Component.java:2686)
        at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)

...

Caused by: java.lang.NullPointerException
        at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:375)
        at org.apache.wicket.Component.renderComponent(Component.java:2686)
        ... 45 more
        
        


> NPE when the underlaying model changed and ajax re-appear. 
> -----------------------------------------------------------
>
>                 Key: WICKET-3162
>                 URL: https://issues.apache.org/jira/browse/WICKET-3162
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.4.13
>         Environment: wicket 1.4.13
>            Reporter: smallufo
>         Attachments: CommentsPanel.html, CommentsPanel.java, Dao.java, DaoImpl.java, HomePage.html, HomePage.java, PulldownBorder.html, PulldownBorder.java, quickstart.zip, WicketApplication.java
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Hi , I have a simple panel , with a border and a listView :
> <span wicket:id="border">
>   <wicket:container wicket:id="commentsView">
>     <div>
>       //comment layout
>     </div>
>   </wicket:container>
> </span>
> And the code :
> add(border);
> ListView<Comment> commentsView = new ListView<Comment>("commentsView" , new LoadableDetachableModel<List<Comment>>()
> {
>   @Override
>   protected List<Comment> load() {
>     return commentDao.getComments(0 , 10);
>   }
> })
> {
>   @Override
>   protected void populateItem(ListItem<Comment> item) {
>     //comment layout
>   }
> };
> border.add(commentsView);
> commentsView.setReuseItems(false);
> The Panel has a border , with a clickable button , can be used to collapse/expand the content of the border with AJAX.
> Here is my steps :
> 1. I first collapse the panel .
> 2. Then open another browser panel , add a comment. (the underlaying data model is changed)
> 3. Back to the original panel , expand the panel ...
> And I got a NPE :
> 2010-11-12 05:19:12,661 ERROR wicket.RequestCycle - Exception in rendering component: [MarkupContainer [Component id = _body]]
> org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _body]]
>         at org.apache.wicket.Component.renderComponent(Component.java:2725)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
>         at org.apache.wicket.Component.render(Component.java:2517)
>         at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
>         at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
>         at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
> ...
> Caused by: java.lang.NullPointerException
>         at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:375)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         ... 45 more
>         
>         
> Igor replied :
> s/border.add(commentsView);/border.getbodycontainer().add(commentsView);/
> I replied :
> I tried , but NPE is still thrown , with the same stacktrace...
> Is there anything I missed ?
> Here is my border's HTML :
> <div wicket:id="content">
>   <wicket:body/>
> </div>
> border's java code :
>     content = new WebMarkupContainer("content");
>     
>     content.setOutputMarkupPlaceholderTag(true);
>     content.setVisible(defaultExpanded); 
>     content.setRenderBodyOnly(false);
>     add(content);
>     content.add(getBodyContainer());
> and the ajax link's onClick() :
> Link<Void> collapseExpandLink = new AjaxFallbackLink<Void>("collapseExpandLink")
> {
>   @Override
>   public void onClick(AjaxRequestTarget target)
>   {
>     expanded=!expanded;
>     content.setVisible(expanded);
>     target.addComponent(content);
>   }
> };
> add(collapseExpandLink);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3162) NPE when the underlaying model changed and ajax re-appear.

Posted by "smallufo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

smallufo updated WICKET-3162:
-----------------------------

    Attachment: WicketApplication.java

> NPE when the underlaying model changed and ajax re-appear. 
> -----------------------------------------------------------
>
>                 Key: WICKET-3162
>                 URL: https://issues.apache.org/jira/browse/WICKET-3162
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.4.13
>         Environment: wicket 1.4.13
>            Reporter: smallufo
>         Attachments: CommentsPanel.html, CommentsPanel.java, Dao.java, DaoImpl.java, HomePage.html, HomePage.java, PulldownBorder.html, PulldownBorder.java, WicketApplication.java
>
>
> <span wicket:id="border">
>   <wicket:container wicket:id="commentsView">
>     <div>
>       //comment layout
>     </div>
>   </wicket:container>
> </span>
> And the code :
> add(border);
> ListView<Comment> commentsView = new ListView<Comment>("commentsView" , new LoadableDetachableModel<List<Comment>>()
> {
>   @Override
>   protected List<Comment> load() {
>     return commentDao.getComments(0 , 10);
>   }
> })
> {
>   @Override
>   protected void populateItem(ListItem<Comment> item) {
>     //comment layout
>   }
> };
> border.add(commentsView);
> commentsView.setReuseItems(false);
> The Panel has a border , with a clickable button , can be used to collapse/expand the content of the border with AJAX.
> Here is my steps :
> 1. I first collapse the panel .
> 2. Then open another browser panel , add a comment. (the underlaying data model is changed)
> 3. Back to the original panel , expand the panel ...
> And I got a NPE :
> 2010-11-12 05:19:12,661 ERROR wicket.RequestCycle - Exception in rendering component: [MarkupContainer [Component id = _body]]
> org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _body]]
>         at org.apache.wicket.Component.renderComponent(Component.java:2725)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
>         at org.apache.wicket.Component.render(Component.java:2517)
>         at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
>         at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
>         at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
> ...
> Caused by: java.lang.NullPointerException
>         at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:375)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         ... 45 more
>         
>         

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3162) NPE when the underlaying model changed and ajax re-appear.

Posted by "smallufo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

smallufo updated WICKET-3162:
-----------------------------

    Attachment: quickstart.zip

> NPE when the underlaying model changed and ajax re-appear. 
> -----------------------------------------------------------
>
>                 Key: WICKET-3162
>                 URL: https://issues.apache.org/jira/browse/WICKET-3162
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.4.13
>         Environment: wicket 1.4.13
>            Reporter: smallufo
>         Attachments: CommentsPanel.html, CommentsPanel.java, Dao.java, DaoImpl.java, HomePage.html, HomePage.java, PulldownBorder.html, PulldownBorder.java, quickstart.zip, WicketApplication.java
>
>
> <span wicket:id="border">
>   <wicket:container wicket:id="commentsView">
>     <div>
>       //comment layout
>     </div>
>   </wicket:container>
> </span>
> And the code :
> add(border);
> ListView<Comment> commentsView = new ListView<Comment>("commentsView" , new LoadableDetachableModel<List<Comment>>()
> {
>   @Override
>   protected List<Comment> load() {
>     return commentDao.getComments(0 , 10);
>   }
> })
> {
>   @Override
>   protected void populateItem(ListItem<Comment> item) {
>     //comment layout
>   }
> };
> border.add(commentsView);
> commentsView.setReuseItems(false);
> The Panel has a border , with a clickable button , can be used to collapse/expand the content of the border with AJAX.
> Here is my steps :
> 1. I first collapse the panel .
> 2. Then open another browser panel , add a comment. (the underlaying data model is changed)
> 3. Back to the original panel , expand the panel ...
> And I got a NPE :
> 2010-11-12 05:19:12,661 ERROR wicket.RequestCycle - Exception in rendering component: [MarkupContainer [Component id = _body]]
> org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _body]]
>         at org.apache.wicket.Component.renderComponent(Component.java:2725)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
>         at org.apache.wicket.Component.render(Component.java:2517)
>         at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
>         at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
>         at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
> ...
> Caused by: java.lang.NullPointerException
>         at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:375)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         ... 45 more
>         
>         

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3162) NPE when the underlaying model changed and ajax re-appear.

Posted by "smallufo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12931383#action_12931383 ] 

smallufo commented on WICKET-3162:
----------------------------------

quickstart

> NPE when the underlaying model changed and ajax re-appear. 
> -----------------------------------------------------------
>
>                 Key: WICKET-3162
>                 URL: https://issues.apache.org/jira/browse/WICKET-3162
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.4.13
>         Environment: wicket 1.4.13
>            Reporter: smallufo
>         Attachments: CommentsPanel.html, CommentsPanel.java, Dao.java, DaoImpl.java, HomePage.html, HomePage.java, PulldownBorder.html, PulldownBorder.java, quickstart.zip, WicketApplication.java
>
>
> <span wicket:id="border">
>   <wicket:container wicket:id="commentsView">
>     <div>
>       //comment layout
>     </div>
>   </wicket:container>
> </span>
> And the code :
> add(border);
> ListView<Comment> commentsView = new ListView<Comment>("commentsView" , new LoadableDetachableModel<List<Comment>>()
> {
>   @Override
>   protected List<Comment> load() {
>     return commentDao.getComments(0 , 10);
>   }
> })
> {
>   @Override
>   protected void populateItem(ListItem<Comment> item) {
>     //comment layout
>   }
> };
> border.add(commentsView);
> commentsView.setReuseItems(false);
> The Panel has a border , with a clickable button , can be used to collapse/expand the content of the border with AJAX.
> Here is my steps :
> 1. I first collapse the panel .
> 2. Then open another browser panel , add a comment. (the underlaying data model is changed)
> 3. Back to the original panel , expand the panel ...
> And I got a NPE :
> 2010-11-12 05:19:12,661 ERROR wicket.RequestCycle - Exception in rendering component: [MarkupContainer [Component id = _body]]
> org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _body]]
>         at org.apache.wicket.Component.renderComponent(Component.java:2725)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
>         at org.apache.wicket.Component.render(Component.java:2517)
>         at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
>         at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
>         at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
> ...
> Caused by: java.lang.NullPointerException
>         at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:375)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         ... 45 more
>         
>         

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-3162) NPE when the underlaying model changed and ajax re-appear.

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-3162.
-----------------------------------

    Resolution: Invalid
      Assignee: Igor Vaynberg

your border uses AjaxFallbackLink. when you right click the link and do "open in new tab" it creates a regular request in which case the ajaxrequesttarget inside link's onclick will be null (like the javadoc explains), but your code doesnt check for it. other check for the target or use a regular non-fallback ajax link.

> NPE when the underlaying model changed and ajax re-appear. 
> -----------------------------------------------------------
>
>                 Key: WICKET-3162
>                 URL: https://issues.apache.org/jira/browse/WICKET-3162
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.4.13
>         Environment: wicket 1.4.13
>            Reporter: smallufo
>            Assignee: Igor Vaynberg
>         Attachments: CommentsPanel.html, CommentsPanel.java, Dao.java, DaoImpl.java, HomePage.html, HomePage.java, PulldownBorder.html, PulldownBorder.java, quickstart.zip, WicketApplication.java
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Hi , I have a simple panel , with a border and a listView :
> <span wicket:id="border">
>   <wicket:container wicket:id="commentsView">
>     <div>
>       //comment layout
>     </div>
>   </wicket:container>
> </span>
> And the code :
> add(border);
> ListView<Comment> commentsView = new ListView<Comment>("commentsView" , new LoadableDetachableModel<List<Comment>>()
> {
>   @Override
>   protected List<Comment> load() {
>     return commentDao.getComments(0 , 10);
>   }
> })
> {
>   @Override
>   protected void populateItem(ListItem<Comment> item) {
>     //comment layout
>   }
> };
> border.add(commentsView);
> commentsView.setReuseItems(false);
> The Panel has a border , with a clickable button , can be used to collapse/expand the content of the border with AJAX.
> Here is my steps :
> 1. I first collapse the panel .
> 2. Then open another browser panel , add a comment. (the underlaying data model is changed)
> 3. Back to the original panel , expand the panel ...
> And I got a NPE :
> 2010-11-12 05:19:12,661 ERROR wicket.RequestCycle - Exception in rendering component: [MarkupContainer [Component id = _body]]
> org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _body]]
>         at org.apache.wicket.Component.renderComponent(Component.java:2725)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
>         at org.apache.wicket.Component.render(Component.java:2517)
>         at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
>         at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
>         at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
> ...
> Caused by: java.lang.NullPointerException
>         at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:375)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         ... 45 more
>         
>         
> Igor replied :
> s/border.add(commentsView);/border.getbodycontainer().add(commentsView);/
> I replied :
> I tried , but NPE is still thrown , with the same stacktrace...
> Is there anything I missed ?
> Here is my border's HTML :
> <div wicket:id="content">
>   <wicket:body/>
> </div>
> border's java code :
>     content = new WebMarkupContainer("content");
>     
>     content.setOutputMarkupPlaceholderTag(true);
>     content.setVisible(defaultExpanded); 
>     content.setRenderBodyOnly(false);
>     add(content);
>     content.add(getBodyContainer());
> and the ajax link's onClick() :
> Link<Void> collapseExpandLink = new AjaxFallbackLink<Void>("collapseExpandLink")
> {
>   @Override
>   public void onClick(AjaxRequestTarget target)
>   {
>     expanded=!expanded;
>     content.setVisible(expanded);
>     target.addComponent(content);
>   }
> };
> add(collapseExpandLink);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3162) NPE when the underlaying model changed and ajax re-appear.

Posted by "smallufo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

smallufo updated WICKET-3162:
-----------------------------

    Attachment: HomePage.html

> NPE when the underlaying model changed and ajax re-appear. 
> -----------------------------------------------------------
>
>                 Key: WICKET-3162
>                 URL: https://issues.apache.org/jira/browse/WICKET-3162
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.4.13
>         Environment: wicket 1.4.13
>            Reporter: smallufo
>         Attachments: CommentsPanel.html, CommentsPanel.java, Dao.java, DaoImpl.java, HomePage.html, HomePage.java, PulldownBorder.html, PulldownBorder.java, WicketApplication.java
>
>
> <span wicket:id="border">
>   <wicket:container wicket:id="commentsView">
>     <div>
>       //comment layout
>     </div>
>   </wicket:container>
> </span>
> And the code :
> add(border);
> ListView<Comment> commentsView = new ListView<Comment>("commentsView" , new LoadableDetachableModel<List<Comment>>()
> {
>   @Override
>   protected List<Comment> load() {
>     return commentDao.getComments(0 , 10);
>   }
> })
> {
>   @Override
>   protected void populateItem(ListItem<Comment> item) {
>     //comment layout
>   }
> };
> border.add(commentsView);
> commentsView.setReuseItems(false);
> The Panel has a border , with a clickable button , can be used to collapse/expand the content of the border with AJAX.
> Here is my steps :
> 1. I first collapse the panel .
> 2. Then open another browser panel , add a comment. (the underlaying data model is changed)
> 3. Back to the original panel , expand the panel ...
> And I got a NPE :
> 2010-11-12 05:19:12,661 ERROR wicket.RequestCycle - Exception in rendering component: [MarkupContainer [Component id = _body]]
> org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _body]]
>         at org.apache.wicket.Component.renderComponent(Component.java:2725)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
>         at org.apache.wicket.Component.render(Component.java:2517)
>         at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
>         at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
>         at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
> ...
> Caused by: java.lang.NullPointerException
>         at org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:375)
>         at org.apache.wicket.Component.renderComponent(Component.java:2686)
>         ... 45 more
>         
>         

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.