Re: [Wicket-user] No Page found for component after selecting TreeNode
Thanks for the quick replay. After some digging, I found that I forgot to check that TreeItem is also a WebMarkupContainer which is rebuilt. A wrong way to re-implement my requirement in the Tree component let me think it worked on the Tree component in wicket-extension, which is obvious not after some serious thought. Seems like I asked a dumb question, hah Isaac Matej Knopp wrote: When tree node is selected the appropriate part of tree is rebuilt, which also involves recreating the components. So the component on which you're calling getPage() is no longer in hierarchy, thus the page returned is null. -Matej On 4/8/07, Isaac Weng [EMAIL PROTECTED] wrote: Hi, Similar to ILinkCallback of Tree in wicket-extension, I created a callback link which allows me to select a tree node in my custom Link component. After the link is clicked, the callback is executed and the node is selected. However, after selectNode() runs, getPage() in the Link component results in No Page found for component. Following is a brief sample code: - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] No Page found for component after selecting TreeNode
Hi, Similar to ILinkCallback of Tree in wicket-extension, I created a callback link which allows me to select a tree node in my custom Link component. After the link is clicked, the callback is executed and the node is selected. However, after selectNode() runs, getPage() in the Link component results in No Page found for component. Following is a brief sample code: MyTree.html: wicket:panel div class=wicket-tree div wicket:id=idiv class=a_ span wicket:id=indent/spana wicket:id=linkspan wicket:id=image//aspan wicket:id=myPanel / /div/div/div /wicket:panel MyTree.java: public class MyTree extends DefaultAbstractTree { ... protected void populateTreeItem(final WebMarkupContainer item, int level) { ... final DefaultMutableTreeNode node = (DefaultMutableTreeNode) item.getModelObject(); add(new MyPanel(myPanel, item.getModelObject(), new IMyLinkCallback() { public void onClick(AjaxRequestTarget target) { getTreeState().selectNode(node, !getTreeState().isNodeSelected(node)); } }); } MyPanel.html: wicket:panel a wicket:id=linkspan wicket:id=outputName/span/a /wicket:panel MyPanel.java: public class MyPanel extends Panel { public MyPanel(String id, Object object, final IMyLinkCallback callback) { super(id); Link myLink = new Link(link) { public void onClick() { getPage(); // return the Page instance correctly. callback.onClick(null); getPage(); // No Page found for component } }; DefaultMutableTreeNode node = (DefaultMutableTreeNode) object; myLink.add(new Label(outputName, (String) node.getUserObject())); add(myLink); } } IMyLinkCallback.java: public interface IMyLinkCallback extends IClusterable { public void onClick(AjaxRequestTarget target); } The problem appears in both 1.3.0 of April 4, and 1.2.5. Am I doing it in a wrong way ? Isaac - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Strange problem with ModalWindow
Hi, Just update to the latest version, and it works great. Thanks for such a quick fix. Isaac Matej Knopp wrote: Can you please check the latest revision? (for both tomcat and jetty if possible). It should be fixed. -Matej On 4/2/07, Isaac Weng [EMAIL PROTECTED] wrote: Isaac Weng wrote: Hi, The problem happens after upgrading to 1.3.0-SNAPSHOT on 1 April. I have a right panel replaced by another panel with ajax tabs by click on a link in the left panel. In the second tab, there's a button which will open a modal window when clicked. The problem is that sometimes an exception threw after the button clicked or during modal window redering, which is the cause I'm not sure. The strange part is the exception isn't thrown every time, and I can't find a right way to reproduce it. In Jetty, it's a EofException, however in Tomcat it says Broken pipe. No refresh or any link is clicked while rendering the modal window, so I have no idea where broken pipe occured from. Also, the problem seems only happens in IE. Sorry, it's not IE only, just happened on my firefox. Isaac - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Strange problem with ModalWindow
Hi, The problem happens after upgrading to 1.3.0-SNAPSHOT on 1 April. I have a right panel replaced by another panel with ajax tabs by click on a link in the left panel. In the second tab, there's a button which will open a modal window when clicked. The problem is that sometimes an exception threw after the button clicked or during modal window redering, which is the cause I'm not sure. The strange part is the exception isn't thrown every time, and I can't find a right way to reproduce it. In Jetty, it's a EofException, however in Tomcat it says Broken pipe. No refresh or any link is clicked while rendering the modal window, so I have no idea where broken pipe occured from. Also, the problem seems only happens in IE. In development mode, if the exception threw, after closing the modal window, another WicketRuntimeException is thrown saying something like component form:modal not found on page However in deployment mode, the WicketRuntimeException won't be thrown. There's no such problem with 1.2.5 release. The attachment are logs from Jetty and Tomcat, and the quick-start sample, but the exception rarely threw in my sample, which really confuses me. Sorry for not able to find a good way to reproduce the problem. Any suggestion is appreciated. Isaac quickstart-1.3.0.IAmAZip Description: Binary data 02-04-07 14:32:46,807 ERROR wicket.RequestCycle - ClientAbortException: java.net.SocketException: Broken pipe wicket.WicketRuntimeException: ClientAbortException: java.net.SocketException: Broken pipe at wicket.Response.write(Response.java:308) at wicket.request.target.resource.ResourceStreamRequestTarget.respond(ResourceStreamRequestTarget.java:125) at wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:102) at wicket.RequestCycle.respond(RequestCycle.java:1001) at wicket.RequestCycle.step(RequestCycle.java:1074) at wicket.RequestCycle.steps(RequestCycle.java:1138) at wicket.RequestCycle.request(RequestCycle.java:474) at wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:248) at wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:133) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445) at java.lang.Thread.run(Thread.java:619) Caused by: ClientAbortException: java.net.SocketException: Broken pipe at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:358) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434) at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:309) at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:288) at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:98) at wicket.Response.write(Response.java:304) ... 20 more Caused by: java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:764) at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118) at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:570) at org.apache.coyote.Response.doWrite(Response.java:560) at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353) 2007-04-02 14:20:55.589::INFO: Started SelectChannelConnector @ 0.0.0.0:8080 ERROR - RequestCycle - org.mortbay.jetty.EofException wicket.WicketRuntimeException: org.mortbay.jetty.EofException at wicket.Response.write(Response.java:308) at wicket.request.target.resource.ResourceStreamRequestTarget.respond(ResourceStreamRequestTarget.java:125) at wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:102) at
Re: [Wicket-user] Strange problem with ModalWindow
Isaac Weng wrote: Hi, The problem happens after upgrading to 1.3.0-SNAPSHOT on 1 April. I have a right panel replaced by another panel with ajax tabs by click on a link in the left panel. In the second tab, there's a button which will open a modal window when clicked. The problem is that sometimes an exception threw after the button clicked or during modal window redering, which is the cause I'm not sure. The strange part is the exception isn't thrown every time, and I can't find a right way to reproduce it. In Jetty, it's a EofException, however in Tomcat it says Broken pipe. No refresh or any link is clicked while rendering the modal window, so I have no idea where broken pipe occured from. Also, the problem seems only happens in IE. Sorry, it's not IE only, just happened on my firefox. Isaac - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Problem with ajax tree and listView
Oops, I forgot to mention that. I'm using 1.2.5 release. Isaac Matej Knopp wrote: Hi, as a temporary solution you can. But this is bug and needs to be resolved. What version of wicket are you using? On 3/26/07, Isaac Weng [EMAIL PROTECTED] wrote: Hi, Myabe I can just use RepeatingView instead. Thanks a lot for clearing my doubts. Isaac Matej Knopp wrote: Hi, this seem to be caused by the latest attach refactor. After the attaching bug is fixed this problem should disappeared. -Matej On 3/24/07, Isaac Weng [EMAIL PROTECTED] wrote: Sorry, I didn't write my sample codes clearly. The problem happens in renderItem(). While expanding tree node, ListItem in renderItem() becomes null, but the list values I get by calling getList() are correct. Also, I found it renders correctly if I use RepeatingView. Isaac Isaac Weng wrote: Sorry, don't know why my message didn't send, probably because gmail and attachement. I've made a quick start files for the problem. The problem is If using a ListView to display the tree node value, after I collapse the node, I can never expand it again, and the ListItem becomes null. No problem with a Label. Could you give me some directions ? Thanks. Sincerely, Isaac Matej Knopp wrote: hi, this really is weird. Can you post a quick start project that demonstrates the behavior? -Matej - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Problem with ajax tree and listView
Hi, Myabe I can just use RepeatingView instead. Thanks a lot for clearing my doubts. Isaac Matej Knopp wrote: Hi, this seem to be caused by the latest attach refactor. After the attaching bug is fixed this problem should disappeared. -Matej On 3/24/07, Isaac Weng [EMAIL PROTECTED] wrote: Sorry, I didn't write my sample codes clearly. The problem happens in renderItem(). While expanding tree node, ListItem in renderItem() becomes null, but the list values I get by calling getList() are correct. Also, I found it renders correctly if I use RepeatingView. Isaac Isaac Weng wrote: Sorry, don't know why my message didn't send, probably because gmail and attachement. I've made a quick start files for the problem. The problem is If using a ListView to display the tree node value, after I collapse the node, I can never expand it again, and the ListItem becomes null. No problem with a Label. Could you give me some directions ? Thanks. Sincerely, Isaac Matej Knopp wrote: hi, this really is weird. Can you post a quick start project that demonstrates the behavior? -Matej - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Problem with ajax tree and listView
Sorry, I didn't write my sample codes clearly. The problem happens in renderItem(). While expanding tree node, ListItem in renderItem() becomes null, but the list values I get by calling getList() are correct. Also, I found it renders correctly if I use RepeatingView. Isaac Isaac Weng wrote: Sorry, don't know why my message didn't send, probably because gmail and attachement. I've made a quick start files for the problem. The problem is If using a ListView to display the tree node value, after I collapse the node, I can never expand it again, and the ListItem becomes null. No problem with a Label. Could you give me some directions ? Thanks. Sincerely, Isaac Matej Knopp wrote: hi, this really is weird. Can you post a quick start project that demonstrates the behavior? -Matej - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Problem with ajax tree and listView
Hi, This is my first time asking questions here. Hope I can make my question clear. I'v tried to extend the ajax tree in the wicket extension. The only modification I made is the output value, which is a customized panel instead of a label. Following are my html and source. MyTree.html : span wicket:id=indent/spana wicket:id=linkspan wicket:id=image//a a wicket:id=nodeLinkspan class=icon wicket:id=icon/spanspan wicket:id=myPanel / To simplify the problem, I strip most markups of MyPanel.html to what I think causing the problem. MyPanel.html : span wicket:id=outputListspan wicket:id=outputNamename/span/span MyPanel.java : public MyPanel extends Panel { public MyPanel(String id) { super(id); ArrayListString list = new ArrayListString(); list.add(name1); add(new ListView(outputList, list) { public void populateItem(final ListItem item) { final String name = (String) item.getModelObject(); item.add(new Label(outputName, name)); } }); } } The problem is while I click the junction link, ListView.renderItem() throws a NullPointerException. After some digging, I found that the ListItem is null. Then I use getList(), and it successfully return the list I passed in and the values in that list are also correct, however the ListItem is null which I don't know why. Thanks for reading my question. I will appreciate any suggestions. Isaac - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Problem with ajax tree and listView
Sorry, don't know why my message didn't send, probably because gmail and attachement. I've made a quick start files for the problem. The problem is If using a ListView to display the tree node value, after I collapse the node, I can never expand it again, and the ListItem becomes null. No problem with a Label. Could you give me some directions ? Thanks. Sincerely, Isaac Matej Knopp wrote: hi, this really is weird. Can you post a quick start project that demonstrates the behavior? -Matej On 3/23/07, Isaac Weng [EMAIL PROTECTED] wrote: Hi, This is my first time asking questions here. Hope I can make my question clear. I'v tried to extend the ajax tree in the wicket extension. The only modification I made is the output value, which is a customized panel instead of a label. Following are my html and source. MyTree.html : span wicket:id=indent/spana wicket:id=linkspan wicket:id=image//a a wicket:id=nodeLinkspan class=icon wicket:id=icon/spanspan wicket:id=myPanel / To simplify the problem, I strip most markups of MyPanel.html to what I think causing the problem. MyPanel.html : span wicket:id=outputListspan wicket:id=outputNamename/span/span MyPanel.java : public MyPanel extends Panel { public MyPanel(String id) { super(id); ArrayListString list = new ArrayListString(); list.add(name1); add(new ListView(outputList, list) { public void populateItem(final ListItem item) { final String name = (String) item.getModelObject(); item.add(new Label(outputName, name)); } }); } } The problem is while I click the junction link, ListView.renderItem() throws a NullPointerException. After some digging, I found that the ListItem is null. Then I use getList(), and it successfully return the list I passed in and the values in that list are also correct, however the ListItem is null which I don't know why. Thanks for reading my question. I will appreciate any suggestions. Isaac tree-quickstart.IamAzip Description: Binary data - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user